Skip to content

Commit cf191a3

Browse files
committed
TCK cleanup
- Option to upload tck-downloads to a local Nexus cache - helps to save dependency on network and downloading huge packages - no need to run this part again on rebuild - option to push that to a separate jenkins job - When using deploy plugin, do the upload in the end - Workaround for maven-war-plugin and artifacts without web.xml and servlets - the plugin uses servlet dependency to guess the spec, however now the servlet is not a mandatory dependency for a war file. - Fixed warning about property file encoding - usually we use Latin1 as in old JDKs, but using UTF-8 shouldn't harm here - Synchronzied dependencies - Updated shrinkwrap to 3.3.4 and its "relatives" which were sometimes overriden by other dependency - Arquillian 2.0.0 - Removed connectors-full tck - already covered by TckRunner - Updated Tags TCK - Synchronized TCK standalone projects to use same rules, common dependencies and same macros. - Faces TCK tricked to follow our dependency tree - Arquillian extension changed group id Signed-off-by: David Matějček <[email protected]> # Conflicts: # nucleus/parent/pom.xml
1 parent eb7dc25 commit cf191a3

File tree

72 files changed

+1374
-2528
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+1374
-2528
lines changed

appserver/tests/pom.xml

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,27 @@
119119
<skip>true</skip>
120120
</configuration>
121121
</plugin>
122+
<!-- Deploy this pom, but no children except ... -->
122123
<plugin>
123124
<artifactId>maven-deploy-plugin</artifactId>
124-
<configuration>
125-
<skip>true</skip>
126-
</configuration>
125+
<executions>
126+
<execution>
127+
<id>default-deploy</id>
128+
<phase>disabled</phase>
129+
</execution>
130+
<execution>
131+
<id>default-deploy-tests</id>
132+
<phase>deploy</phase>
133+
<goals>
134+
<goal>deploy</goal>
135+
</goals>
136+
<inherited>false</inherited>
137+
<configuration>
138+
<!-- To keep consistency with nucleus-parent -->
139+
<skip>${deploy.skip}</skip>
140+
</configuration>
141+
</execution>
142+
</executions>
127143
</plugin>
128144
</plugins>
129145
</build>

appserver/tests/tck/activation/pom.xml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,20 +34,14 @@
3434
<properties>
3535
<ant.home>${project.build.directory}/apache-ant-${ant.version}</ant.home>
3636
<ant.zip.url>https://archive.apache.org/dist/ant/binaries/apache-ant-${ant.version}-bin.zip</ant.zip.url>
37-
3837
<tck.home>${project.build.directory}/activation-tck</tck.home>
39-
40-
<glassfish.home>${project.build.directory}/glassfish7</glassfish.home>
41-
<glassfish.version>${project.version}</glassfish.version>
4238
</properties>
4339

4440
<dependencies>
4541
<dependency>
4642
<groupId>org.glassfish.main.distributions</groupId>
4743
<artifactId>glassfish</artifactId>
48-
<version>${glassfish.version}</version>
4944
<type>zip</type>
50-
<scope>test</scope>
5145
</dependency>
5246
<dependency>
5347
<groupId>org.glassfish.main.tests.tck</groupId>

appserver/tests/tck/authentication/pom.xml

Lines changed: 114 additions & 70 deletions
Large diffs are not rendered by default.

appserver/tests/tck/authorization/pom.xml

Lines changed: 85 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
33
4-
Copyright (c) 2021, 2022 Contributors to the Eclipse Foundation. All rights reserved.
4+
Copyright (c) 2021, 2025 Contributors to the Eclipse Foundation. All rights reserved.
55
66
This program and the accompanying materials are made available under the
77
terms of the Eclipse Public License v. 2.0, which is available at
@@ -71,12 +71,12 @@ mvn clean install -Drun.test="com/sun/ts/tests/jacc/web/toolsContracts/Client.ja
7171
<properties>
7272
<ant.home>${project.build.directory}/apache-ant-${ant.version}</ant.home>
7373
<ant.zip.url>https://archive.apache.org/dist/ant/binaries/apache-ant-${ant.version}-bin.zip</ant.zip.url>
74+
7475
<tck.home>${project.build.directory}/authorization-tck</tck.home>
75-
<glassfish.home>${project.build.directory}/glassfish7</glassfish.home>
76-
<glassfish.version>${project.version}</glassfish.version>
77-
<glassfish.asadmin>${glassfish.home}/glassfish/bin/asadmin</glassfish.asadmin>
7876
<tck.tests.home>${tck.home}/src/com/sun/ts/tests</tck.tests.home>
77+
7978
<jacoco.includes>org/glassfish/**\:com/sun/enterprise/**</jacoco.includes>
79+
8080
<port.admin>14848</port.admin>
8181
<port.derby>11527</port.derby>
8282
<port.http>18080</port.http>
@@ -93,9 +93,7 @@ mvn clean install -Drun.test="com/sun/ts/tests/jacc/web/toolsContracts/Client.ja
9393
<dependency>
9494
<groupId>org.glassfish.main.distributions</groupId>
9595
<artifactId>glassfish</artifactId>
96-
<version>${glassfish.version}</version>
9796
<type>zip</type>
98-
<scope>test</scope>
9997
</dependency>
10098
<dependency>
10199
<groupId>org.glassfish.main.tests.tck</groupId>
@@ -117,14 +115,14 @@ mvn clean install -Drun.test="com/sun/ts/tests/jacc/web/toolsContracts/Client.ja
117115
<goals>
118116
<goal>wget</goal>
119117
</goals>
118+
<configuration>
119+
<skip>${skipITs}</skip>
120+
<url>${ant.zip.url}</url>
121+
<unpack>true</unpack>
122+
<outputDirectory>${project.build.directory}</outputDirectory>
123+
</configuration>
120124
</execution>
121125
</executions>
122-
<configuration>
123-
<skip>${skipITs}</skip>
124-
<url>${ant.zip.url}</url>
125-
<unpack>true</unpack>
126-
<outputDirectory>${project.build.directory}</outputDirectory>
127-
</configuration>
128126
</plugin>
129127

130128
<plugin>
@@ -185,47 +183,74 @@ mvn clean install -Drun.test="com/sun/ts/tests/jacc/web/toolsContracts/Client.ja
185183
<execution>
186184
<id>prepare-tck-and-glassfish</id>
187185
<phase>pre-integration-test</phase>
186+
<goals>
187+
<goal>run</goal>
188+
</goals>
188189
<configuration>
189190
<target xmlns:if="ant:if" xmlns:unless="ant:unless">
190191
<taskdef resource="net/sf/antcontrib/antcontrib.properties"
191-
classpathref="maven.plugin.classpath" />
192-
193-
<!-- Change configuration -->
194-
<replaceregexp file="${tck.home}/bin/ts.jte" byline="true"
195-
match="s1as\.admin\.port=.*"
196-
replace="s1as\.admin\.port=${port.admin}" />
197-
<replaceregexp file="${tck.home}/bin/ts.jte" byline="true"
198-
match="orb\.port=.*"
199-
replace="orb\.port=${port.orb}" />
192+
classpathref="maven.plugin.classpath" />
193+
194+
<macrodef name="tck-property-update">
195+
<attribute name="key" />
196+
<attribute name="value" />
197+
<sequential>
198+
<replaceregexp byline="true"
199+
file="${tck.home}/bin/ts.jte"
200+
match="@{key}=.*"
201+
replace="@{key}=@{value}" />
202+
</sequential>
203+
</macrodef>
204+
<macrodef name="tck-property-add">
205+
<attribute name="key" />
206+
<attribute name="value" />
207+
<sequential>
208+
<concat append="true" destfile="${tck.home}/bin/ts.jte"
209+
>@{key}=@{value}${line.separator}</concat>
210+
</sequential>
211+
</macrodef>
212+
<macrodef name="tck-keystore-suffix">
213+
<attribute name="file" />
214+
<sequential>
215+
<replaceregexp flags="g"
216+
file="@{file}"
217+
match="/cacerts\.jks"
218+
replace="/cacerts.p12" />
219+
<replaceregexp flags="g"
220+
file="@{file}"
221+
match="/keystore\.jks"
222+
replace="/keystore.p12" />
223+
</sequential>
224+
</macrodef>
225+
226+
<property name="jacc.truststore" value="${project.build.directory}/cacerts.p12"/>
227+
<property name="jacc.truststore.password" value="changeit"/>
228+
<property name="s1as.truststore" value="${glassfish.home}/glassfish/domains/domain1/config/cacerts.p12"/>
229+
<property name="s1as.truststore.password" value="changeit"/>
230+
231+
<!-- Customizing the client test parameters -->
200232
<replaceregexp file="${tck.home}/bin/ts.jte" byline="true"
201-
match="database\.port=.*"
202-
replace="database\.port=${port.derby}" />
203-
<replaceregexp file="${tck.home}/bin/ts.jte" byline="true"
204-
match="webServerPort=.*"
205-
replace="webServerPort=${port.http}" />
206-
<replaceregexp file="${tck.home}/bin/ts.jte" byline="true"
207-
match="securedWebServicePort=.*"
208-
replace="securedWebServicePort=${port.https}" />
209-
<replaceregexp file="${tck.home}/bin/ts.jte" byline="true"
210-
match="harness\.log\.port=.*"
211-
replace="harness\.log\.port=${port.harness.log}" />
233+
match="\s+-Djavax\.net\.ssl\.trustStore=\$\{jacc\.home\}/domains/domain1/config/cacerts\.jks"
234+
replace="-Djavax.net.ssl.trustStore=${jacc.truststore} -Djavax.net.ssl.trustStorePassword=${jacc.truststore.password}" />
212235

213-
<replaceregexp file="${tck.home}/bin/ts.jte" byline="true"
214-
match="javaee\.level=.*"
215-
replace="javaee\.level=full" />
216-
<replaceregexp file="${tck.home}/bin/ts.jte" byline="true"
217-
match="jacc\.home=.*"
218-
replace="jacc\.home=${glassfish.home}/glassfish" />
219-
<replaceregexp file="${tck.home}/bin/ts.jte" byline="true"
220-
match="report\.dir=.*"
221-
replace="report\.dir=${tck.home}/jacctckreport/jacctck" />
222-
<replaceregexp file="${tck.home}/bin/ts.jte" byline="true"
223-
match="work\.dir=.*"
224-
replace="work\.dir=${tck.home}/jacctckwork/jacctck" />
236+
<tck-property-update key="s1as.admin.port" value="${port.admin}" />
237+
<tck-property-update key="database.port" value="${port.derby}" />
238+
<tck-property-update key="orb.port" value="${port.orb}" />
239+
<tck-property-update key="webServerPort" value="${port.http}" />
240+
<tck-property-update key="securedWebServicePort" value="${port.https}" />
241+
<tck-property-update key="harness.log.port" value="${port.harness.log}" />
242+
<tck-property-update key="javaee.level" value="full" />
225243

226-
<replaceregexp file="${tck.home}/bin/ts.jte" byline="true"
227-
match="work\.dir=.*"
228-
replace="work\.dir=${tck.home}/jacctckwork/jacctck" />
244+
<tck-property-update key="jacc.home" value="${glassfish.home}/glassfish" />
245+
<tck-property-update key="report.dir" value="${tck.home}/jacctckreport/jacctck" />
246+
<tck-property-update key="work.dir" value="${tck.home}/jacctckwork/jacctck" />
247+
248+
<tck-property-add key="jacc.truststore" value="${jacc.truststore}" />
249+
<tck-property-add key="s1as.truststore" value="${s1as.truststore}" />
250+
251+
<tck-keystore-suffix file="${tck.home}/bin/xml/impl/glassfish/common.xml" />
252+
<tck-keystore-suffix file="${tck.home}/bin/xml/impl/glassfish/s1as.xml" />
253+
<tck-keystore-suffix file="${tck.home}/bin/xml/vi.xml" />
229254

230255
<!-- Run just selected subset tests -->
231256
<replaceregexp file="${tck.home}/bin/build.xml" byline="true"
@@ -246,6 +271,19 @@ mvn clean install -Drun.test="com/sun/ts/tests/jacc/web/toolsContracts/Client.ja
246271
<arg value="domain1" />
247272
<env key="AS_JAVA" value="${java.home}"/>
248273
</exec>
274+
<exec executable="${java.home}/bin/keytool" >
275+
<env key="JAVA_HOME" value="${java.home}" />
276+
<arg line=" -importkeystore"/>
277+
<arg line=" -srcalias s1as"/>
278+
<arg line=" -destalias s1as"/>
279+
<arg line=" -srckeystore ${s1as.truststore}"/>
280+
<arg line=" -noprompt"/>
281+
<arg line=" -trustcacerts"/>
282+
<arg line=" -destkeystore ${jacc.truststore}"/>
283+
<arg line=" -srcstorepass ${s1as.truststore.password}"/>
284+
<arg line=" -deststorepass ${jacc.truststore.password}"/>
285+
</exec>
286+
249287
<exec executable="${glassfish.asadmin}" dir="${glassfish.home}/glassfish/bin" failonerror="true">
250288
<arg value="start-domain"/>
251289
<env key="AS_JAVA" value="${java.home}"/>
@@ -291,9 +329,6 @@ mvn clean install -Drun.test="com/sun/ts/tests/jacc/web/toolsContracts/Client.ja
291329
</replace>
292330
</target>
293331
</configuration>
294-
<goals>
295-
<goal>run</goal>
296-
</goals>
297332
</execution>
298333

299334
<execution>

appserver/tests/tck/cdi/cdi-full/pom.xml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -207,8 +207,6 @@
207207
<dependency>
208208
<groupId>org.testng</groupId>
209209
<artifactId>testng</artifactId>
210-
<version>7.4.0</version>
211-
<scope>test</scope>
212210
</dependency>
213211
<dependency>
214212
<groupId>org.jboss.arquillian.testng</groupId>
@@ -220,14 +218,13 @@
220218
<artifactId>shrinkwrap-descriptors-impl-javaee</artifactId>
221219
<scope>test</scope>
222220
</dependency>
223-
<!--
224-
The Arquillian connector that starts GlassFish and deploys archives to it.
225-
-->
226221
<dependency>
227222
<groupId>org.omnifaces.arquillian</groupId>
228223
<artifactId>arquillian-glassfish-server-managed</artifactId>
229-
<version>1.4</version>
230-
<scope>test</scope>
224+
</dependency>
225+
<dependency>
226+
<groupId>org.glassfish.main</groupId>
227+
<artifactId>glassfish-jul-extension</artifactId>
231228
</dependency>
232229
</dependencies>
233230

@@ -373,9 +370,9 @@
373370
create-jms-resource --restype jakarta.jms.Queue --property Name=queue_test queue_test
374371
create-jms-resource --restype jakarta.jms.Topic --property Name=topic_test topic_test
375372
set configs.config.server-config.cdi-service.enable-implicit-cdi=true
376-
create-file-user --groups student --passwordfile ${project.build.directory}/test-classes/password.txt student
377-
create-file-user --groups printer --passwordfile ${project.build.directory}/test-classes/password.txt printer
378-
create-file-user --groups student:alarm --passwordfile ${project.build.directory}/test-classes/password.txt alarm
373+
--passwordfile ${project.build.directory}/test-classes/password.txt create-file-user --groups student student
374+
--passwordfile ${project.build.directory}/test-classes/password.txt create-file-user --groups printer printer
375+
--passwordfile ${project.build.directory}/test-classes/password.txt create-file-user --groups student:alarm alarm
379376
</glassfish.postBootCommands>
380377
<libPath>${project.build.outputDirectory}</libPath>
381378
<org.jboss.cdi.tck.libraryDirectory>${project.build.directory}/dependency/lib</org.jboss.cdi.tck.libraryDirectory>

appserver/tests/tck/cdi/cdi-model/pom.xml

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
-->
1919
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
2020
<modelVersion>4.0.0</modelVersion>
21-
21+
2222
<parent>
2323
<groupId>org.glassfish.main.tests.tck</groupId>
2424
<artifactId>glassfish-external-tck-cdi-parent</artifactId>
@@ -36,6 +36,11 @@
3636
<artifactId>jakarta.enterprise.cdi-api</artifactId>
3737
<scope>provided</scope>
3838
</dependency>
39+
<dependency>
40+
<groupId>jakarta.ws.rs</groupId>
41+
<artifactId>jakarta.ws.rs-api</artifactId>
42+
<scope>provided</scope>
43+
</dependency>
3944

4045
<dependency>
4146
<groupId>org.jboss.arquillian.junit5</groupId>
@@ -56,14 +61,13 @@
5661
<scope>test</scope>
5762
</dependency>
5863

59-
<!--
60-
The Arquillian connector that starts GlassFish and deploys archives to it.
61-
-->
6264
<dependency>
6365
<groupId>org.omnifaces.arquillian</groupId>
6466
<artifactId>arquillian-glassfish-server-managed</artifactId>
65-
<version>1.4</version>
66-
<scope>test</scope>
67+
</dependency>
68+
<dependency>
69+
<groupId>org.glassfish.main</groupId>
70+
<artifactId>glassfish-jul-extension</artifactId>
6771
</dependency>
6872
</dependencies>
6973

@@ -94,7 +98,7 @@
9498
</execution>
9599
</executions>
96100
</plugin>
97-
101+
98102
<plugin>
99103
<artifactId>maven-dependency-plugin</artifactId>
100104
<executions>
@@ -120,7 +124,7 @@
120124
</execution>
121125
</executions>
122126
</plugin>
123-
127+
124128
<plugin>
125129
<artifactId>maven-surefire-plugin</artifactId>
126130
<configuration>
@@ -156,7 +160,7 @@
156160
</plugin>
157161
</plugins>
158162
</build>
159-
163+
160164
<profiles>
161165
<profile>
162166
<id>full</id>

appserver/tests/tck/cdi/pom.xml

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -39,19 +39,11 @@
3939
</modules>
4040

4141
<properties>
42-
<maven.compiler.release>11</maven.compiler.release>
43-
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
44-
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
45-
4642
<cdi.tck-4-0.version>4.0.13</cdi.tck-4-0.version>
4743

4844
<!-- This matches the htmlunit version in TCK -->
4945
<htmlunit.version>2.50.0</htmlunit.version>
5046
<excluded.groups>se</excluded.groups>
51-
52-
<glassfish.version>${project.version}</glassfish.version>
53-
<glassfish.root>${project.build.directory}</glassfish.root>
54-
<glassfish.home>${glassfish.root}/glassfish7</glassfish.home>
5547
</properties>
5648

5749
<dependencyManagement>
@@ -63,13 +55,6 @@
6355
<scope>import</scope>
6456
<type>pom</type>
6557
</dependency>
66-
<dependency>
67-
<groupId>org.jboss.arquillian</groupId>
68-
<artifactId>arquillian-bom</artifactId>
69-
<version>1.8.0.Final</version>
70-
<scope>import</scope>
71-
<type>pom</type>
72-
</dependency>
7358
</dependencies>
7459
</dependencyManagement>
7560

0 commit comments

Comments
 (0)