forked from Liferay-Patchers-Community/liferay-portal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-test-websphere-8.0.xml
265 lines (210 loc) · 9.21 KB
/
build-test-websphere-8.0.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
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
<?xml version="1.0"?>
<project name="portal-test-websphere-8.0" basedir="." default="test" xmlns:antelope="antlib:ise.antelope.tasks">
<import file="build-test.xml" />
<target name="run-selenium-websphere-8.0">
<antcall target="prepare-vm-server">
<param name="vm.vmdk.suffix" value="websphere-8.0.0.0" />
</antcall>
<exec executable="${plink.executable}">
<arg line="-pw ${vm.password} ${vm.username}@${vm.host} cmd.exe /c C:\Progra~1\IBM\WebSphere\AppServer\profiles\AppSrv01\bin\stopServer.bat server1" />
</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,persistence.jar,postgresql.jar,servlet-api.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>
<exec executable="${pscp.executable}">
<arg line="-pw ${vm.password} ${tstamp.value}\*.jar ${vm.username}@${vm.host}:/Progra~1/IBM/WebSphere/AppServer/lib/ext" />
</exec>
<delete dir="${tstamp.value}" />
<exec executable="${plink.executable}">
<arg line="-pw ${vm.password} ${vm.username}@${vm.host} cmd.exe /c move C:\Progra~1\IBM\WebSphere\AppServer\lib\ext\portlet.jar C:\Progra~1\IBM\WebSphere\AppServer\java\jre\lib\ext" />
</exec>
<exec executable="${plink.executable}">
<arg line="-pw ${vm.password} ${vm.username}@${vm.host} cmd.exe /c move C:\Progra~1\IBM\WebSphere\AppServer\lib\ext\servlet-api.jar C:\Progra~1\IBM\WebSphere\AppServer\java\jre\lib\ext" />
</exec>
<exec executable="${pscp.executable}">
<arg line="-pw ${vm.password} ${vm.username}@${vm.host}:/Progra~1/IBM/WebSphere/AppServer/profiles/AppSrv01/config/cells/liferay-ead7385Node01Cell/nodes/liferay-ead7385Node01/servers/server1/server.xml server.xml" />
</exec>
<replace file="server.xml">
<replacefilter token="genericJvmArguments=""" value="genericJvmArguments="-Dfile.encoding=UTF8 -Xk22000 -Xp64k,16k"" />
<replacefilter token="verboseModeGarbageCollection="false"" value="verboseModeGarbageCollection="true"" />
<replacefilter token="verboseModeJNI="false"" value="verboseModeJNI="false" initialHeapSize="256" maximumHeapSize="1024"" />
<replacefilter token="xmi:id="DynamicCache_" value="defaultPriority="3" hashSize="0" cacheSize="3000" xmi:id="DynamicCache_" />
</replace>
<exec executable="${pscp.executable}">
<arg line="-pw ${vm.password} server.xml ${vm.username}@${vm.host}:/Progra~1/IBM/WebSphere/AppServer/profiles/AppSrv01/config/cells/liferay-ead7385Node01Cell/nodes/liferay-ead7385Node01/servers/server1/server.xml" />
</exec>
<delete file="server.xml" />
<exec executable="${plink.executable}">
<arg line="-pw ${vm.password} ${vm.username}@${vm.host} cmd.exe /c C:\Progra~1\IBM\WebSphere\AppServer\profiles\AppSrv01\bin\startServer.bat server1" />
</exec>
<echo file="wsadmin.py">print AdminApp.list()
print AdminApp.install('C:/liferay-portal-${lp.version}.war', '[-appname liferay-portal -contextroot /]')
print AdminConfig.save()
print AdminApp.list()
appManager = AdminControl.queryNames('type=ApplicationManager,process=server1,*')
print appManager
print AdminControl.invoke(appManager, 'startApplication', 'liferay-portal')</echo>
<exec executable="${pscp.executable}">
<arg line="-pw ${vm.password} wsadmin.py ${vm.username}@${vm.host}:/" />
</exec>
<delete file="wsadmin.py" />
<exec executable="${plink.executable}">
<arg line="-pw ${vm.password} ${vm.username}@${vm.host} cmd.exe /c C:\Progra~1\IBM\WebSphere\AppServer\bin\wsadmin.bat -f C:\wsadmin.py" />
</exec>
<exec executable="${plink.executable}">
<arg line="-pw ${vm.password} ${vm.username}@${vm.host} cmd.exe /c C:\Progra~1\IBM\WebSphere\AppServer\profiles\AppSrv01\bin\stopServer.bat server1" />
</exec>
<if>
<or>
<isset property="hook.plugins.includes" />
<isset property="plugins.version.includes" />
<isset property="portlet.plugins.includes" />
<isset property="portlet.plugins.upgrade.includes" />
<isset property="theme.plugins.includes" />
<isset property="web.plugins.includes" />
</or>
<then>
<exec executable="${plink.executable}">
<arg line="-pw ${vm.password} ${vm.username}@${vm.host} cmd.exe /c C:\Progra~1\IBM\WebSphere\AppServer\profiles\AppSrv01\bin\startServer.bat server1" />
</exec>
</then>
</if>
<if>
<isset property="hook.plugins.includes" />
<then>
<ant antfile="build-test-plugins.xml" target="deploy-websphere-8.0-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-websphere-8.0-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-websphere-8.0-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-websphere-8.0-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-websphere-8.0-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-websphere-8.0-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>
<if>
<or>
<isset property="hook.plugins.includes" />
<isset property="plugins.version.includes" />
<isset property="portlet.plugins.includes" />
<isset property="portlet.plugins.upgrade.includes" />
<isset property="theme.plugins.includes" />
<isset property="web.plugins.includes" />
</or>
<then>
<exec executable="${plink.executable}">
<arg line="-pw ${vm.password} ${vm.username}@${vm.host} cmd.exe /c C:\Progra~1\IBM\WebSphere\AppServer\profiles\AppSrv01\bin\stopServer.bat server1" />
</exec>
</then>
</if>
<antcall target="revert-test-properties" />
<replace
file="portal-impl/test/test-portal-impl.properties"
token="localhost:8080"
value="${vm.host}:9080"
/>
<replace
file="portal-web/test/test-portal-web.properties"
token="localhost:8080"
value="${vm.host}:9080"
/>
<antcall target="prepare-selenium" />
<antcall target="start-selenium" />
<antcall target="run-websphere-8.0">
<param name="test.class" value="${test.name}" />
</antcall>
<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-websphere-8.0">
<antcall target="rebuild-database" inheritAll="false" />
<exec executable="${plink.executable}">
<arg line="-pw ${vm.password} ${vm.username}@${vm.host} cmd.exe /c C:\Progra~1\IBM\WebSphere\AppServer\profiles\AppSrv01\bin\startServer.bat server1" />
</exec>
<antcall target="run-selenium-test" />
<exec executable="${plink.executable}">
<arg line="-pw ${vm.password} ${vm.username}@${vm.host} cmd.exe /c C:\Progra~1\IBM\WebSphere\AppServer\profiles\AppSrv01\bin\stopServer.bat server1" />
</exec>
<antcall target="clean-up-logs" />
<tstamp>
<format property="log.tstamp.value" pattern="yyyy-MM-dd" />
</tstamp>
<exec executable="${pscp.executable}">
<arg line="-pw ${vm.password} ${vm.username}@${vm.host}:/WINDOWS/system32/config/systemprofile/liferay/logs/liferay.${log.tstamp.value}.log log" />
</exec>
<antcall target="evaluate-logs">
<param name="print.logs" value="true" />
<param name="test.evaluate.logs" value="true" />
</antcall>
</target>
</project>