forked from liferay/liferay-portal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-test-jboss.xml
143 lines (116 loc) · 4.18 KB
/
build-test-jboss.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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
<?xml version="1.0"?>
<project name="portal-test-jboss" basedir="." default="test" xmlns:antelope="antlib:ise.antelope.tasks">
<import file="build-test.xml" />
<target name="run-jboss">
<antcall target="clean-up-logs" />
<record action="start" name="log" />
<antcall target="run-simple-server">
<param name="simple.server.dir" value="${app.server.jboss.dir}" />
<param name="simple.server.bin.dir" value="${app.server.jboss.bin.dir}" />
<param name="simple.server.deploy.dir" value="${app.server.jboss.deploy.dir}" />
<param name="simple.server.lib.global.dir" value="${app.server.jboss.lib.global.dir}" />
<param name="simple.server.portal.dir" value="${app.server.jboss.portal.dir}" />
<param name="simple.server.start.executable" value="standalone${file.suffix.bat}" />
<param name="simple.server.start.executable.arg.line" value="" />
<param name="simple.server.stop.executable" value="jboss-cli${file.suffix.bat}" />
<param name="simple.server.stop.executable.arg.line" value="--connect command=:shutdown" />
</antcall>
<record action="stop" name="log" />
<antcall target="evaluate-logs" />
</target>
<target name="run-selenium-jboss">
<if>
<not>
<isset property="build.app.server" />
</not>
<then>
<ant antfile="build-dist.xml" target="build-dist-jboss" />
</then>
</if>
<antcall target="revert-test-properties" />
<antcall target="prepare-virtual-host-name-properties" />
<antcall target="start-selenium" />
<antcall target="run-jboss">
<param name="test.class" value="${test.name}" />
</antcall>
<antcall target="stop-selenium" />
</target>
<target name="run-selenium-versioned-jboss">
<if>
<equals arg1="${lp.version}" arg2="6.1.1" />
<then>
<property name="file.dir" value="6.1.1-ga2" />
</then>
<else>
<property name="file.dir" value="${lp.version}" />
</else>
</if>
<if>
<not>
<uptodate
srcfile="${hudson.portal.dependencies.dir}/${file.dir}/${bundled.file.name}"
targetfile="${app.server.parent.dir}/${bundled.file.name}"
/>
</not>
<then>
<copy
file="${hudson.portal.dependencies.dir}/${file.dir}/${bundled.file.name}"
todir="${app.server.parent.dir}"
/>
</then>
</if>
<unzip src="${app.server.parent.dir}/${bundled.file.name}" dest="${app.server.parent.dir}" />
<chmod perm="a+x">
<fileset dir="${app.server.parent.dir}">
<include name="**/*.sh" />
</fileset>
</chmod>
<echo file="app.server.${user.name}.properties">app.server.type=jboss
app.server.jboss.dir=${app.server.parent.dir}/${bundled.dir.name}</echo>
<antcall target="revert-test-properties" />
<ant dir="portal-impl" target="deploy-properties" inheritAll="false" />
<replace file="${app.server.parent.dir}/${bundled.dir.name}/modules/com/liferay/portal/main/module.xml">
<replacetoken><![CDATA[<resource-root path="jtds.jar" />]]></replacetoken>
<replacevalue><![CDATA[<resource-root path="jtds.jar" />
<resource-root path="mysql.jar" />]]></replacevalue>
</replace>
<delete dir="${user.home}/liferay" />
<if>
<or>
<equals arg1="${lp.version}" arg2="5.2.5" />
<equals arg1="${lp.version}" arg2="5.2.7" />
<equals arg1="${lp.version}" arg2="5.2.8" />
</or>
<then>
<copy
file="${hudson.license.dependencies.dir}/${lp.version}/license"
todir="${user.home}/liferay/ee"
/>
</then>
<elseif>
<or>
<equals arg1="${lp.version}" arg2="5.2.9" />
<equals arg1="${lp.version}" arg2="6.0.10" />
<equals arg1="${lp.version}" arg2="6.0.11" />
<equals arg1="${lp.version}" arg2="6.0.12" />
<equals arg1="${lp.version}" arg2="6.1.10" />
<equals arg1="${lp.version}" arg2="6.1.20" />
</or>
<then>
<copy todir="${user.home}/liferay/deploy">
<fileset
dir="${hudson.license.dependencies.dir}/${lp.version}"
includes="license-portal-*.xml"
/>
</copy>
</then>
</elseif>
</if>
<antcall target="start-selenium" />
<antcall target="run-jboss" inheritAll="false">
<param name="test.class" value="${test.name}" />
</antcall>
<antcall target="stop-selenium" />
<delete file="app.server.${user.name}.properties" failonerror="false" />
</target>
</project>