This is an automated email from the ASF dual-hosted git repository.

reta pushed a commit to branch 4.0.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git


The following commit(s) were added to refs/heads/4.0.x-fixes by this push:
     new aca5b5be11 CXF-9038: Run Jakarta RESTful Web Services 3.0 TCK
aca5b5be11 is described below

commit aca5b5be11eef71eb087aa36fefdf83d3da46128
Author: Andriy Redko <drr...@gmail.com>
AuthorDate: Sat Jul 13 14:03:42 2024 -0400

    CXF-9038: Run Jakarta RESTful Web Services 3.0 TCK
---
 tck/Jenkinsfile     | 51 ++++++++++++++++++++++++++++++---------------------
 tck/ts.jte.template | 38 +++++++++++++++++++++++++-------------
 2 files changed, 55 insertions(+), 34 deletions(-)

diff --git a/tck/Jenkinsfile b/tck/Jenkinsfile
index 05ec0b5b03..92a827d0eb 100644
--- a/tck/Jenkinsfile
+++ b/tck/Jenkinsfile
@@ -10,14 +10,14 @@ pipeline {
     }
     
     environment {
-        ANT_OPTS = "-Djavax.xml.accessExternalSchema=all"
+        ANT_OPTS = "-Xmx2G -Djava.endorsed.dirs=${JAKARTA_JARS}/endorsed 
-Djavax.xml.accessExternalStylesheet=all -Djavax.xml.accessExternalSchema=all 
-DenableExternalEntityProcessing=true -Djavax.xml.accessExternalDTD=file,http"
     }
     
     stages {
         stage("Initialization") {
             steps {
                 script {
-                    currentBuild.displayName = "#${BUILD_NUMBER} CXF 
${params.Version} JAX-RS 2.1 TCK"
+                    currentBuild.displayName = "#${BUILD_NUMBER} CXF 
${params.Version} JAX-RS 3.0 TCK"
                 }
             }
         }
@@ -43,29 +43,29 @@ pipeline {
        stage('Download JakartaEE TCK') {
            steps {
                checkout([$class: 'GitSCM',
-                      branches: [[name: 'refs/tags/8.0.2']],
+                      branches: [[name: 'refs/tags/9.1.x']],
                    userRemoteConfigs: [[url: 
'https://github.com/eclipse-ee4j/jakartaee-tck']],
                    extensions: [[$class: 'RelativeTargetDirectory', 
relativeTargetDir: 'jakartaee-tck']]
                ])
            }
        }
        
-       stage('Download Glassfish 5.1.0') { // for display purposes
+       stage('Download Glassfish 6.2.5') { // for display purposes
            steps {
-               sh 'wget 
https://repo1.maven.org/maven2/org/glassfish/main/distributions/glassfish/5.1.0/glassfish-5.1.0.zip'
-               sh 'unzip glassfish-5.1.0.zip'
-               sh 'rm glassfish-5.1.0.zip'
+               sh 'wget 
https://repo1.maven.org/maven2/org/glassfish/main/distributions/glassfish/6.2.5/glassfish-6.2.5.zip'
+               sh 'unzip glassfish-6.2.5.zip'
+               sh 'rm glassfish-6.2.5.zip'
            }
        }
        
        stage('Download Apache CXF bits') {
            steps {
                echo "Using Apache CXF version: " + params.Version
-               sh "mvn 
org.apache.maven.plugins:maven-dependency-plugin:2.8:get 
-DremoteRepositories=https://repository.apache.org/snapshots,https://repository.apache.org
 -Dartifact=org.apache.cxf:cxf-core:${params.Version}:jar -Dtransitive=false 
-Ddest=glassfish5/glassfish/lib"
-               sh "mvn 
org.apache.maven.plugins:maven-dependency-plugin:2.8:get 
-DremoteRepositories=https://repository.apache.org/snapshots,https://repository.apache.org
 -Dartifact=org.apache.cxf:cxf-rt-frontend-jaxrs:${params.Version}:jar 
-Dtransitive=false -Ddest=glassfish5/glassfish/lib"
-               sh "mvn 
org.apache.maven.plugins:maven-dependency-plugin:2.8:get 
-DremoteRepositories=https://repository.apache.org/snapshots,https://repository.apache.org
 -Dartifact=org.apache.cxf:cxf-rt-rs-client:${params.Version}:jar 
-Dtransitive=false -Ddest=glassfish5/glassfish/lib"
-               sh "mvn 
org.apache.maven.plugins:maven-dependency-plugin:2.8:get 
-DremoteRepositories=https://repository.apache.org/snapshots,https://repository.apache.org
 -Dartifact=org.apache.cxf:cxf-rt-rs-sse:${params.Version}:jar 
-Dtransitive=false -Ddest=glassfish5/glassfish/lib"
-               sh "mvn 
org.apache.maven.plugins:maven-dependency-plugin:2.8:get 
-DremoteRepositories=https://repository.apache.org/snapshots,https://repository.apache.org
 -Dartifact=org.apache.cxf:cxf-rt-transports-http:${params.Version}:jar 
-Dtransitive=false -Ddest=glassfish5/glassfish/lib"
+               sh "mvn 
org.apache.maven.plugins:maven-dependency-plugin:2.8:get 
-DremoteRepositories=https://repository.apache.org/snapshots,https://repository.apache.org
 -Dartifact=org.apache.cxf:cxf-core:${params.Version}:jar -Dtransitive=false 
-Ddest=glassfish6/glassfish/lib"
+               sh "mvn 
org.apache.maven.plugins:maven-dependency-plugin:2.8:get 
-DremoteRepositories=https://repository.apache.org/snapshots,https://repository.apache.org
 -Dartifact=org.apache.cxf:cxf-rt-frontend-jaxrs:${params.Version}:jar 
-Dtransitive=false -Ddest=glassfish6/glassfish/lib"
+               sh "mvn 
org.apache.maven.plugins:maven-dependency-plugin:2.8:get 
-DremoteRepositories=https://repository.apache.org/snapshots,https://repository.apache.org
 -Dartifact=org.apache.cxf:cxf-rt-rs-client:${params.Version}:jar 
-Dtransitive=false -Ddest=glassfish6/glassfish/lib"
+               sh "mvn 
org.apache.maven.plugins:maven-dependency-plugin:2.8:get 
-DremoteRepositories=https://repository.apache.org/snapshots,https://repository.apache.org
 -Dartifact=org.apache.cxf:cxf-rt-rs-sse:${params.Version}:jar 
-Dtransitive=false -Ddest=glassfish6/glassfish/lib"
+               sh "mvn 
org.apache.maven.plugins:maven-dependency-plugin:2.8:get 
-DremoteRepositories=https://repository.apache.org/snapshots,https://repository.apache.org
 -Dartifact=org.apache.cxf:cxf-rt-transports-http:${params.Version}:jar 
-Dtransitive=false -Ddest=glassfish6/glassfish/lib"
 
                echo "Including additional dependencies (woodstox, stax2, ...)"
                sh "mvn 
org.apache.maven.plugins:maven-dependency-plugin:2.8:get 
-DremoteRepositories=https://repository.apache.org/snapshots,https://repository.apache.org
 -Dartifact=org.apache.cxf:cxf-parent:${params.Version}:pom -Dtransitive=false 
-Ddest=."
@@ -76,8 +76,8 @@ pipeline {
                    woodstox_version = sh(returnStdout: true, script: "grep 
'<cxf.woodstox.core.version>' 
cxf-parent-${params.Version}.pom").replaceAll("[\n\r]", 
"").replaceAll(".+[>](.+)[<].+", '$1')
                    staxapi_version = sh(returnStdout: true, script: "grep 
'<cxf.woodstox.stax2-api.version>' 
cxf-parent-${params.Version}.pom").replaceAll("[\n\r]", 
"").replaceAll(".+[>](.+)[<].+", '$1')
 
-                   sh "mvn 
org.apache.maven.plugins:maven-dependency-plugin:2.8:get 
-DremoteRepositories=https://repository.apache.org/snapshots,https://repository.apache.org
 -Dartifact=com.fasterxml.woodstox:woodstox-core:${woodstox_version}:jar 
-Dtransitive=false -Ddest=glassfish5/glassfish/lib"
-                   sh "mvn 
org.apache.maven.plugins:maven-dependency-plugin:2.8:get 
-DremoteRepositories=https://repository.apache.org/snapshots,https://repository.apache.org
 -Dartifact=org.codehaus.woodstox:stax2-api:${staxapi_version}:jar 
-Dtransitive=false -Ddest=glassfish5/glassfish/lib"
+                   sh "mvn 
org.apache.maven.plugins:maven-dependency-plugin:2.8:get 
-DremoteRepositories=https://repository.apache.org/snapshots,https://repository.apache.org
 -Dartifact=com.fasterxml.woodstox:woodstox-core:${woodstox_version}:jar 
-Dtransitive=false -Ddest=glassfish6/glassfish/lib"
+                   sh "mvn 
org.apache.maven.plugins:maven-dependency-plugin:2.8:get 
-DremoteRepositories=https://repository.apache.org/snapshots,https://repository.apache.org
 -Dartifact=org.codehaus.woodstox:stax2-api:${staxapi_version}:jar 
-Dtransitive=false -Ddest=glassfish6/glassfish/lib"
                }
 
                sh "rm cxf-parent-${params.Version}.pom"
@@ -87,11 +87,11 @@ pipeline {
        stage('Prepare JAX-RS TCK build configuration') {
            steps {
               withEnv(["WORKSPACE = ${PWD}"]) {
-                sh "wget 
https://raw.githubusercontent.com/apache/cxf/main/tck/ts.jte.template";
+                sh "wget 
https://raw.githubusercontent.com/apache/cxf/4.0.x-fixes/tck/ts.jte.template";
                 sh "sed -i '" + 's/${version}/' + params.Version + "/g' 
ts.jte.template"
                 sh "sed -i '" + 's/${woodstox_version}/' + woodstox_version + 
"/g' ts.jte.template"
                 sh "sed -i '" + 's/${staxapi_version}/' + staxapi_version + 
"/g' ts.jte.template"
-                sh "sed -i '" + 's#${GF_HOME}#' + 
"${WORKSPACE}/glassfish5/glassfish" + "#g' ts.jte.template"
+                sh "sed -i '" + 's#${GF_HOME}#' + 
"${WORKSPACE}/glassfish6/glassfish" + "#g' ts.jte.template"
                 sh "cp jakartaee-tck/bin/xml/impl/glassfish/jersey.xml 
jakartaee-tck/bin/xml/impl/glassfish/cxf.xml"
               }
            }
@@ -102,13 +102,19 @@ pipeline {
                 withEnv([
                     "WORKSPACE=${pwd()}",
                     "TS_HOME=${WORKSPACE}/jakartaee-tck",
-                    "javaee_home=${WORKSPACE}/glassfish5",
-                    "GF_HOME=${WORKSPACE}/glassfish5/glassfish",
+                    "JAKARTA_JARS=${TS_HOME}/jakartaeetck-bundles",
+                    "javaee_home=${WORKSPACE}/glassfish6",
+                    "GF_HOME=${WORKSPACE}/glassfish6/glassfish",
                     "AS_JAVA=$JAVA_HOME",
                     "deliverabledir=jaxrs"
                 ]) {
                     sh 'yes | cp -vr ts.jte.template 
jakartaee-tck/install/jaxrs/bin/ts.jte'
                     
+                    mkdir -p ${JAKARTA_JARS}
+                    mkdir -p ${JAKARTA_JARS}/modules
+                    mkdir -p ${JAKARTA_JARS}/endorsed
+                    mvn -f ${TS_HOME}/docker/pom.xml 
dependency:copy-dependencies -DoutputDirectory="${JAKARTA_JARS}/modules" 
-Dmdep.stripVersion=true
+
                     dir("${TS_HOME}/install/${deliverabledir}/bin") {
                         sh "ant build.all"
                         sh "ant update.jaxrs.wars"
@@ -122,12 +128,15 @@ pipeline {
        }
        
        stage('Run JAX-RS TCK') {
+           tools { 
+                jdk 'jdk_11_latest' 
+           }
            steps {
                 withEnv([
                     "WORKSPACE=${pwd()}",
                     "TS_HOME=${WORKSPACE}/restful-ws-tck",
-                    "javaee_home=${WORKSPACE}/glassfish5",
-                    "GF_HOME=${WORKSPACE}/glassfish5/glassfish",
+                    "javaee_home=${WORKSPACE}/glassfish6",
+                    "GF_HOME=${WORKSPACE}/glassfish6/glassfish",
                     "AS_JAVA=$JAVA_HOME",
                     "deliverabledir=jaxrs"
                 ]) {
@@ -138,7 +147,7 @@ pipeline {
                     // interferes with Apache CXF, as such some tests cases 
are failing. Modifying the Jersey 
                     // manifest to exclude 'javax.ws.rs.ext.RuntimeDelegate' 
from Jersey so the Apache CXF
                     // implementation will be used reliably all the time.
-                    sh 'zip -d 
${WORKSPACE}/glassfish5/glassfish/modules/jersey-server.jar 
META-INF/services/javax.ws.rs.ext.RuntimeDelegate'
+                    sh 'zip -d 
${WORKSPACE}/glassfish6/glassfish/modules/jersey-server.jar 
META-INF/services/javax.ws.rs.ext.RuntimeDelegate'
 
                     dir("${TS_HOME}/bin") {
                         sh "ant config.vi"
diff --git a/tck/ts.jte.template b/tck/ts.jte.template
index 7bfbc3d7a7..c0a4fc4712 100644
--- a/tck/ts.jte.template
+++ b/tck/ts.jte.template
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2009, 2018 Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2020, 2021 Oracle and/or its affiliates. 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
@@ -15,12 +15,12 @@
 #
 
 #########################################################################
-#                                                                      #
+#                                                                       #
 #   JavaTest Environment file for JAX-RS Compatibility Test Suite       #
 #                                                                       #
-#   Environment specific properties in this file will likely           #
-#   have to be modified prior to running the JAX-RS TCK. Instructions  #
-#   for modifying these properties are contained in this file.         #
+#   Environment specific properties in this file will likely        #
+#   have to be modified prior to running the JAX-RS TCK. Instructions   #
+#   for modifying these properties are contained in this file.      #
 #                                                                       #
 #########################################################################
 
@@ -116,7 +116,7 @@ alt.schema.dir=${ts.home}/lib/schemas
 ###############################################################
 
ts.run.classpath=${jaxrs_impl.classes}${pathsep}${jaxrs.classes}${pathsep}${servlet.classes}
 
-ts.harness.classpath=${ts.home}/lib/tsharness.jar${pathsep}${ts.home}/lib/javatest.jar${pathsep}${ant.home}/lib/ant.jar${pathsep}${ts.home}/lib/jaxrstck.jar${pathsep}${ts.home}/lib/jaxb-xjc.jar
+ts.harness.classpath=${ts.home}/lib/tsharness.jar${pathsep}${ts.home}/lib/javatest.jar${pathsep}${ant.home}/lib/ant.jar${pathsep}${ts.home}/lib/jaxrstck.jar${pathsep}${ts.home}/lib/jaxb-xjc.jar${pathsep}${ts.home}/jakartaeetck-bundles/modules/jakarta.validation-api.jar${pathsep}${ts.home}/jakartaeetck-bundles/modules/jakarta.annotation-api.jar${pathsep}${ts.home}/jakartaeetck-bundles/modules/jakarta.activation-api.jar${pathsep}${ts.home}/jakartaeetck-bundles/modules/jakarta.xml.bind-api.
 [...]
 
 
apache.commons.classes=${pathsep}${ts.home}/lib/commons-httpclient-3.1.jar${pathsep}${ts.home}/lib/commons-logging-1.1.3.jar${pathsep}${ts.home}/lib/commons-codec-1.9.jar
 
local.classes=${ts.harness.classpath}${pathsep}${ts.home}/lib/jaxrstck.jar${pathsep}${ts.home}/classes${pathsep}${ts.home}/lib/sigtest.jar${pathsep}${apache.commons.classes}
@@ -150,7 +150,6 @@ command.testExecute=com.sun.ts.lib.harness.ExecTSTestCmd \
         PATH="${javaee.home}/nativelib" \
         ${JAVA_HOME}/bin/java \
         -Dcts.tmp=$harness.temp.directory \
-        -Djava.endorsed.dirs=${s1as.java.endorsed.dirs} \
         -Ddeliverable.class=${deliverable.class} $testExecuteClass 
$testExecuteArgs
 
 
@@ -180,12 +179,18 @@ env.ts_win32.menu=true
 ##env.ts_win32.command.testExecuteAppClient2=
 
 ##########################################################################
+# @jimage.dir:       This property specifies the directory where Java 11+
+#                    modules will be expanded by the jimage tool for use
+#                    in sigTestClasspath
+#
 # @sigTestClasspath: This property must be set when running signature tests.
 #
 #                    The sigTestClasspath specifies a list of classes/jar files
 #                    which contains jaxrs implementation and Java SE classes.
 ##########################################################################
-sigTestClasspath=${java.home}/lib/rt.jar${pathsep}${jaxrs.classes}
+jimage.dir=${ts.home}/tmp/jdk-bundles
+
+sigTestClasspath=${jaxrs.classes}${pathsep}${web.home}/modules/jakarta.xml.bind-api.jar${pathsep}${jimage.dir}/java.base${pathsep}${jimage.dir}/java.rmi${pathsep}${jimage.dir}/java.sql${pathsep}${jimage.dir}/java.naming
 
 
 ########################################################################
@@ -371,10 +376,10 @@ s1as.admin.port=${glassfish.admin.port}
 #                             Default to 
${web.home}/modules/jersey-container-servlet-core.jar
 #
 # @jaxrs.classes           -- The classes for the JAX-RS api's
-#                             Default to 
${web.home}/modules/javax.ws.rs-api.jar
+#                             Default to 
${web.home}/modules/jakarta.ws.rs-api.jar
 #
 # @servlet.classes         -- The classes for the Servlet api's
-#                             Default to ${web.home}/modules/javax.servlet.jar
+#                             Default to 
${web.home}/modules/jakarta.servlet.jar
 #
 # @servlet_adaptor         -- servlet adaptor class provided by vendor, 
 #                             used to package resource in .war file and
@@ -397,10 +402,10 @@ s1as.admin.port=${glassfish.admin.port}
 #                             Default to jersey
 ##########################################################################
 web.home=${GF_HOME}
-jaxrs_impl.classes=${web.home}/lib/cxf-rt-rs-client-${version}.jar:${web.home}/lib/cxf-core-${version}.jar:${web.home}/lib/cxf-rt-transports-http-${version}.jar:${web.home}/lib/cxf-rt-frontend-jaxrs-${version}.jar:${web.home}/lib/cxf-rt-rs-sse-${version}.jar
-jaxrs.classes=${web.home}/modules/jakarta.ws.rs-api.jar:${web.home}/modules/endorsed/jakarta.annotation-api.jar:${web.home}/modules/bean-validator.jar:${web.home}/modules/jakarta.json.jar:${web.home}/modules/jakarta.interceptor-api.jar:${web.home}/modules/jakarta.ejb-api.jar:${web.home}/modules/jakarta.inject.jar:${web.home}/modules/cdi-api.jar:${web.home}/modules/jakarta.json.bind-api.jar:${web.home}/lib/woodstox-core-${woodstox_version}.jar:${web.home}/lib/stax2-api-${staxapi_version}.jar
+jaxrs_impl.classes=${web.home}/domains/domain1/lib/cxf-rt-rs-client-${version}.jar:${web.home}/domains/domain1/lib/cxf-core-${version}.jar:${web.home}/domains/domain1/lib/cxf-rt-transports-http-${version}.jar:${web.home}/domains/domain1/lib/cxf-rt-frontend-jaxrs-${version}.jar:${web.home}/domains/domain1/lib/cxf-rt-rs-sse-${version}.jar
+jaxrs.classes=${web.home}/modules/jakarta.ws.rs-api.jar:${web.home}/modules/jakarta.annotation-api.jar:${web.home}/modules/bean-validator.jar:${web.home}/modules/jakarta.json.jar:${web.home}/modules/jakarta.interceptor-api.jar:${web.home}/modules/jakarta.ejb-api.jar:${web.home}/modules/jakarta.inject.jar:${web.home}/modules/jakarta.activation.jar:${web.home}/modules/cdi-api.jar:${web.home}/modules/jakarta.json.bind-api.jar:${web.home}/lib/woodstox-core-6.2.6.jar:${web.home}/lib/stax2-api
 [...]
 
-jaxrs_impl_lib=${web.home}/modules/cxf-rt-frontend-jaxrs-${version}.jar:${web.home}/modules/cxf-rt-rs-sse-${version}.jar
 
+jaxrs_impl_lib=${web.home}/domains/domain1/lib/cxf-rt-frontend-jaxrs-${version}.jar:${web.home}/domains/domain1/lib/cxf-rt-rs-sse-${version}.jar
 
 servlet_adaptor=org/apache/cxf/jaxrs/servlet/CXFNonSpringJaxrsServlet.class
 
 jaxrs_impl_name=cxf
@@ -412,3 +417,10 @@ impl.vi.deploy.dir=${web.home}/domains/domain1/autodeploy
 
 
 tslib.name=jaxrstck
+
+###############################################################
+# @extension.dir - The extension directory of RI. 
+# The CTS config.vi target will copy the CTS library 
+# jars to this location, used only for RI.
+###############################################################
+extension.dir=${web.home}/domains/domain1/lib/ext

Reply via email to