-
Notifications
You must be signed in to change notification settings - Fork 143
/
pom.xml
373 lines (322 loc) · 19 KB
/
pom.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
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2021, 2022 Contributors to the Eclipse Foundation. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0, which is available at
http://www.eclipse.org/legal/epl-2.0.
This Source Code may also be made available under the following Secondary
Licenses when the conditions for such availability set forth in the
Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
version 2 with the GNU Classpath Exception, which is available at
https://www.gnu.org/software/classpath/license.html.
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-->
<!--
Usage:
Run full TCK:
mvn clean clean
Run full TCK, debugging remote GlassFish (suspends on port 9009)
mvn clean install -Dglassfish.suspend
Run full TCK, debugging client TCK
mvn clean install -Dsuspend-tck
Run full TCK with security manager (deprecated in principal, but still needed for EE 10 to pass)
mvn clean install -Dglassfish.security.manager
Run all tests in test class
mvn clean install -Drun.test="com/sun/ts/tests/el/api/jakarta_el/methodexpression/ELClient.java"
Run single test:
mvn clean install -Drun.test="com/sun/ts/tests/jacc/web/toolsContracts/Client.java#validateNoInvalidStates_from_standalone"
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.glassfish.main.tests.tck</groupId>
<artifactId>tck</artifactId>
<version>7.0.7-SNAPSHOT</version>
</parent>
<artifactId>glassfish-external-tck-authorization</artifactId>
<packaging>pom</packaging>
<name>TCK: Authorization</name>
<properties>
<ant.home>${project.build.directory}/apache-ant-${ant.version}</ant.home>
<ant.zip.url>https://archive.apache.org/dist/ant/binaries/apache-ant-${ant.version}-bin.zip</ant.zip.url>
<tck.home>${project.build.directory}/authorization-tck</tck.home>
<glassfish.home>${project.build.directory}/glassfish7</glassfish.home>
<glassfish.version>${project.version}</glassfish.version>
<glassfish.asadmin>${glassfish.home}/glassfish/bin/asadmin</glassfish.asadmin>
<tck.tests.home>${tck.home}/src/com/sun/ts/tests</tck.tests.home>
<jacoco.includes>org/glassfish/**\:com/sun/enterprise/**</jacoco.includes>
<port.admin>14848</port.admin>
<port.derby>11527</port.derby>
<port.http>18080</port.http>
<port.https>18181</port.https>
<port.jms>17676</port.jms>
<port.jmx>18686</port.jmx>
<port.orb>13700</port.orb>
<port.orb.mutual>13920</port.orb.mutual>
<port.orb.ssl>13820</port.orb.ssl>
<port.harness.log>12000</port.harness.log>
</properties>
<dependencies>
<dependency>
<groupId>org.glassfish.main.distributions</groupId>
<artifactId>glassfish</artifactId>
<version>${glassfish.version}</version>
<type>zip</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.glassfish.main.tests.tck</groupId>
<artifactId>jakarta-authorization-tck</artifactId>
<version>${project.version}</version>
<type>zip</type>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>com.googlecode.maven-download-plugin</groupId>
<artifactId>download-maven-plugin</artifactId>
<executions>
<execution>
<id>download-authorization-tck</id>
<phase>generate-resources</phase>
<goals>
<goal>wget</goal>
</goals>
</execution>
</executions>
<configuration>
<skip>${skipITs}</skip>
<url>${ant.zip.url}</url>
<unpack>true</unpack>
<outputDirectory>${project.build.directory}</outputDirectory>
</configuration>
</plugin>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<configuration>
<skip>${skipITs}</skip>
</configuration>
<executions>
<execution>
<id>unpack-glassfish</id>
<phase>pre-integration-test</phase>
<goals>
<goal>unpack-dependencies</goal>
</goals>
<configuration>
<includeArtifactIds>glassfish</includeArtifactIds>
<outputDirectory>${project.build.directory}</outputDirectory>
</configuration>
</execution>
<execution>
<id>unpack-tck</id>
<phase>pre-integration-test</phase>
<goals>
<goal>unpack-dependencies</goal>
</goals>
<configuration>
<includeArtifactIds>jakarta-authorization-tck</includeArtifactIds>
<outputDirectory>${project.build.directory}</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<dependencies>
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant</artifactId>
<version>${ant.version}</version>
</dependency>
<dependency>
<groupId>ant-contrib</groupId>
<artifactId>ant-contrib</artifactId>
<version>1.0b3</version>
<exclusions>
<exclusion>
<groupId>ant</groupId>
<artifactId>ant</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<configuration>
<skip>${skipITs}</skip>
</configuration>
<executions>
<execution>
<id>prepare-tck-and-glassfish</id>
<phase>pre-integration-test</phase>
<configuration>
<target xmlns:if="ant:if" xmlns:unless="ant:unless">
<taskdef resource="net/sf/antcontrib/antcontrib.properties"
classpathref="maven.plugin.classpath" />
<!-- Change configuration -->
<replaceregexp file="${tck.home}/bin/ts.jte" byline="true"
match="s1as\.admin\.port=.*"
replace="s1as\.admin\.port=${port.admin}" />
<replaceregexp file="${tck.home}/bin/ts.jte" byline="true"
match="orb\.port=.*"
replace="orb\.port=${port.orb}" />
<replaceregexp file="${tck.home}/bin/ts.jte" byline="true"
match="database\.port=.*"
replace="database\.port=${port.derby}" />
<replaceregexp file="${tck.home}/bin/ts.jte" byline="true"
match="webServerPort=.*"
replace="webServerPort=${port.http}" />
<replaceregexp file="${tck.home}/bin/ts.jte" byline="true"
match="securedWebServicePort=.*"
replace="securedWebServicePort=${port.https}" />
<replaceregexp file="${tck.home}/bin/ts.jte" byline="true"
match="harness\.log\.port=.*"
replace="harness\.log\.port=${port.harness.log}" />
<replaceregexp file="${tck.home}/bin/ts.jte" byline="true"
match="javaee\.level=.*"
replace="javaee\.level=full" />
<replaceregexp file="${tck.home}/bin/ts.jte" byline="true"
match="jacc\.home=.*"
replace="jacc\.home=${glassfish.home}/glassfish" />
<replaceregexp file="${tck.home}/bin/ts.jte" byline="true"
match="report\.dir=.*"
replace="report\.dir=${tck.home}/jacctckreport/jacctck" />
<replaceregexp file="${tck.home}/bin/ts.jte" byline="true"
match="work\.dir=.*"
replace="work\.dir=${tck.home}/jacctckwork/jacctck" />
<replaceregexp file="${tck.home}/bin/ts.jte" byline="true"
match="work\.dir=.*"
replace="work\.dir=${tck.home}/jacctckwork/jacctck" />
<!-- Run just selected subset tests -->
<replaceregexp file="${tck.home}/bin/build.xml" byline="true"
match="</project>"
replace="<property name="all.test.dir" value="com/sun/ts/tests/jacc/,com/sun/ts/tests/signaturetest/jacc,com/sun/ts/tests/common/vehicle/" /> </project>" />
<limit maxwait="60">
<exec executable="${glassfish.asadmin}" dir="${glassfish.home}/glassfish/bin">
<arg value="delete-domain"/>
<arg value="domain1" />
</exec>
<exec executable="${glassfish.asadmin}" dir="${glassfish.home}/glassfish/bin">
<arg value="create-domain"/>
<arg value="--domainproperties=domain.adminPort=${port.admin}:domain.instancePort=${port.http}:http.ssl.port=${port.https}:jms.port=${port.jms}:domain.jmxPort=${port.jmx}:orb.listener.port=${port.orb}:orb.ssl.port=${port.orb.ssl}:orb.mutualauth.port=${port.orb.mutual}" />
<arg value="--user=admin" />
<arg value="--nopassword" />
<arg value="domain1" />
</exec>
<exec executable="${glassfish.asadmin}" dir="${glassfish.home}/glassfish/bin">
<arg value="start-domain"/>
</exec>
<exec executable="${glassfish.asadmin}" dir="${glassfish.home}/glassfish/bin" if:set="glassfish.security.manager">
<arg value="create-jvm-options" />
<arg value="--port=${port.admin}" />
<arg value=""-Djava.security.manager"" />
</exec>
<if>
<isset property="jacoco.version" />
<then>
<exec executable="${glassfish.asadmin}" dir="${glassfish.home}/glassfish/bin">
<arg value="create-jvm-options" />
<arg value="--port=${port.admin}" />
<arg value=""-javaagent\:${settings.localRepository}/org/jacoco/org.jacoco.agent/${jacoco.version}/org.jacoco.agent-${jacoco.version}-runtime.jar=destfile=${project.build.directory}/jacoco-it.exec,includes=${jacoco.includes}"" />
</exec>
</then>
</if>
<exec executable="${glassfish.asadmin}" dir="${glassfish.home}/glassfish/bin">
<arg value="stop-domain"/>
<arg value="domain1"/>
</exec>
</limit>
<mkdir dir="${tck.home}/jacctckreport"/>
<mkdir dir="${tck.home}/jacctckreport/jacctck"/>
<replace file="${tck.home}/bin/xml/ts.top.import.xml">
<replacetoken><![CDATA[<jvmarg value="-Xmx512m"/>]]></replacetoken>
<replacevalue><![CDATA[<jvmarg value="-Xmx512m"/>
<jvmarg value="-Djavatest.security.noSecurityManager=true"/>]]></replacevalue>
</replace>
<replace file="${tck.home}/bin/xml/ts.top.import.xml" if:set="suspend-tck" >
<replacetoken><![CDATA[<jvmarg value="-Xmx512m"/>]]></replacetoken>
<replacevalue><![CDATA[<jvmarg value="-Xmx512m"/>
<jvmarg value="-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=9008"/>]]></replacevalue>
</replace>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
<execution>
<id>configure-tck-tests</id>
<phase>pre-integration-test</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target xmlns:if="ant:if" xmlns:unless="ant:unless">
<taskdef resource="net/sf/antcontrib/antcontrib.properties"
classpathref="maven.plugin.classpath" />
<limit maxwait="20">
<exec executable="${glassfish.asadmin}" dir="${glassfish.home}/glassfish/bin">
<arg value="start-domain"/>
</exec>
</limit>
<exec executable="${ant.home}/bin/ant" dir="${tck.home}/bin">
<arg value="config.vi" />
<env key="tck.home" value="${tck.home}"/>
</exec>
<exec executable="${ant.home}/bin/ant" dir="${tck.home}/bin">
<arg value="enable.jacc" />
<env key="tck.home" value="${tck.home}"/>
</exec>
<!-- Restart GlassFish in debug mode if so requested -->
<sequential if:set="glassfish.suspend">
<exec executable="${glassfish.asadmin}" dir="${glassfish.home}/glassfish/bin">
<arg value="stop-domain" />
</exec>
<echo message="Starting GlassFish in suspended mode, waiting on port 9009" />
<exec executable="${glassfish.asadmin}" dir="${glassfish.home}/glassfish/bin">
<arg value="start-domain"/>
<arg value="--suspend" if:set="glassfish.suspend"/>
</exec>
</sequential>
</target>
</configuration>
</execution>
<execution>
<id>run-tck-tests</id>
<phase>integration-test</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target xmlns:if="ant:if" xmlns:unless="ant:unless">
<taskdef resource="net/sf/antcontrib/antcontrib.properties"
classpathref="maven.plugin.classpath" />
<echo level="info" message="Start running all tests" />
<exec executable="${ant.home}/bin/ant" dir="${tck.tests.home}" resultproperty="testResult">
<arg value="-Dmultiple.tests=${run.test}" if:set="run.test" />
<arg value="deploy"/>
<arg value="run.all" unless:set="run.test"/>
<arg value="runclient" if:set="run.test" />
<env key="LC_ALL" value="C" />
</exec>
<if>
<not>
<equals arg1="${testResult}" arg2="0" />
</not>
<then>
<echo message="Running tests failed." />
<loadfile property="contents" srcFile="${glassfish.home}/glassfish/domains/domain1/logs/server.log" />
<echo message="${contents}" />
</then>
</if>
<exec executable="${glassfish.asadmin}" dir="${glassfish.home}/glassfish/bin">
<arg value="stop-domain" />
</exec>
</target>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>