forked from liferay/liferay-portal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild-test-websphere-7.0.xml
131 lines (94 loc) · 3.96 KB
/
build-test-websphere-7.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
<?xml version="1.0"?>
<project name="portal-test-websphere-7.0" basedir="." default="test" xmlns:antelope="antlib:ise.antelope.tasks">
<import file="build-test.xml" />
<target name="run-selenium-websphere-7.0">
<antcall target="prepare-vm-server">
<param name="vm.vmdk.suffix" value="websphere-7.0.0.7" />
</antcall>
<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"
/>
</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 C:\Progra~1\IBM\WebSphere\AppServer\profiles\AppSrv01\bin\startServer.bat server1" />
</exec>
<echo file="wsadmin.py">print AdminApp.list()
print AdminApp.uninstall('DefaultApplication')
print AdminConfig.save()
print AdminApp.install('C:/liferay-portal-${lp.version}.war', '[-appname liferay-portal -contextroot /]')
print AdminConfig.save()
print AdminApp.list()
print AdminApp.install('C:/tunnel-web.war', '[-appname liferay-tunnel-web -contextroot /tunnel-web]')
print AdminConfig.save()
print AdminApp.list()
appManager = AdminControl.queryNames('type=ApplicationManager,process=server1,*')
print appManager
print AdminControl.invoke(appManager, 'startApplication', 'liferay-portal')
print AdminControl.invoke(appManager, 'startApplication', 'liferay-tunnel-web')</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>
<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="start-selenium" />
<antcall target="run-websphere-7.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-7.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>
</target>
</project>