forked from liferay/liferay-portal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-test-jetty.xml
76 lines (58 loc) · 2.16 KB
/
build-test-jetty.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<?xml version="1.0"?>
<project name="portal-test-jetty" basedir="." default="test" xmlns:antelope="antlib:ise.antelope.tasks">
<import file="build-test.xml" />
<target name="run-jetty">
<antcall target="run-simple-server" />
<antcall target="evaluate-logs" />
</target>
<target name="run-selenium-jetty">
<app-server-properties-update>
app.server.type=jetty
</app-server-properties-update>
<if>
<not>
<isset property="build.app.server" />
</not>
<then>
<ant antfile="build-dist.xml" target="build-dist-jetty" />
</then>
</if>
<replace file="${app.server.jetty.bin.dir}/run.bat">
<replacetoken>set "JAVA_OPTS=-D</replacetoken>
<replacevalue>set "JAVA_OPTS=-DSTOP.PORT=8079 -DSTOP.KEY=secret -D</replacevalue>
</replace>
<replace file="${app.server.jetty.bin.dir}/run.sh">
<replacetoken>export JAVA_OPTS="-D</replacetoken>
<replacevalue>export JAVA_OPTS="-DSTOP.PORT=8079 -DSTOP.KEY=secret -D</replacevalue>
</replace>
<copy
file="${app.server.jetty.bin.dir}/run.bat"
tofile="${app.server.jetty.bin.dir}/shutdown.bat"
/>
<copy
file="${app.server.jetty.bin.dir}/run.sh"
tofile="${app.server.jetty.bin.dir}/shutdown.sh"
/>
<replace file="${app.server.jetty.bin.dir}/shutdown.bat">
<replacetoken>"%JAVA_HOME%/bin/java" %JAVA_OPTS% -jar ../start.jar</replacetoken>
<replacevalue>"%JAVA_HOME%/bin/java" %JAVA_OPTS% -jar ../start.jar --stop</replacevalue>
</replace>
<replace file="${app.server.jetty.bin.dir}/shutdown.sh">
<replacetoken>$JAVA_HOME/bin/java $JAVA_OPTS -jar ../start.jar</replacetoken>
<replacevalue>$JAVA_HOME/bin/java $JAVA_OPTS -jar ../start.jar --stop</replacevalue>
</replace>
<chmod perm="a+x">
<fileset dir="${app.server.jetty.bin.dir}">
<include name="*.sh" />
</fileset>
</chmod>
<antcall target="revert-test-properties" />
<ant dir="portal-impl" target="build-selenium-test-case" />
<antcall target="prepare-virtual-host-name-properties" />
<antcall target="start-selenium" />
<antcall target="run-jetty" inheritAll="false">
<param name="test.class" value="${test.class}" />
</antcall>
<antcall target="stop-selenium" />
</target>
</project>