You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by re...@apache.org on 2022/06/08 22:05:42 UTC

[cxf] 01/02: CXF-8711: Jakarta EE TCKs and compatibility (added support for branch-specific woodstox and stax-api artifact extraction)

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

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

commit 28a4a8269d3b97be7e5c1d793ce43e91bae3cdb5
Author: Andriy Redko <dr...@gmail.com>
AuthorDate: Tue Jun 7 19:57:28 2022 -0400

    CXF-8711: Jakarta EE TCKs and compatibility (added support for branch-specific woodstox and stax-api artifact extraction)
    
    (cherry picked from commit 97dc25412eac3342f643ea5faa38c9718d2139bf)
---
 tck/Jenkinsfile     | 17 +++++++++++++++--
 tck/ts.jte.template |  2 +-
 2 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/tck/Jenkinsfile b/tck/Jenkinsfile
index be2619016e..f203b9aed1 100644
--- a/tck/Jenkinsfile
+++ b/tck/Jenkinsfile
@@ -68,8 +68,19 @@ pipeline {
                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"
 
                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=com.fasterxml.woodstox:woodstox-core:5.2.1: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:4.2: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-parent:${params.Version}:pom -Dtransitive=false -Ddest=."
+
+               script {
+                   echo "Detect additional dependencies (woodstox, stax2, ...) versions"
+
+                   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 "rm cxf-parent-${params.Version}.pom"
            }
        }
        
@@ -78,6 +89,8 @@ pipeline {
               withEnv(["WORKSPACE = ${PWD}"]) {
                 sh "wget https://raw.githubusercontent.com/apache/cxf/3.5.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 "cp jakartaee-tck/bin/xml/impl/glassfish/jersey.xml jakartaee-tck/bin/xml/impl/glassfish/cxf.xml"
               }
diff --git a/tck/ts.jte.template b/tck/ts.jte.template
index 7412163541..7bfbc3d7a7 100644
--- a/tck/ts.jte.template
+++ b/tck/ts.jte.template
@@ -398,7 +398,7 @@ s1as.admin.port=${glassfish.admin.port}
 ##########################################################################
 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-5.2.1.jar:${web.home}/lib/stax2-api-4.2.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_lib=${web.home}/modules/cxf-rt-frontend-jaxrs-${version}.jar:${web.home}/modules/cxf-rt-rs-sse-${version}.jar 
 servlet_adaptor=org/apache/cxf/jaxrs/servlet/CXFNonSpringJaxrsServlet.class