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 >
0 commit comments