forked from liferay/liferay-portal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-test-weblogic-10.3.xml
233 lines (185 loc) · 7.92 KB
/
build-test-weblogic-10.3.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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
<?xml version="1.0"?>
<project name="portal-test-weblogic-10.3" basedir="." default="test" xmlns:antelope="antlib:ise.antelope.tasks">
<import file="build-test.xml" />
<target name="run-selenium-weblogic-10.3">
<antcall target="prepare-vm-server">
<param name="vm.vmdk.suffix" value="weblogic-10.3.2" />
</antcall>
<exec executable="${plink.executable}">
<arg line="-pw ${vm.password} ${vm.username}@${vm.host} cmd.exe /c C:\oracle\middleware\user_projects\domains\base_domain\bin\stopWebLogic.cmd" />
</exec>
<tstamp>
<format property="tstamp.value" pattern="yyyyMMddkkmmssSSS" />
</tstamp>
<unzip src="dist/liferay-portal-dependencies-${lp.version}.zip" dest="${tstamp.value}">
<mapper type="flatten" />
</unzip>
<copy todir="${tstamp.value}">
<fileset
dir="lib/development"
includes="hsql.jar,jtds.jar,mysql.jar,postgresql.jar"
/>
<fileset
dir="lib/portal"
includes="serializer.jar,xalan.jar"
/>
</copy>
<if>
<isset property="jdbc.drivers.optional.dir" />
<then>
<copy todir="${tstamp.value}">
<fileset
dir="${jdbc.drivers.optional.dir}"
includes="*.jar"
/>
</copy>
</then>
</if>
<antcall target="install-vm-java" />
<exec executable="${pscp.executable}">
<arg line="-pw ${vm.password} ${tstamp.value}\*.jar ${vm.username}@${vm.host}:/oracle/middleware/user_projects/domains/base_domain/lib" />
</exec>
<exec executable="${plink.executable}">
<arg line="-pw ${vm.password} ${vm.username}@${vm.host} cmd.exe /c mkdir C:\Java\jdk-1.6.0_23\jre\lib\endorsed" />
</exec>
<exec executable="${plink.executable}">
<arg line="-pw ${vm.password} ${vm.username}@${vm.host} cmd.exe /c move C:\oracle\middleware\user_projects\domains\base_domain\lib\serializer.jar C:\Java\jdk-1.6.0_23\jre\lib\endorsed" />
</exec>
<exec executable="${plink.executable}">
<arg line="-pw ${vm.password} ${vm.username}@${vm.host} cmd.exe /c move C:\oracle\middleware\user_projects\domains\base_domain\lib\xalan.jar C:\Java\jdk-1.6.0_23\jre\lib\endorsed" />
</exec>
<delete dir="${tstamp.value}" />
<exec executable="${pscp.executable}">
<arg line="-pw ${vm.password} ${vm.username}@${vm.host}:/oracle/middleware/user_projects/domains/base_domain/bin/setDomainEnv.cmd setDomainEnv.cmd" />
</exec>
<replace file="setDomainEnv.cmd">
<replacefilter token="set JAVA_PROPERTIES=%JAVA_PROPERTIES% %EXTRA_JAVA_PROPERTIES%" value="set JAVA_PROPERTIES=-Dfile.encoding=UTF8 %JAVA_PROPERTIES% %EXTRA_JAVA_PROPERTIES%" />
<replacefilter token="set MEM_MAX_PERM_SIZE_32BIT=-XX:MaxPermSize=128m" value="set MEM_MAX_PERM_SIZE_32BIT=-XX:MaxPermSize=256m" />
<replacefilter token="set WLS_MEM_ARGS_32BIT=-Xms256m -Xmx512m" value="set WLS_MEM_ARGS_32BIT=-Xms256m -Xmx1024m" />
<replacefilter token="set SUN_JAVA_HOME=C:\Oracle\Middleware\jdk160_14_R27.6.5-32" value="set SUN_JAVA_HOME=C:\Java\jdk-1.6.0_23" />
<replacefilter token="set JAVA_HOME=C:\Oracle\Middleware\jdk160_14_R27.6.5-32" value="set JAVA_HOME=C:\Java\jdk-1.6.0_23" />
</replace>
<exec executable="${pscp.executable}">
<arg line="-pw ${vm.password} setDomainEnv.cmd ${vm.username}@${vm.host}:/oracle/middleware/user_projects/domains/base_domain/bin/setDomainEnv.cmd" />
</exec>
<delete file="setDomainEnv.cmd" />
<parallel>
<exec executable="${plink.executable}">
<arg line="-pw ${vm.password} ${vm.username}@${vm.host} cmd.exe /c C:\oracle\middleware\user_projects\domains\base_domain\bin\startWebLogic.cmd" />
</exec>
<sequential>
<waitfor>
<http url="http://${vm.host}:7001/console" />
</waitfor>
<exec executable="${plink.executable}">
<arg line="-pw ${vm.password} ${vm.username}@${vm.host} C:\Java\jdk-1.6.0_23\bin\java.exe -cp C:\Oracle\Middleware\wlserver_10.3\server\lib\weblogic.jar -Xmx1024m weblogic.Deployer -adminurl t3://localhost:7001 -user system -password password1 -deploy -upload C:\liferay-portal-${lp.version}.war" />
</exec>
<exec executable="${plink.executable}">
<arg line="-pw ${vm.password} ${vm.username}@${vm.host} cmd.exe /c C:\oracle\middleware\user_projects\domains\base_domain\bin\stopWebLogic.cmd" />
</exec>
</sequential>
</parallel>
<if>
<isset property="hook.plugins.includes" />
<then>
<ant antfile="build-test-plugins.xml" target="deploy-weblogic-10.3-plugins">
<property name="plugin.types" value="hooks" />
<property name="plugins.deployed" value="${plugins.deployed}" />
<property name="plugins.includes" value="${hook.plugins.includes}" />
</ant>
<property name="plugins.deployed" value="true" />
</then>
</if>
<if>
<isset property="plugins.version.includes" />
<then>
<ant antfile="build-test-plugins.xml" target="deploy-versioned-weblogic-10.3-plugins">
<property name="plugins.includes" value="${plugins.version.includes}" />
</ant>
</then>
</if>
<if>
<isset property="portlet.plugins.includes" />
<then>
<ant antfile="build-test-plugins.xml" target="deploy-weblogic-10.3-plugins">
<property name="plugin.types" value="portlets" />
<property name="plugins.deployed" value="${plugins.deployed}" />
<property name="plugins.includes" value="${portlet.plugins.includes}" />
</ant>
<property name="plugins.deployed" value="true" />
</then>
</if>
<if>
<isset property="portlet.plugins.upgrade.includes" />
<then>
<ant antfile="build-test-plugins.xml" target="deploy-upgrade-weblogic-10.3-plugins">
<property name="plugin.types" value="portlets" />
<property name="plugins.includes" value="${portlet.plugins.upgrade.includes}" />
</ant>
</then>
</if>
<if>
<isset property="theme.plugins.includes" />
<then>
<ant antfile="build-test-plugins.xml" target="deploy-weblogic-10.3-plugins">
<property name="plugin.types" value="themes" />
<property name="plugins.deployed" value="${plugins.deployed}" />
<property name="plugins.includes" value="${theme.plugins.includes}" />
</ant>
<property name="plugins.deployed" value="true" />
</then>
</if>
<if>
<isset property="web.plugins.includes" />
<then>
<ant antfile="build-test-plugins.xml" target="deploy-weblogic-10.3-plugins">
<property name="plugin.types" value="webs" />
<property name="plugins.deployed" value="${plugins.deployed}" />
<property name="plugins.includes" value="${web.plugins.includes}" />
</ant>
<property name="plugins.deployed" value="true" />
</then>
</if>
<antcall target="revert-test-properties" />
<replace
file="portal-impl/test/test-portal-impl.properties"
token="localhost:8080"
value="${vm.host}:7001"
/>
<replace
file="portal-web/test/test-portal-web.properties"
token="localhost:8080"
value="${vm.host}:7001"
/>
<antcall target="prepare-selenium" />
<antcall target="start-selenium" />
<antcall target="clean-up-logs" />
<record action="start" name="log" />
<antcall target="run-weblogic-10.3">
<param name="test.class" value="${test.name}" />
</antcall>
<record action="stop" name="log" />
<antcall target="evaluate-logs" />
<antcall target="stop-selenium" />
<exec dir="${vm.drive}/${vm.host}" executable="${vmware-cmd.executable}">
<arg line="${vm.drive}\${vm.host}\${vm.host}.vmx stop hard" />
</exec>
</target>
<target name="run-weblogic-10.3">
<antcall target="rebuild-database" inheritAll="false" />
<parallel>
<exec executable="${plink.executable}">
<arg line="-pw ${vm.password} ${vm.username}@${vm.host} cmd.exe /c C:\oracle\middleware\user_projects\domains\base_domain\bin\startWebLogic.cmd" />
</exec>
<sequential>
<waitfor>
<http url="http://${vm.host}:7001/console" />
</waitfor>
<antcall target="run-selenium-test" />
<exec executable="${plink.executable}">
<arg line="-pw ${vm.password} ${vm.username}@${vm.host} cmd.exe /c C:\oracle\middleware\user_projects\domains\base_domain\bin\stopWebLogic.cmd" />
</exec>
</sequential>
</parallel>
</target>
</project>