Cleanup cherrypick to 6.x

Signed-off-by: Arjan Tijms <arjan.tijms@gmail.com>
Signed-off-by: David Matějček <dmatej@seznam.cz>
diff --git a/appserver/tests/tck/authentication/pom.xml b/appserver/tests/tck/authentication/pom.xml
index 445ad8c..549cb73 100644
--- a/appserver/tests/tck/authentication/pom.xml
+++ b/appserver/tests/tck/authentication/pom.xml
@@ -34,16 +34,16 @@
     <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}/authentication-tck</tck.home>
-        <tck.tests.home>${tck.home}/src/com/sun/ts/tests/jsf</tck.tests.home> 
-         
+        <tck.tests.home>${tck.home}/src/com/sun/ts/tests/jsf</tck.tests.home>
+
         <glassfish.home>${project.build.directory}/glassfish6</glassfish.home>
         <glassfish.version>${project.version}</glassfish.version>
         <glassfish.asadmin>${glassfish.home}/glassfish/bin/asadmin</glassfish.asadmin>
-       
+
         <jacoco.includes>org/glassfish/**\:com/sun/enterprise/**</jacoco.includes>
-        
+
         <port.admin>14848</port.admin>
         <port.derby>11527</port.derby>
         <port.http>18080</port.http>
@@ -156,7 +156,7 @@
                             <target xmlns:if="ant:if" xmlns:unless="ant:unless">
                                 <taskdef resource="net/sf/antcontrib/antcontrib.properties"
                                          classpathref="maven.plugin.classpath" />
-                                         
+
                                <macrodef name="tck-setting">
                                     <attribute name="key" /> <attribute name="value" />
                                     <sequential>
@@ -164,22 +164,22 @@
                                         match="@{key}=.*" replace="@{key}=@{value}" />
                                     </sequential>
                                 </macrodef>
-                                
+
                                 <macrodef name="tck-add">
                                     <attribute name="key" /> <attribute name="value" />
                                     <sequential>
                                         <concat append="true" destfile="${tck.home}/bin/ts.jte">@{key}=@{value}${line.separator}</concat>
                                     </sequential>
                                 </macrodef>
-                                
+
 
                                 <!-- Change configuration -->
                                 <copy file="${tck.home}/bin/ts.jte.jdk11" tofile="${tck.home}/bin/ts.jte" overwrite="true"  />
-                                
+
                                 <tck-setting key="jaspic.home" value="${glassfish.home}/glassfish"/>
                                 <tck-setting key="harness.log.traceflag" value="true"/>
                                 <tck-setting key="s1as.jvm.options" value="-Dj2eelogin.name=${user}:-Dj2eelogin.password=${password}"/>
-                                
+
                                 <tck-setting key="webServerHost" value="localhost"/>
                                 <tck-setting key="webServerPort" value="${port.http}"/>
                                 <tck-setting key="securedWebServicePort" value="${port.https}"/>
@@ -188,15 +188,15 @@
                                 <tck-setting key="orb.port" value="${port.orb}"/>
                                 <tck-setting key="database.port" value="${port.derby}"/>
                                 <tck-setting key="harness.log.port" value="${port.harness.log}"/>
-                                
+
                                 <tck-setting key="report.dir" value="${tck.home}/authenticationreport/authentication"/>
                                 <tck-setting key="work.dir" value="${tck.home}/authenticationwork/authentication"/>
-                                
-                                <!-- 
+
+                                <!--
                                     # It's an open question why these settings are not just part of ts.jte to begin with.
                                     # It's also an open question why the Authentication TCK insists on these being defined
                                 -->
-                                
+
                                 <tck-add key="persistence.unit.name.2" value="JPATCK2"/>
                                 <tck-add key="persistence.unit.name" value="CTS-EM"/>
                                 <tck-add key="jakarta.persistence.provider" value="org.eclipse.persistence.jpa.PersistenceProvider"/>
@@ -206,7 +206,7 @@
                                 <tck-add key="jakarta.persistence.jdbc.password" value="cts1"/>
                                 <tck-add key="jpa.provider.implementation.specific.properties" value="eclipselink.logging.level=OFF"/>
                                 <tck-add key="persistence.second.level.caching.supported" value="true"/>
-                          
+
                                 <limit maxwait="60">
                                     <exec executable="${glassfish.asadmin}" dir="${glassfish.home}/glassfish/bin">
                                         <arg value="delete-domain"/>
@@ -240,13 +240,13 @@
                                 </limit>
                                 <mkdir dir="${tck.home}/authenticationtckreport"/>
                                 <mkdir dir="${tck.home}/authenticationtckreport/authenticationtck"/>
-                                
+
                                 <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"/>
@@ -274,7 +274,7 @@
                                         <arg value="start-domain"/>
                                     </exec>
                                 </limit>
-                                
+
                                 <exec executable="${ant.home}/bin/ant" dir="${tck.home}/bin">
                                     <arg value="config.vi"  />
                                 </exec>
@@ -284,7 +284,7 @@
                             </target>
                         </configuration>
                     </execution>
-      
+
 
                      <execution>
                         <id>run-tck-tests</id>
diff --git a/appserver/tests/tck/faces/pom.xml b/appserver/tests/tck/faces/pom.xml
index 00fc619..67cc981 100644
--- a/appserver/tests/tck/faces/pom.xml
+++ b/appserver/tests/tck/faces/pom.xml
@@ -34,16 +34,16 @@
     <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}/faces-tck</tck.home>
-        <tck.tests.home>${tck.home}/src/com/sun/ts/tests/jsf</tck.tests.home> 
-         
+        <tck.tests.home>${tck.home}/src/com/sun/ts/tests/jsf</tck.tests.home>
+
         <glassfish.home>${project.build.directory}/glassfish6</glassfish.home>
         <glassfish.version>${project.version}</glassfish.version>
         <glassfish.asadmin>${glassfish.home}/glassfish/bin/asadmin</glassfish.asadmin>
-       
+
         <jacoco.includes>org/glassfish/**\:com/sun/enterprise/**</jacoco.includes>
-        
+
         <port.admin>14848</port.admin>
         <port.derby>11527</port.derby>
         <port.http>18080</port.http>
@@ -111,7 +111,7 @@
                             <outputDirectory>${project.build.directory}</outputDirectory>
                         </configuration>
                     </execution>
-                    <!-- 
+                    <!--
                     <execution>
                         <id>unpack-tck</id>
                         <phase>pre-integration-test</phase>
@@ -158,7 +158,7 @@
                             <target xmlns:if="ant:if" xmlns:unless="ant:unless">
                                 <taskdef resource="net/sf/antcontrib/antcontrib.properties"
                                          classpathref="maven.plugin.classpath" />
-                                         
+
                                <macrodef name="tck-setting">
                                     <attribute name="key" /> <attribute name="value" />
                                     <sequential>
@@ -169,7 +169,7 @@
 
                                 <!-- Change configuration -->
                                 <copy file="${tck.home}/bin/ts.jte.jdk11" tofile="${tck.home}/bin/ts.jte" overwrite="true"  />
-                                
+
                                 <tck-setting key="webServerHost" value="localhost"/>
                                 <tck-setting key="webServerPort" value="${port.http}"/>
                                 <tck-setting key="securedWebServicePort" value="${port.https}"/>
@@ -178,20 +178,20 @@
                                 <tck-setting key="orb.port" value="${port.orb}"/>
                                 <tck-setting key="database.port" value="${port.derby}"/>
                                 <tck-setting key="harness.log.port" value="${port.harness.log}"/>
-                                
+
                                 <tck-setting key="report.dir" value="${tck.home}/facesreport/faces"/>
                                 <tck-setting key="work.dir" value="${tck.home}/faceswork/faces"/>
-                                
+
                                 <tck-setting key="webServerHome" value="${glassfish.home}/glassfish"/>
-                                
+
                                 <replaceregexp file="${tck.home}/bin/ts.jte" byline="true"
                                     match="webServerHome=/ri/glassfish3/glassfish" replace="webServerHome=${glassfish.home}/glassfish" />
-                                 
-                                
+
+
                                 <tck-setting key="impl.vi" value="glassfish"/>
                                 <tck-setting key="impl.vi.deploy.dir" value="${webServerHome}/domains/domain1/autodeploy"/>
                                 <tck-setting key="impl.deploy.timeout.multiplier" value="960"/>
-                                
+
                                 <tck-setting key="jsf.classes" value="${webServerHome}/modules/cdi-api.jar;${webServerHome}/modules/jakarta.servlet.jsp.jstl-api.jar;${webServerHome}/modules/jakarta.inject.jar;${webServerHome}/modules/jakarta.faces.jar;${webServerHome}/modules/jakarta.servlet.jsp-api.jar;${webServerHome}/modules/jakarta.servlet-api.jar;${webServerHome}/modules/jakarta.el.jar"/>
 
                                 <limit maxwait="60">
@@ -227,20 +227,20 @@
                                 </limit>
                                 <mkdir dir="${tck.home}/facesreport"/>
                                 <mkdir dir="${tck.home}/facesreport/faces"/>
-                                
+
                                 <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>
@@ -263,7 +263,7 @@
                                         <arg value="start-domain"/>
                                     </exec>
                                 </limit>
-                                
+
                                 <exec executable="${ant.home}/bin/ant" dir="${tck.tests.home}">
                                     <arg value="-Dutil.dir=${tck.home}"  />
                                     <arg value="deploy.all"  />
@@ -271,7 +271,7 @@
                             </target>
                         </configuration>
                     </execution>
-      
+
 
                      <execution>
                         <id>run-tck-tests</id>
diff --git a/appserver/tests/tck/rest/pom.xml b/appserver/tests/tck/rest/pom.xml
index 4622e02..97ab06c 100644
--- a/appserver/tests/tck/rest/pom.xml
+++ b/appserver/tests/tck/rest/pom.xml
@@ -34,16 +34,16 @@
     <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}/restful-ws-tck</tck.home>
         <tck.tests.home>${tck.home}/src/com/sun/ts/tests</tck.tests.home>
-         
+
         <glassfish.home>${project.build.directory}/glassfish6</glassfish.home>
         <glassfish.version>${project.version}</glassfish.version>
         <glassfish.asadmin>${glassfish.home}/glassfish/bin/asadmin</glassfish.asadmin>
-       
+
         <jacoco.includes>org/glassfish/**\:com/sun/enterprise/**</jacoco.includes>
-        
+
         <port.admin>14848</port.admin>
         <port.derby>11527</port.derby>
         <port.http>18080</port.http>
@@ -156,7 +156,7 @@
                             <target xmlns:if="ant:if" xmlns:unless="ant:unless">
                                 <taskdef resource="net/sf/antcontrib/antcontrib.properties"
                                          classpathref="maven.plugin.classpath" />
-                                         
+
                                <macrodef name="tck-setting">
                                     <attribute name="key" /> <attribute name="value" />
                                     <sequential>
@@ -167,7 +167,7 @@
 
                                 <!-- Change configuration -->
                                 <copy file="${tck.home}/bin/ts.jte.jdk11" tofile="${tck.home}/bin/ts.jte" overwrite="true"  />
-                                
+
                                 <tck-setting key="webServerHost" value="localhost"/>
                                 <tck-setting key="webServerPort" value="${port.http}"/>
                                 <tck-setting key="securedWebServicePort" value="${port.https}"/>
@@ -176,16 +176,16 @@
                                 <tck-setting key="orb.port" value="${port.orb}"/>
                                 <tck-setting key="database.port" value="${port.derby}"/>
                                 <tck-setting key="harness.log.port" value="${port.harness.log}"/>
-                                
+
                                 <tck-setting key="report.dir" value="${tck.home}/restreport/rest"/>
                                 <tck-setting key="work.dir" value="${tck.home}/restwork/rest"/>
-                                
+
                                 <tck-setting key="web.home" value="${glassfish.home}/glassfish"/>
                                 <tck-setting key="impl.vi" value="glassfish"/>
                                 <tck-setting key="impl.vi.deploy.dir" value="${web.home}/domains/domain1/autodeploy"/>
-                                
+
                                 <tck-setting key="jaxrs_impl_name" value="jersey"/>
-                                
+
                                 <tck-setting key="jaxrs_impl.classes" value="${web.home}/modules/jakarta.json.jar:${web.home}/modules/jakarta.json.bind-api.jar:${web.home}/modules/jakarta.json.jar:${web.home}/modules/jsonp-jaxrs.jar:${web.home}/modules/jersey-client.jar:${web.home}/modules/jersey-common.jar:${web.home}/modules/jersey-server.jar:${web.home}/modules/jersey-container-servlet.jar:${web.home}/modules/jersey-container-servlet-core.jar:${web.home}/modules/jersey-media-jaxb.jar:${web.home}/modules/jersey-media-sse.jar:${web.home}/modules/jersey-hk2.jar:${web.home}/modules/osgi-resource-locator.jar:${web.home}/modules/jakarta.inject-api.jar:${web.home}/modules/guava.jar:${web.home}/modules/hk2-api.jar:${web.home}/modules/hk2-locator.jar:${web.home}/modules/hk2-utils.jar:${web.home}/modules/javassist.jar:${web.home}/modules/cglib.jar:${web.home}/modules/jakarta.annotation-api.jar:${web.home}/modules/jakarta.xml.bind-api.jar:${web.home}/modules/jakarta.activation.jar"/>
                                 <tck-setting key="jaxrs_impl_lib" value="${web.home}/modules/jersey-container-servlet-core.jar"/>
                                 <tck-setting key="jaxrs.classes" value="${web.home}/modules/jakarta.ws.rs-api.jar"/>
@@ -225,13 +225,13 @@
                                 </limit>
                                 <mkdir dir="${tck.home}/resttckreport"/>
                                 <mkdir dir="${tck.home}/resttckreport/resttck"/>
-                                
+
                                 <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"/>
@@ -272,7 +272,7 @@
                             </target>
                         </configuration>
                     </execution>
-      
+
 
                      <execution>
                         <id>run-tck-tests</id>
diff --git a/appserver/tests/tck/tck-download/jakarta-authentication-tck/pom.xml b/appserver/tests/tck/tck-download/jakarta-authentication-tck/pom.xml
index a9a8cb5..c87aa71 100644
--- a/appserver/tests/tck/tck-download/jakarta-authentication-tck/pom.xml
+++ b/appserver/tests/tck/tck-download/jakarta-authentication-tck/pom.xml
@@ -32,7 +32,8 @@
     <name>TCK: Install Jakarta Authentication TCK</name>
 
     <properties>
-        <tck.test.authentication.url>https://download.eclipse.org/ee4j/jakartaee-tck/jakartaee9-eftl/promoted/jakarta-authentication-tck-2.0.1.zip</tck.test.authentication.url>
+        <tck.test.authentication.file>jakarta-authentication-tck-2.0.1.zip</tck.test.authentication.file>
+        <tck.test.authentication.url>https://download.eclipse.org/ee4j/jakartaee-tck/jakartaee10/staged/eftl/${tck.test.authentication.file}</tck.test.authentication.url>
     </properties>
 
     <build>
@@ -65,7 +66,7 @@
                             <goal>install-file</goal>
                         </goals>
                         <configuration>
-                            <file>${project.build.directory}/jakarta-authentication-tck-2.0.1.zip</file>
+                            <file>${project.build.directory}/${tck.test.authentication.file}</file>
                             <groupId>${project.groupId}</groupId>
                             <artifactId>${project.artifactId}</artifactId>
                             <version>${project.version}</version>
diff --git a/appserver/tests/tck/tck-download/jakarta-authorization-tck/pom.xml b/appserver/tests/tck/tck-download/jakarta-authorization-tck/pom.xml
index e78bcc8..500490c 100644
--- a/appserver/tests/tck/tck-download/jakarta-authorization-tck/pom.xml
+++ b/appserver/tests/tck/tck-download/jakarta-authorization-tck/pom.xml
@@ -32,7 +32,8 @@
     <name>TCK: Install Jakarta Authorization TCK</name>
 
     <properties>
-        <tck.tests.authorization.url>https://download.eclipse.org/ee4j/jakartaee-tck/jakartaee9-eftl/promoted/jakarta-authorization-tck-2.0.1.zip</tck.tests.authorization.url>
+        <tck.test.authorization.file>jakarta-authorization-tck-2.0.1.zip</tck.test.authorization.file>
+        <tck.tests.authorization.url>https://download.eclipse.org/ee4j/jakartaee-tck/jakartaee10/staged/eftl/${tck.test.authorization.file}</tck.tests.authorization.url>
     </properties>
 
     <build>
@@ -65,7 +66,7 @@
                             <goal>install-file</goal>
                         </goals>
                         <configuration>
-                            <file>${project.build.directory}/jakarta-authorization-tck-2.0.1.zip</file>
+                            <file>${project.build.directory}/${tck.test.authorization.file}</file>
                             <groupId>${project.groupId}</groupId>
                             <artifactId>${project.artifactId}</artifactId>
                             <version>${project.version}</version>
diff --git a/appserver/tests/tck/tck-download/jakarta-faces-tck/pom.xml b/appserver/tests/tck/tck-download/jakarta-faces-tck/pom.xml
index b5598cb..9305598 100644
--- a/appserver/tests/tck/tck-download/jakarta-faces-tck/pom.xml
+++ b/appserver/tests/tck/tck-download/jakarta-faces-tck/pom.xml
@@ -32,7 +32,8 @@
     <name>TCK: Install Jakarta Faces TCK</name>
 
     <properties>
-        <tck.test.faces.url>https://download.eclipse.org/ee4j/jakartaee-tck/jakartaee9-eftl/promoted/jakarta-faces-tck-3.0.1.zip</tck.test.faces.url>
+        <tck.test.faces.file>jakarta-faces-tck-3.0.1.zip</tck.test.faces.file>
+        <tck.test.faces.url>https://download.eclipse.org/ee4j/jakartaee-tck/jakartaee10/staged/eftl/${tck.test.faces.file}</tck.test.faces.url>
     </properties>
 
     <build>
@@ -65,7 +66,7 @@
                             <goal>install-file</goal>
                         </goals>
                         <configuration>
-                            <file>${project.build.directory}/jakarta-faces-tck-3.0.1.zip</file>
+                            <file>${project.build.directory}/${tck.test.faces.file}</file>
                             <groupId>${project.groupId}</groupId>
                             <artifactId>${project.artifactId}</artifactId>
                             <version>${project.version}</version>
diff --git a/appserver/tests/tck/tck-download/jakarta-rest-tck/pom.xml b/appserver/tests/tck/tck-download/jakarta-rest-tck/pom.xml
index 448dc66..0fd52fd 100644
--- a/appserver/tests/tck/tck-download/jakarta-rest-tck/pom.xml
+++ b/appserver/tests/tck/tck-download/jakarta-rest-tck/pom.xml
@@ -32,7 +32,8 @@
     <name>TCK: Install Jakarta REST TCK</name>
 
     <properties>
-        <tck.test.rest.url>https://download.eclipse.org/ee4j/jakartaee-tck/jakartaee9-eftl/promoted/jakarta-restful-ws-tck-3.0.2.zip</tck.test.rest.url>
+        <tck.test.rest.file>jakarta-pages-tck-3.0.2.zip</tck.test.rest.file>
+        <tck.test.rest.url>https://download.eclipse.org/ee4j/jakartaee-tck/jakartaee10/staged/eftl/${tck.test.rest.file}</tck.test.rest.url>
     </properties>
 
     <build>
@@ -65,7 +66,7 @@
                             <goal>install-file</goal>
                         </goals>
                         <configuration>
-                            <file>${project.build.directory}/jakarta-restful-ws-tck-3.0.2.zip</file>
+                            <file>${project.build.directory}/${tck.test.rest.file}</file>
                             <groupId>${project.groupId}</groupId>
                             <artifactId>${project.artifactId}</artifactId>
                             <version>${project.version}</version>
diff --git a/appserver/tests/tck/tck-download/pom.xml b/appserver/tests/tck/tck-download/pom.xml
index aca7fa1..c7189fd 100644
--- a/appserver/tests/tck/tck-download/pom.xml
+++ b/appserver/tests/tck/tck-download/pom.xml
@@ -53,7 +53,7 @@
             </plugin>
         </plugins>
     </build>
-    
+
     <profiles>
         <profile>
             <id>tck-all</id>