forked from liferay/liferay-portal
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild-test-jsf.xml
More file actions
233 lines (204 loc) · 7.14 KB
/
Copy pathbuild-test-jsf.xml
File metadata and controls
233 lines (204 loc) · 7.14 KB
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 basedir="./" name="portal-test-batch" xmlns:antelope="antlib:ise.antelope.tasks" xmlns:if="ant:if" xmlns:unless="ant:unless">
<import file="./build-test-batch.xml" />
<target name="build-jsf-artifacts" unless="liferay.faces.skip.build">
<execute dir="${liferay.faces.util.dir}">
mvn clean install -P liferay,thin -U -Dbnd.baseline.skip=true
</execute>
<execute dir="${liferay.faces.bridge.api.dir}/bridge-api">
mvn clean install -P liferay,thin -U -Dbnd.baseline.skip=true
</execute>
<execute dir="${liferay.faces.bridge.ext.dir}/bridge-ext">
mvn clean install -U -Dbnd.baseline.skip=true
</execute>
<execute dir="${liferay.faces.showcase.dir}">
mvn clean install -P liferay,thin -U -Dbnd.baseline.skip=true
</execute>
<execute dir="${liferay.faces.alloy.dir}">
mvn clean install -P liferay,thin -U -Dbnd.baseline.skip=true
</execute>
<execute dir="${liferay.faces.bridge.impl.dir}">
mvn clean install -P liferay,thin -U -Dbnd.baseline.skip=true
</execute>
<execute dir="${liferay.faces.portal.dir}">
mvn clean install -P liferay,thin -U -Dbnd.baseline.skip=true
</execute>
</target>
<target name="copy-jsf-artifacts">
<copy
flatten="true"
todir="${liferay.home}/osgi/modules"
>
<fileset
dir="${liferay.faces.util.dir}"
excludes="**/*-javadoc.jar,**/*-sources.jar,**/*-tests.jar"
includes="**/target/com.liferay.faces.util-*.jar"
/>
<fileset
dir="${liferay.faces.bridge.api.dir}"
excludes="**/*-javadoc.jar,**/*-sources.jar,**/*-tests.jar"
includes="**/target/com.liferay.faces.bridge.api-*.jar"
/>
<fileset
dir="${liferay.faces.bridge.ext.dir}"
excludes="**/*-javadoc.jar,**/*-sources.jar,**/*-tests.jar"
includes="**/target/com.liferay.faces.bridge.ext-*.jar"
/>
<fileset
dir="${liferay.faces.bridge.impl.dir}"
excludes="**/*-javadoc.jar,**/*-sources.jar,**/*-tests.jar"
includes="**/target/com.liferay.faces.bridge.impl-*.jar"
/>
<fileset
dir="${liferay.faces.portal.dir}"
excludes="**/*-javadoc.jar,**/*-sources.jar,**/*-tests.jar"
includes="**/target/com.liferay.faces.portal-*.jar"
/>
<fileset
dir="${liferay.faces.alloy.dir}"
excludes="**/*-javadoc.jar,**/*-sources.jar,**/*-tests.jar"
includes="**/target/com.liferay.faces.alloy-*.jar"
/>
</copy>
<mirrors-get
dest="${liferay.home}/osgi/modules/jakarta.faces.jar"
src="https://repository-cdn.liferay.com/nexus/content/groups/public/com/liferay/jakarta.faces/2.3.21.LIFERAY-PATCHED-4.JAKARTA-LIFERAY-PATCHED-1/jakarta.faces-2.3.21.LIFERAY-PATCHED-4.JAKARTA-LIFERAY-PATCHED-1.jar"
/>
<mirrors-get
dest="${liferay.home}/osgi/modules/org.primefaces.jar"
src="https://repository-cdn.liferay.com/nexus/content/groups/public/com/liferay/org.primefaces/15.0.6.LIFERAY-PATCHED-1.JAKARTA-LIFERAY-PATCHED-1/org.primefaces-15.0.6.LIFERAY-PATCHED-1.JAKARTA-LIFERAY-PATCHED-1.jar"
/>
</target>
<target name="deploy-jsf-war">
<get-testcase-property property.name="liferay.faces.war.file.names" />
<if>
<isset property="liferay.faces.war.file.names" />
<then>
<for list="${liferay.faces.war.file.names}" param="war.file.name">
<sequential>
<copy
flatten="true"
todir="${liferay.home}/osgi/war"
>
<fileset
dir="${liferay.faces.alloy.dir}"
erroronmissingdir="false"
includes="**/target/@{war.file.name}-*.war"
/>
<fileset
dir="${liferay.faces.bridge.api.dir}"
erroronmissingdir="false"
includes="**/target/@{war.file.name}-*.war"
/>
<fileset
dir="${liferay.faces.bridge.ext.dir}"
erroronmissingdir="false"
includes="**/target/@{war.file.name}-*.war"
/>
<fileset
dir="${liferay.faces.bridge.impl.dir}"
erroronmissingdir="false"
includes="**/target/@{war.file.name}-*.war"
/>
<fileset
dir="${liferay.faces.portal.dir}"
erroronmissingdir="false"
includes="**/target/@{war.file.name}-*.war"
/>
<fileset
dir="${liferay.faces.showcase.dir}"
erroronmissingdir="false"
includes="**/target/@{war.file.name}-*.war"
/>
<fileset
dir="${liferay.faces.util.dir}"
erroronmissingdir="false"
includes="**/target/@{war.file.name}-*.war"
/>
<mapper
from="^.*@{war.file.name}-.*\.war$"
to="@{war.file.name}.war"
type="regexp"
/>
</copy>
</sequential>
</for>
</then>
</if>
</target>
<target name="prepare-jsf-app-server">
<property name="max.metaspace.size" value="-XX:MaxMetaspaceSize=1024m" />
<propertycopy from="app.server.${app.server.type}.bin.dir" name="test.app.server.bin.dir" />
<replaceregexp
file="${test.app.server.bin.dir}/setenv.sh"
flags="gi"
match="-XX:MaxMetaspaceSize=[0-9]+[a-zA-Z]+"
replace="${max.metaspace.size}"
/>
<replaceregexp
file="${test.app.server.bin.dir}/setenv.bat"
flags="gi"
match="-XX:MaxMetaspaceSize=[0-9]+[a-zA-Z]+"
replace="${max.metaspace.size}"
/>
<if>
<not>
<or>
<resourcecontains
resource="${test.app.server.bin.dir}/setenv.sh"
substring="${max.metaspace.size}"
/>
<resourcecontains
resource="${test.app.server.bin.dir}/setenv.bat"
substring="${max.metaspace.size}"
/>
</or>
</not>
<then>
<fail message="Unable to set custom max metaspace of "${max.metaspace.size}" for ${test.app.server.bin.dir}/setenv.sh and setenv.bat." />
</then>
</if>
<propertycopy from="app.server.${app.server.type}.classes.portal.dir" name="app.server.classes.portal.dir" override="true" />
<echo append="true" file="${app.server.classes.portal.dir}/portal-ext.properties"><![CDATA[
terms.of.use.required=false
users.reminder.queries.enabled=false
users.reminder.queries.custom.question.enabled=false]]></echo>
<local name="portal.ext.properties" />
<loadfile
property="portal.ext.properties"
srcFile="${app.server.classes.portal.dir}/portal-ext.properties"
>
<filterchain>
<tokenfilter>
<replacestring from="captcha.max.challenges=-1" to="" />
</tokenfilter>
<trim />
<ignoreblank />
</filterchain>
</loadfile>
<echo file="${app.server.classes.portal.dir}/portal-ext.properties">${portal.ext.properties}</echo>
<gradle-execute dir="modules/test/portlet-tck-bridge" task="deploy" />
<antcall target="build-jsf-artifacts" />
<antcall target="copy-jsf-artifacts" />
</target>
<target name="run-jsf-tests">
<antcall target="prepare-jsf-app-server" />
<propertycopy from="browser.firefox.bin.file[${liferay.faces.test.browser.version}]" name="browser.firefox.bin.file" silent="true" />
<get-testcase-property property.name="liferay.faces.war.auto.deploy" />
<get-testcase-property property.name="liferay.faces.war.file.names" />
<if>
<and>
<isset property="liferay.faces.war.auto.deploy" />
<isfalse value="${liferay.faces.war.auto.deploy}" />
</and>
<then>
<echo>
Skip deploying war file from ${liferay.faces.war.file.names}
</echo>
</then>
<else>
<antcall target="deploy-jsf-war" />
</else>
</if>
</target>
</project>