Jersey CI/CD Scripts Signed-off-by: Maxim Nesen <maxim.nesen@oracle.com>
diff --git a/backups/TCK/EE10/jakarta-ee10-tck.sh b/backups/TCK/EE10/jakarta-ee10-tck.sh new file mode 100644 index 0000000..75dd07c --- /dev/null +++ b/backups/TCK/EE10/jakarta-ee10-tck.sh
@@ -0,0 +1,92 @@ +#!/bin/bash +# +# Copyright (c) 2024 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 +# http://www.eclipse.org/legal/epl-2.0. +# +# This Source Code may also be made available under the following Secondary +# Licenses when the conditions for such availability set forth in the +# Eclipse Public License v. 2.0 are satisfied: GNU General Public License, +# version 2 with the GNU Classpath Exception, which is available at +# https://www.gnu.org/software/classpath/license.html. +# +# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 +# + +# +# script for listing staging from the staging repo. +# +# Input Parameters: +# JERSEY_VERSION - type: String +# - example: 3.1.5 +# - description: version of Jersey (EE10) to be tested +# GLASSFISH_VERSION - type: String +# - example: 7.0.6 +# - description: version of GF (EE10) to be used within tests +# TCK_VERSION - type: String +# - example: 3.1.3 +# - description: version of a TCK bundle which will be downloaded from the staging/central +# Configuration: +# +# JDK: +# openjdk-jdk11-latest +# Git: +# https://github.com/eclipse-ee4j/jersey +# Branch: +# */3.1 +# +# + +# +# The first sh invocation +# +#!/bin/bash -xe + +MVN_HOME="/opt/tools/apache-maven/latest/" +PATH="${MVN_HOME}/bin:${JAVA_HOME}:/bin:${PATH}" + +mvn -f tests/jersey-tck/pom.xml clean install \ + -Dtck.version=${TCK_VERSION} \ + -Dglassfish.container.version=${GLASSFISH_VERSION} \ + -Djersey.version=${JERSEY_VERSION} | tee tck.log + + +# +# The second sh invocation +# +#!/bin/bash -xe + +MVN_HOME="/opt/tools/apache-maven/latest/" +PATH="${MVN_HOME}/bin:${JAVA_HOME}:/bin:${PATH}" + +mvn -f tests/jersey-tck/pom.xml dependency:copy -Dartifact=jakarta.ws.rs:jakarta-restful-ws-tck:${TCK_VERSION} -Dtck.version=${TCK_VERSION} -Dtransitive=false +export DOWNLOAD_PATH='tests/jersey-tck/target/dependency/' +export NAME=`ls ${DOWNLOAD_PATH}` + +echo '***********************************************************************************' >> SUMMARY.TXT +echo '*** TCK bundle information ***' >> SUMMARY.TXT +echo "*** Name: ${NAME} ***" >> SUMMARY.TXT +echo '*** Artifact ID: jakarta.ws.rs:jakarta-restful-ws-tck:'${TCK_VERSION}' ***' >> SUMMARY.TXT +echo '*** Date and size: '`stat -c "date: %y, size(b): %s" ${DOWNLOAD_PATH}/${NAME}`' ***' >> SUMMARY.TXT +echo '*** SHA256SUM: '`sha256sum ${DOWNLOAD_PATH}/${NAME} | awk '{print $1}'`' ***' >> SUMMARY.TXT +echo '*** ***' >> SUMMARY.TXT +echo '***********************************************************************************' >> SUMMARY.TXT +echo '*** TCK results summary ***' >> SUMMARY.TXT +export TESTS_RUN=`grep 'Skipped: [0-9]*$' tck.log | grep -o 'Tests run: [0-9]*' | awk '{ SUM += $3 } END { print SUM }'` +export FAILURES=`grep 'Skipped: [0-9]*$' tck.log | grep -o 'Failures: [0-9]*' | awk '{ SUM += $2 } END { print SUM }'` +export ERRORS=`grep 'Skipped: [0-9]*$' tck.log | grep -o 'Errors: [0-9]*' | awk '{ SUM += $2 } END { print SUM }'` +export SKIPPED=`grep 'Skipped: [0-9]*$' tck.log | grep -o 'Skipped: [0-9]*' | awk '{ SUM += $2 } END { print SUM }'` +echo '[INFO] Number of Tests Passed = '${TESTS_RUN} >> SUMMARY.TXT +echo '[INFO] Number of Tests Failed = '${FAILURES} >> SUMMARY.TXT +echo '[INFO] Number of Tests with Errors = '${ERRORS} >> SUMMARY.TXT +echo '[INFO] Number of Skipped Tests = '${SKIPPED} >> SUMMARY.TXT +echo '[INFO] ****************************************************************************' >> SUMMARY.TXT +grep 'Tests run:' tck.log | grep --invert-match 'Skipped: [0-9]*$' >> SUMMARY.TXT + + +# +# Archive the artifacts: +# tck.log,tests/jersey-tck/target/glassfish7/glassfish/domains/domain1/logs/server.log,tests/jersey-tck/pom.xml,SUMMARY.TXT +# \ No newline at end of file
diff --git a/backups/TCK/EE11/jakarta-ee11-tck.sh b/backups/TCK/EE11/jakarta-ee11-tck.sh new file mode 100755 index 0000000..1b7d4f3 --- /dev/null +++ b/backups/TCK/EE11/jakarta-ee11-tck.sh
@@ -0,0 +1,83 @@ +#!/bin/bash +# +# Copyright (c) 2024 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 +# http://www.eclipse.org/legal/epl-2.0. +# +# This Source Code may also be made available under the following Secondary +# Licenses when the conditions for such availability set forth in the +# Eclipse Public License v. 2.0 are satisfied: GNU General Public License, +# version 2 with the GNU Classpath Exception, which is available at +# https://www.gnu.org/software/classpath/license.html. +# +# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 +# + +[[ -z ${1} ]] && SUMMARY_FILE_NAME='SUMMARY.TXT' || SUMMARY_FILE_NAME=${1} +[[ -z ${2} ]] && TCK_LOG_FILE_NAME='tck.log' || TCK_LOG_FILE_NAME=${2} + +#Build the Tomcat Arquillian +mkdir Arquillian +cd Arquillian +git clone https://github.com/arquillian/arquillian-container-tomcat.git . +mvn -V clean install -DskipTests + +cd ${WORKSPACE} + +mkdir TCK +cd TCK +export tckname=$(basename "${TCK_BUNDLE}") +echo ${tckname} +wget -q ${TCK_BUNDLE} -O ${tckname} +ls +jar xvf ${tckname} + +filename="${tckname%.*}" +echo ${filename} + +cd restful-ws-tck/artifacts +ls + +mvn install:install-file \ + -Dfile=${filename}.jar \ + -DgroupId=jakarta.ws.rs \ + -DartifactId=jakarta-restful-ws-tck \ + -Dversion=${TCK_VERSION} \ + -Dpackaging=jar \ + -DgeneratePom=true + +cd ${WORKSPACE} + +#Temporary +sed -i "s#<jersey.version>4.0.99-SNAPSHOT</jersey.version>#<jersey.version>${JERSEY_VERSION}</jersey.version>#p" tests/jersey-tck/pom.tomcat.xml +cat tests/jersey-tck/pom.tomcat.xml + +mvn -f tests/jersey-tck/pom.tomcat.xml clean install -Pstaging -Djersey.version=${JERSEY_VERSION} | tee ${TCK_LOG_FILE_NAME} + +mvn -f tests/jersey-tck/pom.tomcat.xml dependency:copy -Dartifact=jakarta.ws.rs:jakarta-restful-ws-tck:${TCK_VERSION} -Dtck.version=${TCK_VERSION} -Dtransitive=false +#export DOWNLOAD_PATH='tests/jersey-tck/target/dependency' +#export NAME=`ls ${DOWNLOAD_PATH}` +export DOWNLOAD_PATH=${WORKSPACE}/TCK +export NAME=$(basename "${TCK_BUNDLE}") + +echo '***********************************************************************************' >> ${SUMMARY_FILE_NAME} +echo '*** TCK bundle information ***' >> ${SUMMARY_FILE_NAME} +echo "*** Name: ${NAME} ***" >> ${SUMMARY_FILE_NAME} +echo '*** Artifact ID: jakarta.websocket:websocket-tck-spec-tests:'${TCK_VERSION}' ***' >> ${SUMMARY_FILE_NAME} +echo '*** Date and size: '`stat -c "date: %y, size(b): %s" ${DOWNLOAD_PATH}/${NAME}`' ***' >> ${SUMMARY_FILE_NAME} +echo '*** SHA256SUM: '`sha256sum ${DOWNLOAD_PATH}/${NAME} | awk '{print $1}'`' ***' >> ${SUMMARY_FILE_NAME} +echo '*** ***' >> ${SUMMARY_FILE_NAME} +echo '***********************************************************************************' >> ${SUMMARY_FILE_NAME} +echo '*** TCK results summary ***' >> ${SUMMARY_FILE_NAME} +export TESTS_RUN=`grep 'Skipped: [0-9]*$' ${TCK_LOG_FILE_NAME} | grep -o 'Tests run: [0-9]*' | awk '{ SUM += $3 } END { print SUM }'` +export FAILURES=`grep 'Skipped: [0-9]*$' ${TCK_LOG_FILE_NAME} | grep -o 'Failures: [0-9]*' | awk '{ SUM += $2 } END { print SUM }'` +export ERRORS=`grep 'Skipped: [0-9]*$' ${TCK_LOG_FILE_NAME} | grep -o 'Errors: [0-9]*' | awk '{ SUM += $2 } END { print SUM }'` +export SKIPPED=`grep 'Skipped: [0-9]*$' ${TCK_LOG_FILE_NAME} | grep -o 'Skipped: [0-9]*' | awk '{ SUM += $2 } END { print SUM }'` +echo '[INFO] Number of Tests Passed = '${TESTS_RUN} >> ${SUMMARY_FILE_NAME} +echo '[INFO] Number of Tests Failed = '${FAILURES} >> ${SUMMARY_FILE_NAME} +echo '[INFO] Number of Tests with Errors = '${ERRORS} >> ${SUMMARY_FILE_NAME} +echo '[INFO] Number of Skipped Tests = '${SKIPPED} >> ${SUMMARY_FILE_NAME} +echo '[INFO] ****************************************************************************' >> ${SUMMARY_FILE_NAME} +grep 'Tests run:' ${TCK_LOG_FILE_NAME} | grep --invert-match 'Skipped: [0-9]*$' >> ${SUMMARY_FILE_NAME} \ No newline at end of file
diff --git a/backups/TCK/EE8/jersey-staging-GF-integration.sh b/backups/TCK/EE8/jersey-staging-GF-integration.sh new file mode 100644 index 0000000..92c43c0 --- /dev/null +++ b/backups/TCK/EE8/jersey-staging-GF-integration.sh
@@ -0,0 +1,106 @@ +#!/bin/bash -ex +# +# Copyright (c) 2024 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 +# http://www.eclipse.org/legal/epl-2.0. +# +# This Source Code may also be made available under the following Secondary +# Licenses when the conditions for such availability set forth in the +# Eclipse Public License v. 2.0 are satisfied: GNU General Public License, +# version 2 with the GNU Classpath Exception, which is available at +# https://www.gnu.org/software/classpath/license.html. +# +# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 +# + +# +# script for Jersey EE8 integration into Glassfish 5. +# +# Input Parameters: +# GF_URL - type: String +# - value: http://central.maven.org/maven2/org/glassfish/main/distributions/glassfish/5.1.0/glassfish-5.1.0.zip +# - description: actual URL of the Glassfish 5 +# MAVEN_REPO_URL - type: String +# - value: https://jakarta.oss.sonatype.org/content/groups/staging/org/glassfish/jersey +# - description: Jersey binaries location +# JERSEY_VERSION - type: String +# - value: 2.42 +# - description: the version of Jersey to be integrated into the GF +# JERSEY_JARS - type: Multi-line String +# - value: containers/glassfish/jersey-gf-ejb/${JERSEY_VERSION}/jersey-gf-ejb +# containers/jersey-container-grizzly2-http/${JERSEY_VERSION}/jersey-container-grizzly2-http +# containers/jersey-container-servlet/${JERSEY_VERSION}/jersey-container-servlet +# containers/jersey-container-servlet-core/${JERSEY_VERSION}/jersey-container-servlet-core +# core/jersey-client/${JERSEY_VERSION}/jersey-client +# core/jersey-common/${JERSEY_VERSION}/jersey-common +# core/jersey-server/${JERSEY_VERSION}/jersey-server +# ext/jersey-bean-validation/${JERSEY_VERSION}/jersey-bean-validation +# ext/cdi/jersey-cdi1x/${JERSEY_VERSION}/jersey-cdi1x +# ext/cdi/jersey-cdi1x-servlet/${JERSEY_VERSION}/jersey-cdi1x-servlet +# ext/cdi/jersey-cdi1x-transaction/${JERSEY_VERSION}/jersey-cdi1x-transaction +# ext/jersey-entity-filtering/${JERSEY_VERSION}/jersey-entity-filtering +# ext/jersey-mvc/${JERSEY_VERSION}/jersey-mvc +# ext/jersey-mvc-jsp/${JERSEY_VERSION}/jersey-mvc-jsp +# inject/jersey-hk2/${JERSEY_VERSION}/jersey-hk2 +# media/jersey-media-jaxb/${JERSEY_VERSION}/jersey-media-jaxb +# media/jersey-media-json-binding/${JERSEY_VERSION}/jersey-media-json-binding +# media/jersey-media-json-jackson/${JERSEY_VERSION}/jersey-media-json-jackson +# media/jersey-media-json-jettison/${JERSEY_VERSION}/jersey-media-json-jettison +# media/jersey-media-json-processing/${JERSEY_VERSION}/jersey-media-json-processing +# media/jersey-media-moxy/${JERSEY_VERSION}/jersey-media-moxy +# media/jersey-media-multipart/${JERSEY_VERSION}/jersey-media-multipart +# media/jersey-media-sse/${JERSEY_VERSION}/jersey-media-sse +# - description: List of binaries to be integrated into the GF 5 +# +# +# Configuration: +# +# JDK: +# (System) +# Git: +# ------none------ +# +# Copy artifacts from another project: +# JAXRS_build +# Latest successful build +# Artifacts to copy: +# **/*.jar +# Target directory: +# download +# [X] Flatten directories [X] Fingerprint Artifacts +# +# +# +ls +cd download +wget -q ${GF_URL} -O glassfish.zip +#wget -q ${JAX_RS_JAR} -O jakarta.ws.rs-api.jar + +while IFS= read -r line ; do wget -q ${MAVEN_REPO_URL}/$line-${JERSEY_VERSION}.jar; done <<< "${JERSEY_JARS}" + +echo Listing grabbed jars +ls *.jar + +#unzip +unzip -q glassfish.zip -d ${WORKSPACE} +cd ${WORKSPACE}/glassfish5/glassfish/modules + +#replace API jar +#cp -v ${WORKSPACE}/download/jakarta.ws.rs-api.jar . + +#replace Jersey Jar +for jarfile in ${WORKSPACE}/download/*.jar; do + echo $(basename $jarfile) | sed -e 's/-RC[0-9][0-9]*//' | sed -e 's/-SNAPSHOT//' | sed -e 's/\.[0-9][0-9]*//' | sed -e 's/\.[0-9][0-9]*//' | sed -e 's/-[0-9][0-9]*//' | while IFS= read -r gfnamejar ; do if [ -f $gfnamejar ]; then rm -v $gfnamejar; cp -v $jarfile $gfnamejar; fi; done; +done + +cd ${WORKSPACE} +zip -r glassfish.zip glassfish5 + + +# +# Archive the artifacts: +# glassfish.zip +# +#
diff --git a/backups/TCK/EE8/tck-build.sh b/backups/TCK/EE8/tck-build.sh new file mode 100644 index 0000000..40a9cb1 --- /dev/null +++ b/backups/TCK/EE8/tck-build.sh
@@ -0,0 +1,163 @@ +#!/bin/bash -ex +# +# Copyright (c) 2024 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 +# http://www.eclipse.org/legal/epl-2.0. +# +# This Source Code may also be made available under the following Secondary +# Licenses when the conditions for such availability set forth in the +# Eclipse Public License v. 2.0 are satisfied: GNU General Public License, +# version 2 with the GNU Classpath Exception, which is available at +# https://www.gnu.org/software/classpath/license.html. +# +# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 +# + +# +# script for building EE8 TCK bundle for Jersey. +# +# Input Parameters: +# GF_URL - type: String +# - value: https://search.maven.org/remotecontent?filepath=org/glassfish/main/distributions/glassfish/5.1.0/glassfish-5.1.0.zip +# - description: actual URL of the Glassfish 5 +# +# Configuration: +# +# JDK: +# oracle-jdk8-latest +# Git: +# https://github.com/eclipse-ee4j/jakartaee-tck.git +# Branch: +# */master +# Check out to a sub-directory: +# CTS +# +# [X] With Ant: +# apache-ant-latest +# JDK: +# oracle-jdk8-latest +# +# Copy artifacts from another project: +# ts_jte_alter +# Latest successful build +# Artifacts to copy: +# ts.jte +# Target directory: +# download +# [X] Flatten directories [X] Fingerprint Artifacts +# +# +# + +mkdir ${WORKSPACE}/CTS/tools +mkdir ${WORKSPACE}/CTS/tools/ant + +#create zip command +#mkdir batch +#touch ${WORKSPACE}/batch/zip.sh +#chmod +x ${WORKSPACE}/batch/zip.sh +#touch ${WORKSPACE}/batch/zip +#chmod +x ${WORKSPACE}/batch/zip +#alias zip='${WORKSPACE}/batch/zip.sh' + +#echo "echo ARG1=\$1">batch/zip.sh +#echo "echo ARG2=\$2">>batch/zip.sh +#echo "echo ARG3=\$3">>batch/zip.sh +#echo "if [ \$1='-T' ]; then">>batch/zip.sh +#echo " exit">>batch/zip.sh +#echo "fi">>batch/zip.sh +#echo "filename=\`echo \$2 | cut -d'.' -f 1,2\`">>batch/zip.sh +#echo "echo filename=\$filename">>batch/zip.sh +#echo "tar -zcvf '\${filename}'.tar.gz \$3">>batch/zip.sh +#echo "mv \${filename}.tar.gz \${filename}.zip">>batch/zip.sh +#echo "echo created \${filename}.zip">>batch/zip.sh + +#echo "${WORKSPACE}/batch/zip.sh \$*">batch/zip + +#cat batch/zip.sh +#cat batch/zip + + +#Set variables +export ANT_OPTS=-Djavax.xml.accessExternalSchema=all + +cd download +#wget -4 https://jenkins.eclipse.org/jersey/view/TCK/job/ts_jte_alter/lastSuccessfulBuild/artifact/ts.jte + +#wget -q https://ci.adoptopenjdk.net/view/Build%20Monitor/job/jtharness/lastSuccessfulBuild/artifact/jtharness.tar.gz -O jtharness.tar.gz +#wget -q https://ci.adoptopenjdk.net/view/Build%20Monitor/job/sigtest/lastSuccessfulBuild/artifact/sigtest.tar.gz -O sigtest.tar.gz +#wget -q http://central.maven.org/maven2/com/sun/xml/bind/jaxb-xjc/2.2.7/jaxb-xjc-2.2.7.jar -O jaxb-xjc.jar +#wget -q http://central.maven.org/maven2/ant-contrib/ant-contrib/1.0b3/ant-contrib-1.0b3.jar -O ant-contrib.jar +#wget -q http://central.maven.org/maven2/commons-httpclient/commons-httpclient/3.1/commons-httpclient-3.1.jar +#wget -q http://central.maven.org/maven2/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar +#wget -q http://central.maven.org/maven2/commons-codec/commons-codec/1.3/commons-codec-1.3.jar +#tar xfz jtharness.tar.gz +#tar xvfz sigtest.tar.gz +#unzip -q sigtest-4.0 +#cp -av ${WORKSPACE}/download/sigtest-4.0/lib/. ${WORKSPACE}/CTS/lib/ +#cp -v ${WORKSPACE}/download/jtharness/lib/javatest.jar ${WORKSPACE}/CTS/lib/javatest.jar +#cp -v ${WORKSPACE}/download/jaxb-xjc.jar ${WORKSPACE}/CTS/lib/ +#cp -v ${WORKSPACE}/download/ant-contrib.jar ${WORKSPACE}/CTS/lib/ +#cp -v ${WORKSPACE}/download/ant-contrib.jar ${WORKSPACE}/CTS/lib/ant-contrib-1.0b3.jar +#cp -v ${WORKSPACE}/download/commons-httpclient-3.1.jar ${WORKSPACE}/CTS/lib/ +#cp -v ${WORKSPACE}/download/commons-logging-1.1.1.jar ${WORKSPACE}/CTS/lib/ +#cp -v ${WORKSPACE}/download/commons-codec-1.3.jar ${WORKSPACE}/CTS/lib/ + + +ls + +yes | cp -vr ${WORKSPACE}/download/ts.jte ${WORKSPACE}/CTS/install/jaxrs/bin/ +#cp -v ${WORKSPACE}/download/ts.jte ${WORKSPACE}/CTS/bin/ts.jte + +wget -q ${GF_URL} -O glassfish.zip +unzip -q glassfish.zip -d ${WORKSPACE} + +#COMPILE TCK + +export TS_HOME=${WORKSPACE}/CTS +export deliverabledir=jaxrs +export javaee_home=${WORKSPACE}/glassfish5 + +#touch ${WORKSPACE}/CTS/vehicle.properties +#echo com/sun/ts/tests/jaxrs/api = servlet >> ${WORKSPACE}/CTS/vehicle.properties +#echo com/sun/ts/tests/jaxrs/api/rs/ext/interceptor = standalone >> ${WORKSPACE}/CTS/vehicle.properties +#echo com/sun/ts/tests/jaxrs/ee = standalone >> ${WORKSPACE}/CTS/vehicle.properties +#echo com/sun/ts/tests/jaxrs/jaxrs21 = standalone >> ${WORKSPACE}/CTS/vehicle.properties +#echo com/sun/ts/tests/jaxrs/jaxrs21/api = servlet >> ${WORKSPACE}/CTS/vehicle.properties +#echo com/sun/ts/tests/jaxrs/spec = standalone >> ${WORKSPACE}/CTS/vehicle.properties +#echo com/sun/ts/tests/jaxrs/servlet3 = standalone >> ${WORKSPACE}/CTS/vehicle.properties +#echo com/sun/ts/tests/jaxrs/platform = standalone >> ${WORKSPACE}/CTS/vehicle.properties + +#cat ${WORKSPACE}/CTS/vehicle.properties + +#fix the test +cd ${WORKSPACE}/CTS/src/com/sun/ts/tests/jaxrs/jaxrs21/ee/sse/sseeventsink +sed -i '314s/open()/register(holder::add)/' JAXRSClient.java +sed -i '315s/register(holder::add)/open()/' JAXRSClient.java +#end of fix + +cd ${WORKSPACE}/CTS/install/${deliverabledir}/bin +ant build.all +ant update.jaxrs.wars + +# BUNDLE TCK + +cd ${WORKSPACE}/CTS/release/tools/ +ant jakartaee-jaxrs +#ls ${WORKSPACE}/CTS/release/JAXRS_BUILD/ +cd ${WORKSPACE}/CTS/release/JAXRS_BUILD/latest +for fn in `ls *.zip`; do cp -v "${fn}" `echo ${fn} | cut -d'_' -f 1`_latest.zip; done + +#zip -s 10m jaxrstck_split_latest.zip jaxrstck-2.1_latest.zip +#ls + + + +# +# Archive the artifacts: +# CTS/release/JAXRS_BUILD/latest/*.z* +# +# +
diff --git a/backups/TCK/EE8/tck-run-pipeline.groovy b/backups/TCK/EE8/tck-run-pipeline.groovy new file mode 100644 index 0000000..95936f1 --- /dev/null +++ b/backups/TCK/EE8/tck-run-pipeline.groovy
@@ -0,0 +1,150 @@ +#!/usr/bin/env groovy + +/* + * Copyright (c) 2024 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 + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/** + * Runs TCK for Jersey EE8 on GlassFish 5 + * + * Input Parameters: + * + * GF_INTEGRATION_JOB_NAME - type: String + * - value: Jersey_Staging_GF_Integration + * - description: name of a job from which the prepared archive of the Glassfish 5 is taken + * - possible values: Jersey_binaries_GF_integration + * Jersey_Staging_GF_Integration + * GF5_Jersey2_Archive_Integration + * TS_JTE_JOB_NAME - type: String + * - value: ts_jte_alter + * - description: name of a job from which prepared ts.jte is taken + * TCK_BUNDLE_JOB_OR_URL - type: String + * - value: tck_build + * - description: name of a job from which prepared TCK bundle is taken + */ + +node { + + // Job that created the API artifact + def GF_BUILD_JOB = "${env.GF_INTEGRATION_JOB_NAME}" + def TS_JTE_BUILD_JOB = "${env.TS_JTE_JOB_NAME}" + def TCK_BUNDLE_URL = "${env.TCK_BUNDLE_JOB_OR_URL}" + def API_JAR_NAME="jakarta.ws.rs-api.jar" + + echo "GF_BUILD_JOB=${GF_BUILD_JOB}" + echo "TS_JTE_BUILD_JOB=${TS_JTE_BUILD_JOB}" + echo "TCK_BUNDLE_URL=${TCK_BUNDLE_URL}" + + //TCK properties + env.deliverabledir="jaxrs" + env.tck_root="restful-ws-tck" + env.TS_HOME="${env.WORKSPACE}/${env.tck_root}" + env.javaee_home="${env.WORKSPACE}/glassfish5" + + env.JAVA_HOME= tool name: 'oracle-jdk8-latest', type: 'jdk' + env.ANT_HOME= tool name: 'apache-ant-latest', type: 'ant' + env.PATH="${ANT_HOME}/bin:${JAVA_HOME}/bin:${PATH}" + env.ANT_OPTS="-Djavax.xml.accessExternalSchema=all" + + stage("Grab GF and ts.jte artifacts") { + //https://go.cloudbees.com/docs/cloudbees-documentation/cjoc-user-guide/index.html#cluster-copy-artifacts + dir ("download") { + copyArtifacts(projectName: "${GF_BUILD_JOB}") + copyArtifacts(projectName: "${TS_JTE_BUILD_JOB}") + } + } + + stage("Grab TCK bundle") { + env.TCK_BUNDLE_URL = "${TCK_BUNDLE_URL}" + if (!(env.TCK_BUNDLE_URL).startsWith("http")) { + dir ("download") { + copyArtifacts(projectName: "${TCK_BUNDLE_URL}", filter: "**/*_latest.zip") + //flatten - could be done by copyRemoteArtifacts but mapper arg expects java class + sh "find . -mindepth 2 -type f -print -exec mv {} . \\;" + + //sh "rm *doc*.zip" + sh "mv ${deliverabledir}-tck*.zip ${deliverabledir}-tck.zip" + } + } else { + sh '''#!/bin/bash -ex + cd ${WORKSPACE}/download + wget -q ${TCK_BUNDLE_URL} -O ${deliverabledir}-tck.zip + ''' + } + } + + stage("Unzip TCK and GF") { + sh '''#!/bin/bash -ex + cd ${WORKSPACE} + unzip ${WORKSPACE}/download/glassfish.zip + unzip -q ${WORKSPACE}/download/${deliverabledir}-tck.zip + ls + ls ${tck_root} + + cd ${WORKSPACE}/glassfish5/glassfish/modules + jar xf jersey-common.jar META-INF/MANIFEST.MF + cat META-INF/MANIFEST.MF | grep Bundle-Version + ''' + } + + stage ("Replace ts.jte") { + sh '''#!/bin/bash -ex + ls ${TS_HOME} + ls ${TS_HOME}/bin + yes | cp -rfv ${WORKSPACE}/download/ts.jte ${TS_HOME}/bin/ts.jte + ''' + } + + stage("Configure TCK") { + sh '''#!/bin/bash -ex + cd ${TS_HOME}/bin + ant config.vi + ''' + } + + stage ("Deploy TCK tests") { + sh '''#!/bin/bash -ex + cd ${TS_HOME}/bin + ant deploy.all + ''' + } + + stage ("Run TCK tests") { + sh '''#!/bin/bash -ex + cd ${TS_HOME}/bin + ant run.all | tee run.log + ''' + } + + stage ("Create summary.txt, API, and run.log artifacts") { + sh '''#!/bin/bash -ex + cd ${TS_HOME}/bin + cat run.log | sed -e '1,/Completed running/d' > summary.txt + PASSED_COUNT=`head -1 summary.txt | tail -1 | sed 's/.*=\\s\\(.*\\)/\\1/'` + FAILED_COUNT=`head -2 summary.txt | tail -1 | sed 's/.*=\\s\\(.*\\)/\\1/'` + ERROR_COUNT=`head -3 summary.txt | tail -1 | sed 's/.*=\\s\\(.*\\)/\\1/'` + + echo ERROR_COUNT=${ERROR_COUNT} + echo FAILED_COUNT=${FAILED_COUNT} + echo PASSED_COUNT=${PASSED_COUNT} + ''' + + archiveArtifacts artifacts: "${env.tck_root}/bin/summary.txt", fingerprint: true + archiveArtifacts artifacts: "${env.tck_root}/bin/run.log", fingerprint: true + archiveArtifacts artifacts: "glassfish5/glassfish/modules/${API_JAR_NAME}", fingerprint: true + archiveArtifacts artifacts: "glassfish5/glassfish/modules/META-INF/MANIFEST.MF", fingerprint: true + archiveArtifacts artifacts: "glassfish5/glassfish/domains/domain1/logs/server.log", fingerprint: true + } +} \ No newline at end of file
diff --git a/backups/TCK/EE8/ts-jte-alter.sh b/backups/TCK/EE8/ts-jte-alter.sh new file mode 100644 index 0000000..27d908a --- /dev/null +++ b/backups/TCK/EE8/ts-jte-alter.sh
@@ -0,0 +1,94 @@ +#!/bin/bash +# +# Copyright (c) 2024 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 +# http://www.eclipse.org/legal/epl-2.0. +# +# This Source Code may also be made available under the following Secondary +# Licenses when the conditions for such availability set forth in the +# Eclipse Public License v. 2.0 are satisfied: GNU General Public License, +# version 2 with the GNU Classpath Exception, which is available at +# https://www.gnu.org/software/classpath/license.html. +# +# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 +# + +# +# script for generating ts.jte for EE8 Jersey TCK. +# +# Input Parameters: +# +# SERVER_HOME - type: String +# - value: ${ts.home}/../glassfish5/glassfish +# JAXRS_API_JAR_NAME - type: String +# - value: jakarta.ws.rs-api.jar +# HARNESS_REPORT_DIR - type: String +# - value: ${ts.home}/../JTreport +# HARNESS_WORK_DIR - type: String +# - value: ${ts.home}/../JTwork +# +# Configuration: +# +# JDK: +# (System) +# Git: +# ----none---- +# +# + +wget https://raw.githubusercontent.com/eclipse-ee4j/jakartaee-tck/master/install/jaxrs/bin/ts.jte + +JARS_ON_CP="\ +\${web.home}/modules/jersey-client.jar:\ +\${web.home}/modules/jersey-common.jar:\ +\${web.home}/modules/jersey-container-servlet.jar:\ +\${web.home}/modules/jersey-container-servlet-core.jar:\ +\${web.home}/modules/jersey-hk2.jar:\ +\${web.home}/modules/jersey-media-jaxb.jar:\ +\${web.home}/modules/jersey-media-json-binding.jar:\ +\${web.home}/modules/jersey-media-json-processing.jar:\ +\${web.home}/modules/jersey-media-sse.jar:\ +\${web.home}/modules/jersey-server.jar:\ +\${web.home}/modules/jsonp-jaxrs.jar:\ +\${web.home}/modules/asm-all-repackaged.jar:\ +\${web.home}/modules/bean-validator.jar:\ +\${web.home}/modules/endorsed/jakarta.annotation-api.jar:\ +\${web.home}/modules/cdi-api.jar:\ +\${web.home}/modules/cglib.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/jakarta.ejb-api.jar:\ +\${web.home}/modules/jakarta.inject.jar:\ +\${web.home}/modules/jakarta.json.jar:\ +\${web.home}/modules/jakarta.json-api.jar:\ +\${web.home}/modules/jakarta.json.bind-api.jar:\ +\${web.home}/modules/jakarta.interceptor-api.jar:\ +\${web.home}/modules/jakarta.servlet-api.jar:\ +\${web.home}/modules/osgi-resource-locator.jar:\ +\${web.home}/modules/weld-osgi-bundle.jar:\ +\${web.home}/modules/yasson.jar" + +sed -i 's/^impl\.vi=/impl\.vi=glassfish/g' ts.jte +sed -i "s/^web\.home=/$(echo web\.home=${SERVER_HOME} | sed -e 's/\\/\\\\/g; s/\//\\\//g;')/g" ts.jte +sed -i "s/^impl\.vi\.deploy\.dir=/$(echo impl\.vi\.deploy\.dir=\${web.home}/domains/domain1/autodeploy | sed -e 's/\\/\\\\/g; s/\//\\\//g;')/g" ts.jte +sed -i 's/^jaxrs_impl_name=/jaxrs_impl_name=jersey/g' ts.jte +sed -i 's/^harness\.log\.traceflag=/harness\.log\.traceflag=true/g' ts.jte +sed -i 's/^webServerHost=/webServerHost=localhost/g' ts.jte +sed -i 's/^webServerPort=/webServerPort=8080/g' ts.jte +sed -i "s/^work\.dir=\/tmp\/JTwork/$(echo work\.dir=${HARNESS_WORK_DIR} | sed -e 's/\\/\\\\/g; s/\//\\\//g;')/g" ts.jte +sed -i "s/^report\.dir=\/tmp\/JTreport/$(echo report\.dir=${HARNESS_REPORT_DIR} | sed -e 's/\\/\\\\/g; s/\//\\\//g;')/g" ts.jte +sed -i "s/^jaxrs_impl\.classes=/$(echo jaxrs_impl\.classes=${JARS_ON_CP} | sed -e 's/\\/\\\\/g; s/\//\\\//g;')/g" ts.jte +sed -i "s/^jaxrs\.classes=/$(echo jaxrs\.classes=\${web.home}/modules/${JAXRS_API_JAR_NAME} | sed -e 's/\\/\\\\/g; s/\//\\\//g;')/g" ts.jte +sed -i "s/^jaxrs_impl_lib=/$(echo jaxrs_impl_lib=\${web.home}/modules/jersey-container-servlet-core.jar | sed -e 's/\\/\\\\/g; s/\//\\\//g;')/g" ts.jte +sed -i "s/^servlet_adaptor=/servlet_adaptor=org\/glassfish\/jersey\/servlet\/ServletContainer.class/g" ts.jte + +sed -i "s/-Dcts.tmp=\.*/-Djavax.xml.accessExternalSchema=all -Dcts.tmp=/g" ts.jte + + +# +# Archive the artifacts: +# ts.jte \ No newline at end of file
diff --git a/backups/release/EE10/bundle-apidocs.sh b/backups/release/EE10/bundle-apidocs.sh new file mode 100644 index 0000000..089a1a9 --- /dev/null +++ b/backups/release/EE10/bundle-apidocs.sh
@@ -0,0 +1,62 @@ +#!/bin/bash +# +# Copyright (c) 2024 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 +# http://www.eclipse.org/legal/epl-2.0. +# +# This Source Code may also be made available under the following Secondary +# Licenses when the conditions for such availability set forth in the +# Eclipse Public License v. 2.0 are satisfied: GNU General Public License, +# version 2 with the GNU Classpath Exception, which is available at +# https://www.gnu.org/software/classpath/license.html. +# +# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 +# + +# +# script for releasing api docs bundle by release tag. +# +# Input Parameters: +# +# VERSION - type: String +# - example: 3.1.6 +# - description: Name of the existing version tag in the Git repo. +# +# Configuration: +# +# JDK: +# oracle-jdk17-latest +# Git: +# git@github.com:eclipse-ee4j/jersey.git +# Branches to build: +# tags/${VERSION} +# +# Bindings: +# Secret file: +# Variable: +# KEYRING +# Credentials: +# secret-subkeys.asc +# +# + + + gpg --batch --import ${KEYRING} + for fpr in $(gpg --list-keys --with-colons | awk -F: '/fpr:/ {print $10}' | sort -u); + do + echo -e "5\ny\n" | gpg --batch --command-fd 0 --expert --edit-key $fpr trust; + done + +#!/bin/bash -xe + +# Execution environment +MVN_HOME="/opt/tools/apache-maven/latest/" +PATH="${MVN_HOME}/bin:${JAVA_HOME}:/bin:${PATH}" + +echo '-[ Run maven release plugin ]---------------------------------------------------' + +mvn -q -V -C -DstagingDescription="org.glassfish.jersey.bundles.apidocs:${VERSION}" \ + -Pstaging,oss-release,pre-release -DskipTests -pl :apidocs \ + -Djersey.version=${VERSION} -Dsource.mvn.plugin.version=3.2.0 install javadoc:jar gpg:sign deploy \ No newline at end of file
diff --git a/backups/release/EE10/bundle-examples.sh b/backups/release/EE10/bundle-examples.sh new file mode 100644 index 0000000..c49fa1c --- /dev/null +++ b/backups/release/EE10/bundle-examples.sh
@@ -0,0 +1,62 @@ +#!/bin/bash +# +# Copyright (c) 2024 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 +# http://www.eclipse.org/legal/epl-2.0. +# +# This Source Code may also be made available under the following Secondary +# Licenses when the conditions for such availability set forth in the +# Eclipse Public License v. 2.0 are satisfied: GNU General Public License, +# version 2 with the GNU Classpath Exception, which is available at +# https://www.gnu.org/software/classpath/license.html. +# +# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 +# + +# +# script for releasing examples bundle by release tag. +# +# Input Parameters: +# +# VERSION - type: String +# - example: 3.1.6 +# - description: Name of the existing version tag in the Git repo. +# +# Configuration: +# +# JDK: +# oracle-jdk11-latest +# Git: +# git@github.com:eclipse-ee4j/jersey.git +# Branches to build: +# tags/${VERSION} +# +# Bindings: +# Secret file: +# Variable: +# KEYRING +# Credentials: +# secret-subkeys.asc +# +# + + + gpg --batch --import ${KEYRING} + for fpr in $(gpg --list-keys --with-colons | awk -F: '/fpr:/ {print $10}' | sort -u); + do + echo -e "5\ny\n" | gpg --batch --command-fd 0 --expert --edit-key $fpr trust; + done + + + # Execution environment + MVN_HOME="/opt/tools/apache-maven/latest/" + PATH="${MVN_HOME}/bin:${JAVA_HOME}:/bin:${PATH}" + + mvn clean install -C -B -Djersey.version=${VERSION} -DskipTests -Ppre-release,staging -pl org.glassfish.jersey.examples:project -amd + + mvn -C -B -DstagingDescription="org.glassfish.jersey.examples:${VERSION}" \ + -Pstaging,oss-release,pre-release \ + -Djersey.version=${VERSION} -DskipTests -pl :jersey-examples \ + deploy \ No newline at end of file
diff --git a/backups/release/EE10/bundle-user-guide.sh b/backups/release/EE10/bundle-user-guide.sh new file mode 100644 index 0000000..8890a79 --- /dev/null +++ b/backups/release/EE10/bundle-user-guide.sh
@@ -0,0 +1,67 @@ +#!/bin/bash +# +# Copyright (c) 2024 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 +# http://www.eclipse.org/legal/epl-2.0. +# +# This Source Code may also be made available under the following Secondary +# Licenses when the conditions for such availability set forth in the +# Eclipse Public License v. 2.0 are satisfied: GNU General Public License, +# version 2 with the GNU Classpath Exception, which is available at +# https://www.gnu.org/software/classpath/license.html. +# +# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 +# + +# +# script for releasing User Guide bundle by release tag. +# +# Input Parameters: +# +# VERSION - type: String +# - example: 3.1.6 +# - description: Name of the existing version tag in the Git repo. +# +# Configuration: +# +# JDK: +# oracle-jdk11-latest +# Git: +# git@github.com:eclipse-ee4j/jersey.git +# Credentials: +# GitHub bot SSH +# Branches to build: +# refs/tags/${VERSION} +# +# Bindings: +# Secret file: +# Variable: +# KEYRING +# Credentials: +# secret-subkeys.asc +# +# + + + gpg --batch --import ${KEYRING} + for fpr in $(gpg --list-keys --with-colons | awk -F: '/fpr:/ {print $10}' | sort -u); + do + echo -e "5\ny\n" | gpg --batch --command-fd 0 --expert --edit-key $fpr trust; + done + +#!/bin/bash -xe + +# Execution environment +MVN_HOME="/opt/tools/apache-maven/latest/" +PATH="${MVN_HOME}/bin:${JAVA_HOME}:/bin:${PATH}" + +cd docs + +echo '-[ Run maven release plugin ]---------------------------------------------------' + +mvn -q -C -DstagingDescription="org.glassfish.jersey.jersey-documentation:${VERSION}" \ + -Pstaging,oss-release,pre-release \ + -DskipTests \ + install javadoc:jar gpg:sign deploy \ No newline at end of file
diff --git a/backups/release/EE10/release.groovy b/backups/release/EE10/release.groovy new file mode 100644 index 0000000..ad2f167 --- /dev/null +++ b/backups/release/EE10/release.groovy
@@ -0,0 +1,333 @@ +#!/usr/bin/env groovy + +/* + * Copyright (c) 2024 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 + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/** + * Release script for Jakarta EE10 Jersey versions + * Release branch is 3.1 + * + * Input Parameters: + * RELEASE_VERSION - type: String + * - example: 3.1.6 + * - Description: mandatory release version. Later is being published to staging/central. + * NEXT_VERSION - type: String + * - example: 3.1.99-SNAPSHOT + * - Description: mandatory next developing version will be committed in to the release branch and later + * merged into the original release branch for further developing. + * BRANCH - type: Choice Parameter + * - values: 3.1 + * - Description: Original release branch from which the codebase is being checked out + * DRY_RUN - type: Boolean + * - Description: if checked nothing is really committed to Git nor published to the staging + * OVERWRITE - type: Boolean + * - Description: if checked allows replacing of the previously published RELEASE_VERSION of Jersey + * + */ + +#!/usr/bin/env groovy + +node { + + def MVN_HOME = tool name: 'apache-maven-latest', type: 'maven' + def HELP_PLUGIN = 'org.apache.maven.plugins:maven-help-plugin:2.1.1' + def TARGET = 'package javadoc:jar gpg:sign install:install' + def DEPLOY_TARGET = '' + def RELEASE_VERSION = RELEASE_VERSION + def NEXT_VERSION = NEXT_VERSION + def RELEASE_TAG = '' + def NEW_RELEASE_BRANCH = '' + def OVERWRITE = OVERWRITE + def PROJECT_NAME = 'Jersey' + def LOGIN = 'jersey-bot' + def EMAIL = 'jersey-bot@eclipse.org' + def REPO = 'git@github.com:eclipse-ee4j/jersey.git' + def SECRET_FILE_ID = 'secret-subkeys.asc' + def CREDENTIALS_ID = 'github-bot-ssh' + def GIT_ORIGIN = 'origin' + def RELEASE_FOLDER = env.WORKSPACE + def RELEASE_BRANCH = BRANCH + + def STAGING_NAME_PATTERN = 'orgglassfishjersey-[0-9]+' + def STAGING_NAME = '' + def STAGING_PREV_NAME = '' + def STAGING_OPEN_NAME = '' + def STAGING_DESC = 'org.glassfish.jersey:' + RELEASE_VERSION + def STAGING_BOM_DESC = 'org.glassfish.jersey.bom:' + RELEASE_VERSION + def STAGING_PROFILE_ID = '70fa3a107a8918' + + def MULTIRELEASE_MODULES = ':jersey-wadl-doclet,:jersey-spring6,:jersey-helidon-connector,:jersey-jetty-connector,:jersey-jetty-http2-connector,:jersey-container-jetty-http,:jersey-container-jetty-http2,:jersey-test-framework-provider-jetty,:jersey-test-framework-provider-jetty-http2' + + def JDK_11_HOME = tool name: 'openjdk-jdk11-latest', type: 'jdk' + //def JDK_12_HOME = tool name: 'openjdk-jdk12-latest', type: 'jdk' + def JDK_21_HOME = tool name: 'openjdk-jdk21-latest', type: 'jdk' + //def JDK_8_HOME = tool name: 'oracle-jdk8-latest', type: 'jdk' + + env.JAVA_HOME = JDK_11_HOME + env.PATH = "${env.JAVA_HOME}/bin:${env.PATH}:${MVN_HOME}/bin" + + sh 'java -version' + + stage('Fetch from git') { + git(branch: RELEASE_BRANCH, credentialsId: CREDENTIALS_ID, url: REPO) + } + stage('Prepare environment') { + + dir(RELEASE_FOLDER) { + //# Check whether top level pom.xml contains SNAPSHOT version + if (!sh(returnStdout: true, script: "grep '<version>' pom.xml | grep 'SNAPSHOT'")?.trim()) { + error('-[ Missing SNAPSHOT version in POM! ]-------------------------------------------') + } + + //# Compute release versions + def SNAPSHOT_VERSION = sh(returnStdout: true, script: 'mvn -q -Dexec.executable="echo" -Dexec.args=\'${project.version}\' --non-recursive exec:exec -Pstaging').trim() + + if (!RELEASE_VERSION?.trim()) { + if (!SNAPSHOT_VERSION?.trim()) { + error('-[ Missing required snapshot version number! ]----------------------------------') + } else { + def versionTokens = SNAPSHOT_VERSION.split('-') + RELEASE_VERSION = versionTokens[0] + } + } + + if (!NEXT_VERSION?.trim()) { + def (MAJOR_VERSION, MINOR_VERSION) = RELEASE_VERSION.tokenize('.') + def NEXT_MINOR_VERSION = (MINOR_VERSION as Integer) + 1 + NEXT_VERSION = MAJOR_VERSION + '.' + NEXT_MINOR_VERSION + '-SNAPSHOT' + } + + RELEASE_TAG = RELEASE_VERSION + NEW_RELEASE_BRANCH = RELEASE_VERSION+'-BRANCH' + + echo "Current version: ${SNAPSHOT_VERSION}" + echo "Release version: ${RELEASE_VERSION}" + echo "Next version: ${NEXT_VERSION}" + echo "Release tag: ${RELEASE_TAG}" + echo "Release branch: ${NEW_RELEASE_BRANCH}" + + if (!SNAPSHOT_VERSION?.trim() || !RELEASE_VERSION?.trim() || !NEXT_VERSION?.trim()) { + error '-[ Missing required version numbers! ]------------------------------------------' + } + + if (DRY_RUN == 'true') { + echo '-[ Dry run turned on ]----------------------------------------------------------' + //TARGET = 'install' + } else { + DEPLOY_TARGET = ' deploy:deploy' + } + echo '-[ Configure git user ]--------------------------------------------------------' + sh "git config --local user.email \"${EMAIL}\"" + sh "git config --local user.name \"$LOGIN\"" + + } + + } + stage('Prepare GPG') { + withCredentials([file(credentialsId: SECRET_FILE_ID, variable: 'KEYRING')]) { + //# Workaround: GPG initialization + sh("gpg --batch --import ${KEYRING}") + sh ''' + for fpr in $(gpg --list-keys --with-colons | awk -F: '/fpr:/ {print $10}' | sort -u); + do + echo -e "5\ny\n" | gpg --batch --command-fd 0 --expert --edit-key $fpr trust; + done + ''' + } + } + stage('Prepare branch') { + echo '-[ Prepare branch ]-------------------------------------------------------------' + + echo '-[ Switching to release branch ]-------------------------------------------------' + sh """ + git checkout ${GIT_ORIGIN}/${RELEASE_BRANCH} && true + git reset --hard ${GIT_ORIGIN}/${RELEASE_BRANCH} && true + git checkout -B ${NEW_RELEASE_BRANCH} + """ + echo '-[ Release tag cleanup ]--------------------------------------------------------' + def TAG_NAME = sh(returnStdout: true, script: "git tag | grep ${RELEASE_TAG}\$ || true").trim() + if (RELEASE_TAG == TAG_NAME) { + if (OVERWRITE == 'true') { + echo "${RELEASE_TAG} tag already exists, deleting" + sshagent([CREDENTIALS_ID]) { + sh "git push --delete origin ${RELEASE_TAG} && true" + } + } else { + error "${RELEASE_TAG} tag already exists" + } + //# Always delete local tag if exists + sh """ + git tag --delete ${RELEASE_TAG} && true + """ + } + sh ''' + sed -i 's|<suppress files="generated" checks=".*"/>|<suppress files="generated" checks=".*"/><suppress files="unpacked-src" checks=".*"/>|g' etc/config/checkstyle-suppressions.xml + ''' + } + stage('Check previous stagings') { + if (DRY_RUN == 'true') { + echo DRY_RUN + ' ------' + } else { + if (OVERWRITE == 'true') { + STAGING_PREV_NAME = sh(returnStdout: true, + script: "mvn -B --non-recursive -Pstaging nexus-staging:rc-list | awk '/\\[INFO] $STAGING_NAME_PATTERN[ ]+CLOSED[ ]+$STAGING_DESC[ ]*\$/ {if(a){a = \$2\",\"a} else{a = \$2}}END{print a}'").trim() + echo 'Previously closed staging name: ' + STAGING_PREV_NAME + } + + STAGING_OPEN_NAME = sh(returnStdout: true, + script: "mvn -B --non-recursive -Pstaging nexus-staging:rc-list | awk '/$STAGING_NAME_PATTERN OPEN / {if(a){a = \$2\",\"a} else{a = \$2}}END{print a}'").trim() + + if (!STAGING_OPEN_NAME?.trim()) { + echo 'No currently open stagings' + } else { + echo 'Currently open redundand staging: ' + STAGING_OPEN_NAME + ', immediately closing' + sh """ + OPEN_STAGINGS=${STAGING_OPEN_NAME} + mvn -B -q -Pstaging nexus-staging:rc-drop -DstagingRepositoryId=\${OPEN_STAGINGS} + """ + } + } + } + /* + stage('Open new staging') { + if (DRY_RUN == 'true') { + echo DRY_RUN + ' ------' + } else { + STAGING_NAME = sh(returnStdout: true, + script: "mvn -B --non-recursive -Pstaging -DstagingProfileId=${STAGING_PROFILE_ID} -DstagingDescription=${STAGING_DESC} nexus-staging:rc-open | awk '/\\[INFO] Opened / {print \$3}'").trim() + echo 'New staging name: '+STAGING_NAME + } + }*/ + stage("Build ${PROJECT_NAME}") { + echo env.JAVA_HOME + echo '-[ Run maven release ]---------------------------------------------------------' + echo '-[ Set Release version ]-------------------------------------------------------' + sh """ + cd ${RELEASE_FOLDER} + mvn -q -B -V -Pstaging versions:set -DnewVersion=${RELEASE_VERSION} -DgenerateBackupPoms=false + mvn -q -B -V -Pstaging versions:set -DnewVersion=${RELEASE_VERSION} -DgenerateBackupPoms=false -f bom/pom.xml + """ + echo '-[ Update Copyright years ]----------------------------------------------------' + sh '''#!/bin/bash -e + + export CURRENT_YEAR=`date '+%Y'` + export SED_CMD_LINE='sed -i "s#, 20.. Oracle and/or its affiliates#, ${CURRENT_YEAR} Oracle and/or its affiliates#g"' + + git status --porcelain --untracked-files=no > modified_pom.log + cp modified_pom.log list_of_poms.txt + sed -i "s| M |$SED_CMD_LINE |g" modified_pom.log + sed -i "s| M ||g" list_of_poms.txt + + bash modified_pom.log + + echo ${CURRENT_YEAR} current year + + while IFS= read -r path_to_pom + do + export CP_YEAR=`grep -o 'Copyright (c) 20.. Oracle and/or its affiliates' ${path_to_pom} | awk '{print $3}'` + [[ -z ${CP_YEAR} ]] && CP_YEAR=${CURRENT_YEAR} || echo ${CP_YEAR} + [[ ${CP_YEAR} == ${CURRENT_YEAR} ]] || ( sed -i "s#Copyright (c) ${CP_YEAR} Oracle and/or its affiliates#Copyright (c) ${CP_YEAR}, ${CURRENT_YEAR} Oracle and/or its affiliates#g" ${path_to_pom} ; echo ${path_to_pom} ) + unset CP_YEAR + done < "list_of_poms.txt" + ''' + echo '-[ Run release build ]---------------------------------------------------------' + dir(RELEASE_FOLDER) { + //env.JAVA_HOME = JDK_12_HOME + //sh 'mvn clean install -am -Pstaging -pl :jersey-wadl-doclet -DskipTests -B -q -V -Djersey.version=${RELEASE_VERSION}' + env.JAVA_HOME = JDK_21_HOME + sh "mvn clean install -B -q -V -DskipTests -am -Pstaging -Djersey.version=${RELEASE_VERSION} --projects ${MULTIRELEASE_MODULES}" + env.JAVA_HOME = JDK_11_HOME + // + sh "mvn -q -B -V -Djersey.version=${RELEASE_VERSION} -DskipTests -Ddoclint=none -Dadditionalparam='-Xdoclint:none' " + + " -Poss-release,staging -U -C ${TARGET} ${DEPLOY_TARGET}" + //sh "mvn -Poss-release,staging -pl :jersey-wadl-doclet -am install gpg:sign ${DEPLOY_TARGET} -B -q -V -DskipTests -Djersey.version=${RELEASE_VERSION}" + + } + } + stage('Prepare release') { + sh ''' + git checkout -- etc/config/checkstyle-suppressions.xml + ''' + echo '-[ Perform release commit to git ]---------------------------------------------' + sh "git commit -a -m ${RELEASE_VERSION}" + sh "git tag -m ${RELEASE_TAG} -a ${RELEASE_TAG}" + echo '-[ Set next snapshot version ]-------------------------------------------------' + dir(RELEASE_FOLDER) { + sh """ + mvn -q -B -Pstaging -Djersey.version=${RELEASE_VERSION} versions:set -DnewVersion=${NEXT_VERSION} -DgenerateBackupPoms=false + mvn -q -B -Pstaging -Djersey.version=${RELEASE_VERSION} versions:set -DnewVersion=${NEXT_VERSION} -DgenerateBackupPoms=false -f bom/pom.xml + """ + } + echo '-[ Perform commit to git ]-----------------------------------------------------' + sh "git commit -a -m ${NEXT_VERSION}" + } + stage('Publish release') { + if (DRY_RUN == 'true') { + echo '-[ Prepared branch ]----------------------------------------------------------' + sh "git branch --list ${NEW_RELEASE_BRANCH}" + echo '-[ Prepared tag ]-------------------------------------------------------------' + sh "git tag --list ${NEW_RELEASE_BRANCH}" + echo '-[ Prepared commits ]---------------------------------------------------------' + sh 'git log -n 5' + sshagent([CREDENTIALS_ID]) { + sh "git push ${GIT_ORIGIN} ${NEW_RELEASE_BRANCH} --dry-run" + } + return + } else { + sshagent([CREDENTIALS_ID]) { + sh "git push -f ${GIT_ORIGIN} ${NEW_RELEASE_BRANCH} --follow-tags" + } + } + } + stage('Find related staging') { + if (DRY_RUN != 'true') { + if (!STAGING_NAME?.trim()) { + try { + STAGING_NAME = + sh(returnStdout: true, + script: "mvn -Djersey.version=${RELEASE_VERSION} -B --non-recursive -Pstaging nexus-staging:rc-list | awk '/$STAGING_NAME_PATTERN OPEN / {if(a){a = \$2\",\"a} else{a = \$2}}END{print a}'" + ).trim() + } catch (Error err) { + currentBuild.result = 'UNSTABLE' + } + } + echo 'Staging name: ' + STAGING_NAME + } else { + echo 'DRY_RUN' + } + } + stage('Close released staging') { + if (!STAGING_NAME?.trim()) { + echo 'Nothing to be closed' + } else { + sh("mvn -B -q -Pstaging -Djersey.version=${RELEASE_VERSION} nexus-staging:rc-close -DstagingRepositoryId=${STAGING_NAME} -DstagingDescription='${STAGING_DESC}'") + } + } + stage('Drop redundant staging') { + if (!STAGING_PREV_NAME?.trim()) { + echo 'Nothing to be dropped' + } else { + try { + sh(""" + OPEN_STAGINGS=${STAGING_PREV_NAME} + mvn -Djersey.version=${RELEASE_VERSION} -B -q -Pstaging nexus-staging:rc-drop -DstagingRepositoryId=\${OPEN_STAGINGS} + """) + } catch (Error err) { + currentBuild.result = 'UNSTABLE' + } + } + } +} \ No newline at end of file
diff --git a/backups/release/EE8/bundle-apidocs.sh b/backups/release/EE8/bundle-apidocs.sh new file mode 100644 index 0000000..dc360cc --- /dev/null +++ b/backups/release/EE8/bundle-apidocs.sh
@@ -0,0 +1,67 @@ +#!/bin/bash +# +# Copyright (c) 2024 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 +# http://www.eclipse.org/legal/epl-2.0. +# +# This Source Code may also be made available under the following Secondary +# Licenses when the conditions for such availability set forth in the +# Eclipse Public License v. 2.0 are satisfied: GNU General Public License, +# version 2 with the GNU Classpath Exception, which is available at +# https://www.gnu.org/software/classpath/license.html. +# +# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 +# + +# +# script for releasing api docs bundle by release tag. +# +# Input Parameters: +# +# VERSION - type: String +# - example: 2.42 +# - description: Name of the existing version tag in the Git repo. +# +# Configuration: +# +# JDK: +# oracle-jdk8-latest +# Git: +# git@github.com:eclipse-ee4j/jersey.git +# Branches to build: +# tags/${VERSION} +# +# Bindings: +# Secret file: +# Variable: +# KEYRING +# Credentials: +# secret-subkeys.asc +# +# + + + gpg --batch --import ${KEYRING} + for fpr in $(gpg --list-keys --with-colons | awk -F: '/fpr:/ {print $10}' | sort -u); + do + echo -e "5\ny\n" | gpg --batch --command-fd 0 --expert --edit-key $fpr trust; + done + + # Execution environment + MVN_HOME="/opt/tools/apache-maven/latest/" + PATH="${MVN_HOME}/bin:${JAVA_HOME}:/bin:${PATH}" + + if [[ $VERSION == 2* ]] ; + then + export PROFILE_BUNDLE=',jetty2x' + fi + + sed -i "s|org.glassfish.jersey.ext.micrometer|org.glassfish.jersey.ext|g" bundles/apidocs/pom.xml + + echo '-[ Run maven release plugin ]---------------------------------------------------' + + mvn -q -C -DstagingDescription="org.glassfish.jersey.bundles.apidocs:${VERSION}" \ + -Pstaging,oss-release,pre-release${PROFILE_BUNDLE} -DskipTests -Denforcer.skip -pl bundles/apidocs \ + install javadoc:jar gpg:sign deploy -Dsource.mvn.plugin.version=3.2.0 \ No newline at end of file
diff --git a/backups/release/EE8/bundle-examples.sh b/backups/release/EE8/bundle-examples.sh new file mode 100644 index 0000000..61afc00 --- /dev/null +++ b/backups/release/EE8/bundle-examples.sh
@@ -0,0 +1,61 @@ +#!/bin/bash +# +# Copyright (c) 2024 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 +# http://www.eclipse.org/legal/epl-2.0. +# +# This Source Code may also be made available under the following Secondary +# Licenses when the conditions for such availability set forth in the +# Eclipse Public License v. 2.0 are satisfied: GNU General Public License, +# version 2 with the GNU Classpath Exception, which is available at +# https://www.gnu.org/software/classpath/license.html. +# +# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 +# + +# +# script for releasing examples bundle by release tag. +# +# Input Parameters: +# +# VERSION - type: String +# - example: 2.42 +# - description: Name of the existing version tag in the Git repo. +# +# Configuration: +# +# JDK: +# oracle-jdk8-latest +# Git: +# git@github.com:eclipse-ee4j/jersey.git +# Branches to build: +# tags/${VERSION} +# +# Bindings: +# Secret file: +# Variable: +# KEYRING +# Credentials: +# secret-subkeys.asc +# +# + + + gpg --batch --import ${KEYRING} + for fpr in $(gpg --list-keys --with-colons | awk -F: '/fpr:/ {print $10}' | sort -u); + do + echo -e "5\ny\n" | gpg --batch --command-fd 0 --expert --edit-key $fpr trust; + done + + # Execution environment + MVN_HOME="/opt/tools/apache-maven/latest/" + PATH="${MVN_HOME}/bin:${JAVA_HOME}:/bin:${PATH}" + + mvn clean install -C -B -DskipTests -Denforcer.skip -Ppre-release,staging -pl org.glassfish.jersey.examples:project -amd + + mvn -C -B -DstagingDescription="org.glassfish.jersey.examples:${VERSION}" \ + -Pstaging,oss-release,pre-release -Denforcer.skip=true \ + -DskipTests -pl :jersey-examples \ + deploy \ No newline at end of file
diff --git a/backups/release/EE8/bundle-user-guide.sh b/backups/release/EE8/bundle-user-guide.sh new file mode 100644 index 0000000..f6a121d --- /dev/null +++ b/backups/release/EE8/bundle-user-guide.sh
@@ -0,0 +1,70 @@ +#!/bin/bash +# +# Copyright (c) 2024 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 +# http://www.eclipse.org/legal/epl-2.0. +# +# This Source Code may also be made available under the following Secondary +# Licenses when the conditions for such availability set forth in the +# Eclipse Public License v. 2.0 are satisfied: GNU General Public License, +# version 2 with the GNU Classpath Exception, which is available at +# https://www.gnu.org/software/classpath/license.html. +# +# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 +# + +# +# script for releasing User Guide bundle by release tag. +# +# Input Parameters: +# +# VERSION - type: String +# - example: 2.42 +# - description: Name of the existing version tag in the Git repo. +# +# Configuration: +# +# JDK: +# oracle-jdk11-latest +# Git: +# git@github.com:eclipse-ee4j/jersey.git +# Credentials: +# GitHub bot SSH +# Branches to build: +# refs/tags/${VERSION} +# +# Bindings: +# Secret file: +# Variable: +# KEYRING +# Credentials: +# secret-subkeys.asc +# +# + + + gpg --batch --import ${KEYRING} + for fpr in $(gpg --list-keys --with-colons | awk -F: '/fpr:/ {print $10}' | sort -u); + do + echo -e "5\ny\n" | gpg --batch --command-fd 0 --expert --edit-key $fpr trust; + done + + # Execution environment + MVN_HOME="/opt/tools/apache-maven/latest/" + PATH="${MVN_HOME}/bin:${JAVA_HOME}:/bin:${PATH}" + + echo '-[ Set version to ]-'${VERSION} + + mvn -q -Pstaging versions:set -DnewVersion=${VERSION} -DgenerateBackupPoms=false -Djersey.version=${VERSION} + + cd docs + + echo '-[ Run maven release plugin ]---------------------------------------------------' + + mvn -q -C -DstagingDescription="org.glassfish.jersey.jersey-documentation:${VERSION}" \ + -Pstaging,oss-release,pre-release \ + -DskipTests \ + -Djersey.version=${VERSION} \ + install javadoc:jar gpg:sign deploy \ No newline at end of file
diff --git a/backups/release/EE8/release.groovy b/backups/release/EE8/release.groovy new file mode 100644 index 0000000..3a88d31 --- /dev/null +++ b/backups/release/EE8/release.groovy
@@ -0,0 +1,347 @@ +#!/usr/bin/env groovy + +/* + * Copyright (c) 2024 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 + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/** + * Release script for Jakarta EE8/9 Jersey versions + * Release branches are 2.x or 3.0 + * + * Input Parameters: + * RELEASE_VERSION - type: String + * - example: 2.42 + * - Description: mandatory release version. Later is being published to staging/central. + * NEXT_VERSION - type: String + * - example: 2.43-SNAPSHOT + * - Description: mandatory next developing version will be committed in to the release branch and later + * merged into the original release branch for further developing. + * BRANCH - type: Choice Parameter + * - values: 2.x + * 3.0 + * - Description: Original release branch from which the codebase is being checked out + * DRY_RUN - type: Boolean + * - Description: if checked nothing is really committed to Git nor published to the staging + * OVERWRITE - type: Boolean + * - Description: if checked allows replacing of the previously published RELEASE_VERSION of Jersey + * + */ + +node { + + def MVN_HOME = tool name: 'apache-maven-latest', type: 'maven' + def HELP_PLUGIN = 'org.apache.maven.plugins:maven-help-plugin:2.1.1' + def TARGET = 'package javadoc:jar gpg:sign install:install' + def DEPLOY_TARGET = '' + def RELEASE_VERSION = RELEASE_VERSION + def NEXT_VERSION = NEXT_VERSION + def RELEASE_TAG = '' + def NEW_RELEASE_BRANCH = '' + def OVERWRITE = OVERWRITE + def PROJECT_NAME = 'Jersey' + def LOGIN = 'jersey-bot' + def EMAIL = 'jersey-bot@eclipse.org' + def REPO = 'git@github.com:eclipse-ee4j/jersey.git' + def SECRET_FILE_ID = 'secret-subkeys.asc' + def CREDENTIALS_ID = 'github-bot-ssh' + def GIT_ORIGIN = 'origin' + def RELEASE_FOLDER = env.WORKSPACE + def RELEASE_BRANCH = BRANCH + + def STAGING_NAME_PATTERN = 'orgglassfishjersey-[0-9]+' + def STAGING_NAME = '' + def STAGING_PREV_NAME = '' + def STAGING_OPEN_NAME = '' + def STAGING_DESC = 'org.glassfish.jersey:' + RELEASE_VERSION + def STAGING_BOM_DESC = 'org.glassfish.jersey.bom:' + RELEASE_VERSION + def STAGING_PROFILE_ID = '70fa3a107a8918' + + def JDK_11_HOME = tool name: 'openjdk-jdk11-latest', type: 'jdk' + def JDK_12_HOME = tool name: 'openjdk-jdk12-latest', type: 'jdk' + def JDK_17_HOME = tool name: 'openjdk-jdk17-latest', type: 'jdk' + def JDK_8_HOME = tool name: 'oracle-jdk8-latest', type: 'jdk' + + def ZX_BRANCH_MODULES = ',:jersey-jetty-connector,:jersey-container-jetty-http,:jersey-container-jetty-servlet,:jersey-test-framework-provider-jetty,:jersey-test-framework-core,:jersey-container-servlet-core' + + env.JAVA_HOME = JDK_8_HOME + env.PATH = "${env.JAVA_HOME}/bin:${env.PATH}:${MVN_HOME}/bin" + + if (RELEASE_BRANCH == '2.x') { + ZX_BRANCH_MODULES = '' + } + + sh 'java -version' + + stage('Fetch from git') { + git(branch: RELEASE_BRANCH, credentialsId: CREDENTIALS_ID, url: REPO) + } + stage('Prepare environment') { + + dir(RELEASE_FOLDER) { + //# Check whether top level pom.xml contains SNAPSHOT version + if (!sh(returnStdout: true, script: "grep '<version>' pom.xml | grep 'SNAPSHOT'")?.trim()) { + error('-[ Missing SNAPSHOT version in POM! ]-------------------------------------------') + } + + //# Compute release versions + def SNAPSHOT_VERSION = sh(returnStdout: true, script: 'mvn -q -Dexec.executable="echo" -Dexec.args=\'${project.version}\' --non-recursive exec:exec -Pstaging').trim() + + if (!RELEASE_VERSION?.trim()) { + if (!SNAPSHOT_VERSION?.trim()) { + error('-[ Missing required snapshot version number! ]----------------------------------') + } else { + def versionTokens = SNAPSHOT_VERSION.split('-') + RELEASE_VERSION = versionTokens[0] + } + } + + if (!NEXT_VERSION?.trim()) { + def (MAJOR_VERSION, MINOR_VERSION) = RELEASE_VERSION.tokenize('.') + def NEXT_MINOR_VERSION = (MINOR_VERSION as Integer) + 1 + NEXT_VERSION = MAJOR_VERSION + '.' + NEXT_MINOR_VERSION + '-SNAPSHOT' + } + + RELEASE_TAG = RELEASE_VERSION + NEW_RELEASE_BRANCH = RELEASE_VERSION+'-BRANCH' + + echo "Current version: ${SNAPSHOT_VERSION}" + echo "Release version: ${RELEASE_VERSION}" + echo "Next version: ${NEXT_VERSION}" + echo "Release tag: ${RELEASE_TAG}" + echo "Release branch: ${NEW_RELEASE_BRANCH}" + + if (!SNAPSHOT_VERSION?.trim() || !RELEASE_VERSION?.trim() || !NEXT_VERSION?.trim()) { + error '-[ Missing required version numbers! ]------------------------------------------' + } + + if (DRY_RUN == 'true') { + echo '-[ Dry run turned on ]----------------------------------------------------------' + //TARGET = 'install' + } else { + DEPLOY_TARGET = ' deploy:deploy' + } + echo '-[ Configure git user ]--------------------------------------------------------' + sh "git config --local user.email \"${EMAIL}\"" + sh "git config --local user.name \"$LOGIN\"" + + } + + } + stage('Prepare GPG') { + withCredentials([file(credentialsId: SECRET_FILE_ID, variable: 'KEYRING')]) { + //# Workaround: GPG initialization + sh("gpg --batch --import ${KEYRING}") + sh ''' + for fpr in $(gpg --list-keys --with-colons | awk -F: '/fpr:/ {print $10}' | sort -u); + do + echo -e "5\ny\n" | gpg --batch --command-fd 0 --expert --edit-key $fpr trust; + done + ''' + } + } + stage('Prepare branch') { + echo '-[ Prepare branch ]-------------------------------------------------------------' + + echo '-[ Switching to release branch ]-------------------------------------------------' + sh """ + git checkout ${GIT_ORIGIN}/${RELEASE_BRANCH} && true + git reset --hard ${GIT_ORIGIN}/${RELEASE_BRANCH} && true + git checkout -B ${NEW_RELEASE_BRANCH} + """ + echo '-[ Release tag cleanup ]--------------------------------------------------------' + def TAG_NAME = sh(returnStdout: true, script: "git tag | grep ${RELEASE_TAG} || true").trim() + if (RELEASE_TAG == TAG_NAME) { + if (OVERWRITE == 'true') { + echo "${RELEASE_TAG} tag already exists, deleting" + sshagent([CREDENTIALS_ID]) { + sh "git push --delete origin ${RELEASE_TAG} && true" + } + } else { + error "${RELEASE_TAG} tag already exists" + } + //# Always delete local tag if exists + sh """ + git tag --delete ${RELEASE_TAG} && true + """ + } + sh ''' + sed -i 's|<suppress files="generated" checks=".*"/>|<suppress files="generated" checks=".*"/><suppress files="unpacked-src" checks=".*"/>|g' etc/config/checkstyle-suppressions.xml + ''' + } + stage('Check previous stagings') { + if (DRY_RUN == 'true') { + echo DRY_RUN + ' ------' + } else { + if (OVERWRITE == 'true') { + STAGING_PREV_NAME = sh(returnStdout: true, + script: "mvn -B --non-recursive -Pstaging nexus-staging:rc-list | awk '/\\[INFO] $STAGING_NAME_PATTERN[ ]+CLOSED[ ]+$STAGING_DESC[ ]*\$/ {if(a){a = \$2\",\"a} else{a = \$2}}END{print a}'").trim() + echo 'Previously closed staging name: ' + STAGING_PREV_NAME + } + + STAGING_OPEN_NAME = sh(returnStdout: true, + script: "mvn -B --non-recursive -Pstaging nexus-staging:rc-list | awk '/$STAGING_NAME_PATTERN OPEN / {if(a){a = \$2\",\"a} else{a = \$2}}END{print a}'").trim() + + if (!STAGING_OPEN_NAME?.trim()) { + echo 'No currently open stagings' + } else { + echo 'Currently open redundand staging: ' + STAGING_OPEN_NAME + ', immediately closing' + sh """ + OPEN_STAGINGS=${STAGING_OPEN_NAME} + mvn -B -q -Pstaging nexus-staging:rc-drop -DstagingRepositoryId=\${OPEN_STAGINGS} + """ + } + } + } + /* + stage('Open new staging') { + if (DRY_RUN == 'true') { + echo DRY_RUN + ' ------' + } else { + STAGING_NAME = sh(returnStdout: true, + script: "mvn -B --non-recursive -Pstaging -DstagingProfileId=${STAGING_PROFILE_ID} -DstagingDescription=${STAGING_DESC} nexus-staging:rc-open | awk '/\\[INFO] Opened / {print \$3}'").trim() + echo 'New staging name: '+STAGING_NAME + } + }*/ + stage("Build ${PROJECT_NAME}") { + echo env.JAVA_HOME + echo '-[ Run maven release ]---------------------------------------------------------' + echo '-[ Set Release version ]-------------------------------------------------------' + sh """ + cd ${RELEASE_FOLDER} + mvn -B -V -Pstaging versions:set -DnewVersion=${RELEASE_VERSION} -DgenerateBackupPoms=false + cd bom + mvn -B -V -Pstaging versions:set -DnewVersion=${RELEASE_VERSION} -DgenerateBackupPoms=false + cd .. + """ + echo '-[ Update Copyright years ]----------------------------------------------------' + sh '''#!/bin/bash -e + + export CURRENT_YEAR=`date '+%Y'` + export SED_CMD_LINE='sed -i "s#, 20.. Oracle and/or its affiliates#, ${CURRENT_YEAR} Oracle and/or its affiliates#g"' + + git status --porcelain --untracked-files=no > modified_pom.log + cp modified_pom.log list_of_poms.txt + sed -i "s| M |$SED_CMD_LINE |g" modified_pom.log + sed -i "s| M ||g" list_of_poms.txt + + bash modified_pom.log + + echo ${CURRENT_YEAR} current year + + while IFS= read -r path_to_pom + do + export CP_YEAR=`grep -o 'Copyright (c) 20.. Oracle and/or its affiliates' ${path_to_pom} | awk '{print $3}'` + [[ -z ${CP_YEAR} ]] && CP_YEAR=${CURRENT_YEAR} || echo ${CP_YEAR} + [[ ${CP_YEAR} == ${CURRENT_YEAR} ]] || ( sed -i "s#Copyright (c) ${CP_YEAR} Oracle and/or its affiliates#Copyright (c) ${CP_YEAR}, ${CURRENT_YEAR} Oracle and/or its affiliates#g" ${path_to_pom} ; echo ${path_to_pom} ) + unset CP_YEAR + done < "list_of_poms.txt" + ''' + echo '-[ Run release build ]---------------------------------------------------------' + dir(RELEASE_FOLDER) { + env.JAVA_HOME = JDK_12_HOME + // + sh "mvn -am -Pstaging --projects core-server,core-client,media/jaxb,inject/hk2,ext/wadl-doclet,core-common${ZX_BRANCH_MODULES} clean install -B -q -V -DskipTests" + if (RELEASE_BRANCH == '3.0') { + env.JAVA_HOME = JDK_17_HOME + sh "mvn clean install -B -q -V -DskipTests -am -Pstaging --projects :jersey-spring6,connectors/helidon-connector" + } + env.JAVA_HOME = JDK_8_HOME + sh "mvn -q -B -V -DskipTests -Ddoclint=none -Dadditionalparam='-Xdoclint:none' -Dcheckstyle.skip " + + //" -DstagingDescription='${STAGING_DESC}' -DstagingRepositoryId='${STAGING_NAME}' "+ + " -Poss-release,staging -U -C ${TARGET} ${DEPLOY_TARGET}" + + sh "mvn -Poss-release,staging --projects core-server,core-client,media/jaxb,inject/hk2,ext/wadl-doclet,core-common install gpg:sign ${DEPLOY_TARGET} -B -q -V -DskipTests" + if (RELEASE_BRANCH == '2.x') { + env.JAVA_HOME = JDK_11_HOME + sh "mvn -Poss-release,staging --projects connectors/helidon-connector install gpg:sign ${DEPLOY_TARGET} -B -q -V -DskipTests" + } + } + } + stage('Prepare release') { + sh ''' + git checkout -- etc/config/checkstyle-suppressions.xml + ''' + echo '-[ Perform release commit to git ]---------------------------------------------' + sh "git commit -a -m ${RELEASE_VERSION}" + sh "git tag -m ${RELEASE_TAG} -a ${RELEASE_TAG}" + echo '-[ Set next snapshot version ]-------------------------------------------------' + dir(RELEASE_FOLDER) { + sh """ + mvn -B -Pstaging versions:set -DnewVersion=${NEXT_VERSION} -DgenerateBackupPoms=false + cd bom + mvn -B -Pstaging versions:set -DnewVersion=${NEXT_VERSION} -DgenerateBackupPoms=false + cd .. + """ + } + echo '-[ Perform commit to git ]-----------------------------------------------------' + sh "git commit -a -m ${NEXT_VERSION}" + } + stage('Publish release') { + if (DRY_RUN == 'true') { + echo '-[ Prepared branch ]----------------------------------------------------------' + sh "git branch --list ${NEW_RELEASE_BRANCH}" + echo '-[ Prepared tag ]-------------------------------------------------------------' + sh "git tag --list ${NEW_RELEASE_BRANCH}" + echo '-[ Prepared commits ]---------------------------------------------------------' + sh 'git log -n 5' + sshagent([CREDENTIALS_ID]) { + sh "git push ${GIT_ORIGIN} ${NEW_RELEASE_BRANCH} --dry-run" + } + return + } else { + sshagent([CREDENTIALS_ID]) { + sh "git push -f ${GIT_ORIGIN} ${NEW_RELEASE_BRANCH} --follow-tags" + } + } + } + stage('Find related staging') { + if (DRY_RUN != 'true') { + if (!STAGING_NAME?.trim()) { + try { + STAGING_NAME = + sh(returnStdout: true, + script: "mvn -B --non-recursive -Pstaging nexus-staging:rc-list | awk '/$STAGING_NAME_PATTERN OPEN / {if(a){a = \$2\",\"a} else{a = \$2}}END{print a}'" + ).trim() + } catch (Error err) { + currentBuild.result = 'UNSTABLE' + } + } + echo 'Staging name: ' + STAGING_NAME + } else { + echo 'DRY_RUN' + } + } + stage('Close released staging') { + if (!STAGING_NAME?.trim()) { + echo 'Nothing to be closed' + } else { + sh("mvn -B -q -Pstaging nexus-staging:rc-close -DstagingRepositoryId=${STAGING_NAME} -DstagingDescription='${STAGING_DESC}'") + } + } + stage('Drop redundant staging') { + if (!STAGING_PREV_NAME?.trim()) { + echo 'Nothing to be dropped' + } else { + try { + sh(""" + OPEN_STAGINGS=${STAGING_PREV_NAME} + mvn -B -q -Pstaging nexus-staging:rc-drop -DstagingRepositoryId=\${OPEN_STAGINGS} + """) + } catch (Error err) { + currentBuild.result = 'UNSTABLE' + } + } + } +} \ No newline at end of file
diff --git a/backups/release/Release-After/list-closed-stagings.sh b/backups/release/Release-After/list-closed-stagings.sh new file mode 100644 index 0000000..d5f32ca --- /dev/null +++ b/backups/release/Release-After/list-closed-stagings.sh
@@ -0,0 +1,94 @@ +#!/bin/bash +# +# Copyright (c) 2024 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 +# http://www.eclipse.org/legal/epl-2.0. +# +# This Source Code may also be made available under the following Secondary +# Licenses when the conditions for such availability set forth in the +# Eclipse Public License v. 2.0 are satisfied: GNU General Public License, +# version 2 with the GNU Classpath Exception, which is available at +# https://www.gnu.org/software/classpath/license.html. +# +# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 +# + +# +# script for listing staging from the staging repo. +# +# Input Parameters: +# ----none---- +# Configuration: +# +# JDK: +# (System) +# Git: +# ----none---- +# +# + +cat <<EOT >> pom.xml +<?xml version="1.0" encoding="UTF-8"?> +<!-- + + Copyright (c) 2024 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 + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--> + +<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 http://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.eclipse.ee4j</groupId> + <artifactId>project</artifactId> + <version>1.0.9</version> + <relativePath/> + </parent> + + <groupId>org.glassfish.jersey</groupId> + <artifactId>release-helper-util</artifactId> + <version>1.0.1-SNAPSHOT</version> + <packaging>pom</packaging> + + <name>Jersey Release Helper</name> + + <description>Generated POM for Jersey Release Helper utils</description> + <url>https://projects.eclipse.org/projects/ee4j.jersey</url> + + <scm> + <connection>scm:git:git://github.com/eclipse-ee4j/jersey</connection> + <developerConnection>scm:git:git://github.com/eclipse-ee4j/jersey</developerConnection> + <url>https://github.com/eclipse-ee4j/jersey</url> + </scm> + +</project> +EOT + +MVN_HOME="/opt/tools/apache-maven/latest/" +PATH="${MVN_HOME}/bin:${JAVA_HOME}:/bin:${PATH}" + +export STAGING_PARAMS='-DnexusUrl=https://jakarta.oss.sonatype.org/ -DserverId=ossrh' +export STAGING_PLUGIN='org.sonatype.plugins:nexus-staging-maven-plugin:1.6.7' + + +mvn -B ${STAGING_PARAMS} ${STAGING_PLUGIN}:rc-list | grep orgglassfishjersey > closed_stagings.txt || true + + +# +# +# Archive the artifacts: +# closed_stagings.txt +#
diff --git a/backups/release/Release-After/populate-documentation.sh b/backups/release/Release-After/populate-documentation.sh new file mode 100644 index 0000000..025e512 --- /dev/null +++ b/backups/release/Release-After/populate-documentation.sh
@@ -0,0 +1,166 @@ +#!/bin/bash -lex +# +# Copyright (c) 2024 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 +# http://www.eclipse.org/legal/epl-2.0. +# +# This Source Code may also be made available under the following Secondary +# Licenses when the conditions for such availability set forth in the +# Eclipse Public License v. 2.0 are satisfied: GNU General Public License, +# version 2 with the GNU Classpath Exception, which is available at +# https://www.gnu.org/software/classpath/license.html. +# +# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 +# + +# +# script for api docs publishing. Publishes api docs from the bundle in the Maven Central to the project's site. +# +# Input Parameters: +# RELEASE_VERSION - type: String +# - example: 3.1.6 +# - description: version for which project info is being published +# DRY_RUN - type: Boolean +# - description: If checked nothing is being published/generated +# WEBSITE_URL - type: String +# - value: git@github.com:eclipse-ee4j/jersey.github.io.git +# - description: GitHub url for the project info/apidocs repository. +# Mandatory and changes only in exceptional cases +# BRANCH_SPECIFIER - type: String +# - example: 2.x +# - description: Branch for which the api docs are being published. Used only in Git commit message +# UPDATE_LATEST - type: Boolean +# - description: If checked updates the latest api docs (distinguishes for EE8/EE9/EE10) along +# with publication into the RELEASE_VERSION folder. +# Configuration: +# +# JDK: +# oracle-jdk8-latest +# Git: +# ----none---- +# +# SSH agent: +# GitHub bot SSH +# +# +# + + +# +# The first shell execution +# + + +TOOLS_PREFIX=/opt/tools +#JAVA_PREFIX=/opt/tools/java/oracle +MVN_HOME=/opt/tools/apache-maven/latest +#JAVA_HOME=/opt/tools/java/oracle/jdk-8/latest +PATH=/opt/tools/apache-maven/latest/bin:${JAVA_HOME}/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin + +export CENTRAL_URL='https://repo1.maven.org/maven2' +export STAGING_URL='https://jakarta.oss.sonatype.org/content/repositories/staging' + +# !!! if build docbook it's essentially important to turn the pre-release profile ON !!! +#mvn clean install -Pstaging,pre-release -DskipTests -V -q -e -U -B -f docs/pom.xml -Djersey.version=$RELEASE_VERSION +# however we download already published docbook from staging/central: +mkdir -p $WORKSPACE/docs/target/docbook/index +cd $WORKSPACE/docs/target/docbook/index +wget -nv ${STAGING_URL}/org/glassfish/jersey/jersey-documentation/${RELEASE_VERSION}/jersey-documentation-${RELEASE_VERSION}-docbook.zip +unzip -o jersey-documentation-${RELEASE_VERSION}-docbook.zip +rm jersey-documentation-${RELEASE_VERSION}-docbook.zip + +mkdir -p $WORKSPACE/target/site/apidocs +cd $WORKSPACE/target/site/apidocs +wget -nv ${STAGING_URL}/org/glassfish/jersey/bundles/apidocs/${RELEASE_VERSION}/apidocs-${RELEASE_VERSION}-javadoc.jar -O apidocs-javadoc.jar +jar -xf apidocs-javadoc.jar +rm apidocs-javadoc.jar +rm -rf META-INF + + +# +# The second shell execution +# + + +#!/bin/bash -lex + +TOOLS_PREFIX=/opt/tools +#JAVA_PREFIX=/opt/tools/java/oracle +MVN_HOME=/opt/tools/apache-maven/latest +#JAVA_HOME=/opt/tools/java/oracle/jdk-8/latest +PATH=/opt/tools/apache-maven/latest/bin:${JAVA_HOME}/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin + +DIRS="$RELEASE_VERSION" +if $UPDATE_LATEST; +then + if [[ $RELEASE_VERSION == 2* ]] ; + then + export DIRS="latest $DIRS" + elif [[ $RELEASE_VERSION == 3.1* ]] ; + then + export DIRS="latest31x $DIRS" + else + export DIRS="latest30x $DIRS" + fi + echo ${DIRS} for ${RELEASE_VERSION} release +fi + +#export PATH=/opt/csw/bin:$PATH +WEB_DIR=$WORKSPACE/target/jersey-web + + +function copyDocs { + APIDOCS_DIR=$WEB_DIR/apidocs/$1 + DOCS_DIR=$WEB_DIR/documentation/$1 + + # + # API docs + # + if test ! -e $APIDOCS_DIR ; then + mkdir -p $APIDOCS_DIR + fi + cd $APIDOCS_DIR + + rm -rf jersey || true + cp -R $WORKSPACE/target/site/apidocs ./jersey + + # + # user guide + # + rm -rf $DOCS_DIR || true + mkdir -p $DOCS_DIR + cp -r $WORKSPACE/docs/target/docbook/index/* $DOCS_DIR + rm $DOCS_DIR/*.fo || true +} + +if test -e $WEB_DIR ; then + rm -rf $WEB_DIR +fi + +# would couse shallow reject: git clone --depth 1 $WEBSITE_URL $WEB_DIR +git clone $WEBSITE_URL $WEB_DIR + +cd $WEB_DIR + +for dir in $DIRS; do + copyDocs $dir +done + +cd $WEB_DIR + +git config --local user.email "jersey-bot@eclipse.org" +git config --local user.name "jersey-bot" +git add -A . +git diff --cached --exit-code || git commit -m "[jenkins] automatic javadoc and documentation update [$RELEASE_VERSION @ $BRANCH_SPECIFIER]" + +if [ "$DRY_RUN" = "false" ]; then + echo "Pushing Web sources to $WEBSITE_URL" + git push origin master +else + echo "Dry run .. not pushing to the master" + git push origin master --dry-run +fi + +
diff --git a/backups/release/Release-After/publish-release-notes.sh b/backups/release/Release-After/publish-release-notes.sh new file mode 100644 index 0000000..d547134 --- /dev/null +++ b/backups/release/Release-After/publish-release-notes.sh
@@ -0,0 +1,109 @@ +#!/bin/bash +# +# Copyright (c) 2024 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 +# http://www.eclipse.org/legal/epl-2.0. +# +# This Source Code may also be made available under the following Secondary +# Licenses when the conditions for such availability set forth in the +# Eclipse Public License v. 2.0 are satisfied: GNU General Public License, +# version 2 with the GNU Classpath Exception, which is available at +# https://www.gnu.org/software/classpath/license.html. +# +# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 +# + +# +# script for publishing listed stagings from the staging repo into the Maven Central. +# +# Input Parameters: +# VERSION - type: String +# - example: 3.1.6 +# - description: version for which release notes are being published +# DRY_RUN - type: Boolean +# - description: If checked nothing is being published/generated +# PUBLISH_TO_GITHUB - type: Boolean +# - description: If checked generated notes are propagated to GitHub +# Configuration: +# +# JDK: +# oracle-jdk8-latest +# Git: +# https://github.com/eclipse-ee4j/jersey +# +# Bindings: +# Username and password (separated): +# Username Variable: +# BOT_NAME +# Password Variable: +# BOT_PASSWORD +# Credentials: +# GitHub bot (username/token) +# +# +# + + +cat <<EOT >> pom.xml +<?xml version="1.0" encoding="UTF-8"?> +<!-- + + Copyright (c) 2024 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 + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--> + +<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 http://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.eclipse.ee4j</groupId> + <artifactId>project</artifactId> + <version>1.0.9</version> + <relativePath/> + </parent> + + <groupId>org.glassfish.jersey</groupId> + <artifactId>release-helper-util</artifactId> + <version>1.0.1-SNAPSHOT</version> + <packaging>pom</packaging> + + <name>Jersey Release Helper</name> + + <description>Generated POM for Jersey Release Helper utils</description> + <url>https://projects.eclipse.org/projects/ee4j.jersey</url> + + <scm> + <connection>scm:git:git://github.com/eclipse-ee4j/jersey</connection> + <developerConnection>scm:git:git://github.com/eclipse-ee4j/jersey</developerConnection> + <url>https://github.com/eclipse-ee4j/jersey</url> + </scm> + +</project> +EOT + +# Execution environment +readonly MVN_HOME="/opt/tools/apache-maven/latest/" +PATH="${MVN_HOME}/bin:${JAVA_HOME}:/bin:${PATH}" +readonly RELEASE_DATE=`date -I` + +mkdir -p target + +mvn -B -V org.glassfish.jersey.tools.plugins:jersey-release-notes-maven-plugin:1.0.1:release-notes -DskipTests \ +-DreleaseVersion=${VERSION} -DgithubLogin=${BOT_NAME} -DgithubPassword=${BOT_PASSWORD} \ +-DtemplateFilePath=release-note.html -DreleaseDate=${RELEASE_DATE} \ +-DdryRun=${DRY_RUN} -DpublishToGithub=${PUBLISH_TO_GITHUB} + +cp -a `pwd`/target/release-notes ${WORKSPACE} \ No newline at end of file
diff --git a/backups/release/Release-After/release-note.html b/backups/release/Release-After/release-note.html new file mode 100644 index 0000000..f0e5996 --- /dev/null +++ b/backups/release/Release-After/release-note.html
@@ -0,0 +1,78 @@ +<html> +<!-- + + Copyright (c) 2024 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 + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--> +<head> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> + <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" /> + <meta name="google-site-verification" content="OiKukTHVW4bdQqx8Fq0zA2EZ_hI6-yYL-MvkCxBxaFs" /> + <title>Release Notes - Jersey @LATEST_VERSION@</title> +</head> + +<body> + +<h1>Release Notes - <a href="/">Jersey</a> @LATEST_VERSION@</h1> + +Release date: <strong>@RELEASE_DATE@</strong> + +<h2>Previous releases</h2> + +<ul> + <li><a href="2.29.1.html">Jersey 2.29.1 Release Notes</a></li> + <li><a href="2.29.html">Jersey 2.29 Release Notes</a></li> + <li><a href="2.28.html">Jersey 2.28 Release Notes</a></li> + <li><a href="2.25.1.html">Jersey 2.25.1 Release Notes</a></li> + <li><a href="2.25.html">Jersey 2.25 Release Notes</a></li> + <li><a href="2.24.1.html">Jersey 2.24.1 Release Notes</a></li> + <li><a href="2.24.html">Jersey 2.24 Release Notes</a></li> + <li><a href="2.23.2.html">Jersey 2.23.2 Release Notes</a></li> + <li><a href="2.23.1.html">Jersey 2.23.1 Release Notes</a></li> + <li><a href="2.23.html">Jersey 2.23 Release Notes</a></li> + <li><a href="2.22.2.html">Jersey 2.22.2 Release Notes</a></li> + <li><a href="2.22.1.html">Jersey 2.22.1 Release Notes</a></li> + <li><a href="2.22.html">Jersey 2.22 Release Notes</a></li> + <li><a href="2.21.1.html">Jersey 2.21.1 Release Notes</a></li> + <li><a href="2.21.html">Jersey 2.21 Release Notes</a></li> + <li><a href="2.20.html">Jersey 2.20 Release Notes</a></li> + <li><a href="2.19.html">Jersey 2.19 Release Notes</a></li> + <li><a href="2.18.html">Jersey 2.18 Release Notes</a></li> + <li><a href="2.17.html">Jersey 2.17 Release Notes</a></li> + <li><a href="2.16.html">Jersey 2.16 Release Notes</a></li> + <li><a href="2.14.html">Jersey 2.14 Release Notes</a></li> + <li><a href="2.13.html">Jersey 2.13 Release Notes</a></li> + <li><a href="2.12.html">Jersey 2.12 Release Notes</a></li> + <li><a href="2.11.html">Jersey 2.11 Release Notes</a></li> + <li><a href="2.10.1.html">Jersey 2.10.1 Release Notes</a></li> + <li><a href="2.10.html">Jersey 2.10 Release Notes</a></li> + <li><a href="2.9.1.html">Jersey 2.9.1 Release Notes</a></li> + <li><a href="2.9.html">Jersey 2.9 Release Notes</a></li> + <li><a href="2.8.html">Jersey 2.8 Release Notes</a></li> + <li><a href="2.7.html">Jersey 2.7 Release Notes</a></li> + <li><a href="2.6.html">Jersey 2.6 Release Notes</a></li> + <li><a href="2.5.1.html">Jersey 2.5.1 Release Notes</a></li> + <li><a href="2.5.html">Jersey 2.5 Release Notes</a></li> + <li><a href="2.4.1.html">Jersey 2.4.1 Release Notes</a></li> + <li><a href="2.4.html">Jersey 2.4 Release Notes</a></li> + <li><a href="2.3.1.html">Jersey 2.3.1 Release Notes</a></li> + <li><a href="2.3.html">Jersey 2.3 Release Notes</a></li> + <li><a href="2.2.html">Jersey 2.2 Release Notes</a></li> + <li><a href="2.1.html">Jersey 2.1 Release Notes</a></li> + <li><a href="2.0.html">Jersey 2.0 Release Notes</a></li> +</ul> + +</body> +</html>
diff --git a/backups/release/Release-After/release-project-info.sh b/backups/release/Release-After/release-project-info.sh new file mode 100644 index 0000000..ebfe9b1 --- /dev/null +++ b/backups/release/Release-After/release-project-info.sh
@@ -0,0 +1,103 @@ +#!/bin/bash -lex +# +# Copyright (c) 2024 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 +# http://www.eclipse.org/legal/epl-2.0. +# +# This Source Code may also be made available under the following Secondary +# Licenses when the conditions for such availability set forth in the +# Eclipse Public License v. 2.0 are satisfied: GNU General Public License, +# version 2 with the GNU Classpath Exception, which is available at +# https://www.gnu.org/software/classpath/license.html. +# +# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 +# + +# +# script for project info publishing. MUST BE RUN ONLY AFTER THE APIDOCS PUBLISHING. +# +# Input Parameters: +# RELEASE_VERSION - type: String +# - example: 3.1.6 +# - description: version for which project info is being published +# DRY_RUN - type: Boolean +# - description: If checked nothing is being published/generated +# WEBSITE_URL - type: String +# - value: git@github.com:eclipse-ee4j/jersey.github.io.git +# - description: GitHub url for the project info/apidocs repository. +# Mandatory and changes only in exceptional cases +# Configuration: +# +# JDK: +# openjdk-jdk11-latest +# Git: +# https://github.com/eclipse-ee4j/jersey +# +# Branches to build: +# tags/${RELEASE_VERSION} +# +# SSH agent: +# GitHub bot SSH +# +# +# + + +# +# The first shell execution +# + +MVN_HOME=/opt/tools/apache-maven/latest +PATH=${PATH}:${MVN_HOME}/bin:${JAVA_HOME}/bin + +mvn clean install -B -V -q -PtestsSkip,checkstyleSkip -Dtests.excluded -DskipTests '-Dmaven.test.skip=true' + +mvn -B -V -q -Pproject-info,checkstyleSkip,testsSkip,findbugsSkip,staging site site:stage \ + -DgenerateProjectInfo=true -Dtests.excluded -Ddependency.locations.enabled=false \ + -Dmaven.jxr.skip=true -Dmaven.javadoc.skip=true -Dcheckstyle.skip=true -DskipTests \ + -Dfindbugs.skip=true + +# +# The second shell execution +# + +#!/bin/bash -lex + +export PATH=/opt/csw/bin:$PATH +WEB_DIR=$WORKSPACE/target/jersey-web +PROJECT_INFO_DIR=$WEB_DIR/project-info/$RELEASE_VERSION + +if test -e $WEB_DIR ; then + rm -rf $WEB_DIR +fi + +# would couse shallow reject: git clone --depth 1 $WEBSITE_SOURCE_URL $WEB_DIR +git clone $WEBSITE_URL $WEB_DIR +cd $WEB_DIR + +if test ! -e $PROJECT_INFO_DIR ; then + mkdir -p $PROJECT_INFO_DIR +fi + +cd $PROJECT_INFO_DIR + +rm -rf jersey || true +cp -R $WORKSPACE/target/staging ./jersey + +cd $WEB_DIR + +git config --local user.email "jersey-bot@eclipse.org" +git config --local user.name "jersey-bot" +git add -A . +#git diff --cached --exit-code || +git commit -m "[jenkins] automatic project-info update [$RELEASE_VERSION]" + +if [ "$DRY_RUN" = "false" ]; then + echo Pushing Web sources to $WEBSITE_URL + git push origin master +else + echo "Dry run .. not pushing to the master" + git push origin master --dry-run +fi \ No newline at end of file
diff --git a/backups/release/Release-After/release-staging-to-central.sh b/backups/release/Release-After/release-staging-to-central.sh new file mode 100644 index 0000000..b470730 --- /dev/null +++ b/backups/release/Release-After/release-staging-to-central.sh
@@ -0,0 +1,93 @@ +#!/bin/bash +# +# Copyright (c) 2024 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 +# http://www.eclipse.org/legal/epl-2.0. +# +# This Source Code may also be made available under the following Secondary +# Licenses when the conditions for such availability set forth in the +# Eclipse Public License v. 2.0 are satisfied: GNU General Public License, +# version 2 with the GNU Classpath Exception, which is available at +# https://www.gnu.org/software/classpath/license.html. +# +# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 +# + +# +# script for publishing listed stagings from the staging repo into the Maven Central. +# +# Input Parameters: +# STAGING_REPO_ID - type: String +# - example: orgglassfishjersey-1226,orgglassfishjersey-1227,orgglassfishjersey-1228,orgglassfishjersey-1229,orgglassfishjersey-1230 +# - description: list all staggings (comma separated) to be published to the Maven Central +# STAGING_DESC - type: String +# - example:org.glassfish.jersey:2.42 +# - description: description of what is published. Usually <group.id>:<version> +# Configuration: +# +# JDK: +# (System) +# Git: +# ----none---- +# +# + +cat <<EOT >> pom.xml +<?xml version="1.0" encoding="UTF-8"?> +<!-- + + Copyright (c) 2024 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 + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--> + +<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 http://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.eclipse.ee4j</groupId> + <artifactId>project</artifactId> + <version>1.0.9</version> + <relativePath/> + </parent> + + <groupId>org.glassfish.jersey</groupId> + <artifactId>release-helper-util</artifactId> + <version>1.0.1-SNAPSHOT</version> + <packaging>pom</packaging> + + <name>Jersey Release Helper</name> + + <description>Generated POM for Jersey Release Helper utils</description> + <url>https://projects.eclipse.org/projects/ee4j.jersey</url> + + <scm> + <connection>scm:git:git://github.com/eclipse-ee4j/jersey</connection> + <developerConnection>scm:git:git://github.com/eclipse-ee4j/jersey</developerConnection> + <url>https://github.com/eclipse-ee4j/jersey</url> + </scm> + +</project> +EOT + +MVN_HOME="/opt/tools/apache-maven/latest/" +PATH="${MVN_HOME}/bin:${JAVA_HOME}:/bin:${PATH}" + +export STAGING_PARAMS='-DnexusUrl=https://jakarta.oss.sonatype.org/ -DserverId=ossrh' +export STAGING_PLUGIN='org.sonatype.plugins:nexus-staging-maven-plugin:1.6.7' + + +mvn ${STAGING_PARAMS} -B -C -V ${STAGING_PLUGIN}:rc-release -DstagingRepositoryId="${STAGING_REPO_ID}" -DstagingDescription="${STAGING_DESC}" +
diff --git a/etc/epl.svg b/etc/epl.svg new file mode 100644 index 0000000..ae31efb --- /dev/null +++ b/etc/epl.svg
@@ -0,0 +1,18 @@ +<!-- + + Copyright (c) 2019 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 + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--> +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="100" height="20"><linearGradient id="b" x2="0" y2="100%"><stop offset="0" stop-color="#bbb" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient><clipPath id="a"><rect width="100" height="20" rx="3" fill="#fff"/></clipPath><g clip-path="url(#a)"><path fill="#555" d="M0 0h47v20H0z"/><path fill="#97ca00" d="M47 0h53v20H47z"/><path fill="url(#b)" d="M0 0h100v20H0z"/></g><g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="110"> <text x="245" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="370">license</text><text x="245" y="140" transform="scale(.1)" textLength="370">license</text><text x="725" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="430">EPL-2.0</text><text x="725" y="140" transform="scale(.1)" textLength="430">EPL-2.0</text></g> </svg> \ No newline at end of file
diff --git a/etc/gpl.svg b/etc/gpl.svg new file mode 100644 index 0000000..73f820b --- /dev/null +++ b/etc/gpl.svg
@@ -0,0 +1,18 @@ +<!-- + + Copyright (c) 2019 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 + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--> +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="132" height="20"><linearGradient id="b" x2="0" y2="100%"><stop offset="0" stop-color="#bbb" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient><clipPath id="a"><rect width="132" height="20" rx="3" fill="#fff"/></clipPath><g clip-path="url(#a)"><path fill="#555" d="M0 0h47v20H0z"/><path fill="#97ca00" d="M47 0h85v20H47z"/><path fill="url(#b)" d="M0 0h132v20H0z"/></g><g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="110"> <text x="245" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="370">license</text><text x="245" y="140" transform="scale(.1)" textLength="370">license</text><text x="885" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="750">GPL-2.0+CPE</text><text x="885" y="140" transform="scale(.1)" textLength="750">GPL-2.0+CPE</text></g> </svg> \ No newline at end of file
diff --git a/live/TCK/EE11/jakarta-ee11-tck.sh b/live/TCK/EE11/jakarta-ee11-tck.sh new file mode 100755 index 0000000..1b7d4f3 --- /dev/null +++ b/live/TCK/EE11/jakarta-ee11-tck.sh
@@ -0,0 +1,83 @@ +#!/bin/bash +# +# Copyright (c) 2024 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 +# http://www.eclipse.org/legal/epl-2.0. +# +# This Source Code may also be made available under the following Secondary +# Licenses when the conditions for such availability set forth in the +# Eclipse Public License v. 2.0 are satisfied: GNU General Public License, +# version 2 with the GNU Classpath Exception, which is available at +# https://www.gnu.org/software/classpath/license.html. +# +# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 +# + +[[ -z ${1} ]] && SUMMARY_FILE_NAME='SUMMARY.TXT' || SUMMARY_FILE_NAME=${1} +[[ -z ${2} ]] && TCK_LOG_FILE_NAME='tck.log' || TCK_LOG_FILE_NAME=${2} + +#Build the Tomcat Arquillian +mkdir Arquillian +cd Arquillian +git clone https://github.com/arquillian/arquillian-container-tomcat.git . +mvn -V clean install -DskipTests + +cd ${WORKSPACE} + +mkdir TCK +cd TCK +export tckname=$(basename "${TCK_BUNDLE}") +echo ${tckname} +wget -q ${TCK_BUNDLE} -O ${tckname} +ls +jar xvf ${tckname} + +filename="${tckname%.*}" +echo ${filename} + +cd restful-ws-tck/artifacts +ls + +mvn install:install-file \ + -Dfile=${filename}.jar \ + -DgroupId=jakarta.ws.rs \ + -DartifactId=jakarta-restful-ws-tck \ + -Dversion=${TCK_VERSION} \ + -Dpackaging=jar \ + -DgeneratePom=true + +cd ${WORKSPACE} + +#Temporary +sed -i "s#<jersey.version>4.0.99-SNAPSHOT</jersey.version>#<jersey.version>${JERSEY_VERSION}</jersey.version>#p" tests/jersey-tck/pom.tomcat.xml +cat tests/jersey-tck/pom.tomcat.xml + +mvn -f tests/jersey-tck/pom.tomcat.xml clean install -Pstaging -Djersey.version=${JERSEY_VERSION} | tee ${TCK_LOG_FILE_NAME} + +mvn -f tests/jersey-tck/pom.tomcat.xml dependency:copy -Dartifact=jakarta.ws.rs:jakarta-restful-ws-tck:${TCK_VERSION} -Dtck.version=${TCK_VERSION} -Dtransitive=false +#export DOWNLOAD_PATH='tests/jersey-tck/target/dependency' +#export NAME=`ls ${DOWNLOAD_PATH}` +export DOWNLOAD_PATH=${WORKSPACE}/TCK +export NAME=$(basename "${TCK_BUNDLE}") + +echo '***********************************************************************************' >> ${SUMMARY_FILE_NAME} +echo '*** TCK bundle information ***' >> ${SUMMARY_FILE_NAME} +echo "*** Name: ${NAME} ***" >> ${SUMMARY_FILE_NAME} +echo '*** Artifact ID: jakarta.websocket:websocket-tck-spec-tests:'${TCK_VERSION}' ***' >> ${SUMMARY_FILE_NAME} +echo '*** Date and size: '`stat -c "date: %y, size(b): %s" ${DOWNLOAD_PATH}/${NAME}`' ***' >> ${SUMMARY_FILE_NAME} +echo '*** SHA256SUM: '`sha256sum ${DOWNLOAD_PATH}/${NAME} | awk '{print $1}'`' ***' >> ${SUMMARY_FILE_NAME} +echo '*** ***' >> ${SUMMARY_FILE_NAME} +echo '***********************************************************************************' >> ${SUMMARY_FILE_NAME} +echo '*** TCK results summary ***' >> ${SUMMARY_FILE_NAME} +export TESTS_RUN=`grep 'Skipped: [0-9]*$' ${TCK_LOG_FILE_NAME} | grep -o 'Tests run: [0-9]*' | awk '{ SUM += $3 } END { print SUM }'` +export FAILURES=`grep 'Skipped: [0-9]*$' ${TCK_LOG_FILE_NAME} | grep -o 'Failures: [0-9]*' | awk '{ SUM += $2 } END { print SUM }'` +export ERRORS=`grep 'Skipped: [0-9]*$' ${TCK_LOG_FILE_NAME} | grep -o 'Errors: [0-9]*' | awk '{ SUM += $2 } END { print SUM }'` +export SKIPPED=`grep 'Skipped: [0-9]*$' ${TCK_LOG_FILE_NAME} | grep -o 'Skipped: [0-9]*' | awk '{ SUM += $2 } END { print SUM }'` +echo '[INFO] Number of Tests Passed = '${TESTS_RUN} >> ${SUMMARY_FILE_NAME} +echo '[INFO] Number of Tests Failed = '${FAILURES} >> ${SUMMARY_FILE_NAME} +echo '[INFO] Number of Tests with Errors = '${ERRORS} >> ${SUMMARY_FILE_NAME} +echo '[INFO] Number of Skipped Tests = '${SKIPPED} >> ${SUMMARY_FILE_NAME} +echo '[INFO] ****************************************************************************' >> ${SUMMARY_FILE_NAME} +grep 'Tests run:' ${TCK_LOG_FILE_NAME} | grep --invert-match 'Skipped: [0-9]*$' >> ${SUMMARY_FILE_NAME} \ No newline at end of file
diff --git a/live/TCK/EE11/jersey-tck/README.md b/live/TCK/EE11/jersey-tck/README.md new file mode 100644 index 0000000..2457e01 --- /dev/null +++ b/live/TCK/EE11/jersey-tck/README.md
@@ -0,0 +1,15 @@ +# Jakarta REST TCK + +The **Jakarta REST TCK** is a standalone kit for testing compliance of an implementation with the Jakarta REST specification. + + +## Performing Test + +While the test kit *is not dependent* of Maven, the most easy way to perform the tests is to create a copy of the sample Maven project found in the `jersey-tck` folder and adjust it to the actual needs of the implementation to be actually tested: +* Replace the dependency to Jersey by a dependency to the implementation to be actually tested. +* Execute `mvn verify`. +* Find the test result as part of Maven's output on the console or refer to the surefire reports. + +**Note:** Certainly the same can be performed using *other* build tools, like Gradle, or even by running a standalone Jupiter API compatible test runner (e. g. JUnit 5 Console Runner), as long as the Jakarta REST TCK JAR file and the implementation to test are both found on the classpath. + +**Hint:** The test project can safely get stored as part of the implementation, so it can be easily executed as part of the QA process.
diff --git a/live/TCK/EE11/jersey-tck/arquillian.xml b/live/TCK/EE11/jersey-tck/arquillian.xml new file mode 100644 index 0000000..1db2f9c --- /dev/null +++ b/live/TCK/EE11/jersey-tck/arquillian.xml
@@ -0,0 +1,32 @@ +<?xml version="1.0"?> +<!-- + + Copyright (c) 2024 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 + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--> +<arquillian xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns="http://jboss.org/schema/arquillian" + xsi:schemaLocation="http://jboss.org/schema/arquillian + http://jboss.org/schema/arquillian/arquillian_1_0.xsd"> + + <container qualifier="tomcat" default="true"> + <configuration> + <property name="user">j2ee</property> + <property name="pass">j2ee</property> + <property name="debug">true</property> + </configuration> + </container> + +</arquillian> \ No newline at end of file
diff --git a/live/TCK/EE11/jersey-tck/j2ee.pass b/live/TCK/EE11/jersey-tck/j2ee.pass new file mode 100644 index 0000000..7cd0e34 --- /dev/null +++ b/live/TCK/EE11/jersey-tck/j2ee.pass
@@ -0,0 +1,16 @@ +# +# Copyright (c) 2022 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 +# http://www.eclipse.org/legal/epl-2.0. +# +# This Source Code may also be made available under the following Secondary +# Licenses when the conditions for such availability set forth in the +# Eclipse Public License v. 2.0 are satisfied: GNU General Public License, +# version 2 with the GNU Classpath Exception, which is available at +# https://www.gnu.org/software/classpath/license.html. +# +# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 +# +AS_ADMIN_USERPASSWORD=j2ee \ No newline at end of file
diff --git a/live/TCK/EE11/jersey-tck/javajoe.pass b/live/TCK/EE11/jersey-tck/javajoe.pass new file mode 100644 index 0000000..f06be72 --- /dev/null +++ b/live/TCK/EE11/jersey-tck/javajoe.pass
@@ -0,0 +1,16 @@ +# +# Copyright (c) 2022 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 +# http://www.eclipse.org/legal/epl-2.0. +# +# This Source Code may also be made available under the following Secondary +# Licenses when the conditions for such availability set forth in the +# Eclipse Public License v. 2.0 are satisfied: GNU General Public License, +# version 2 with the GNU Classpath Exception, which is available at +# https://www.gnu.org/software/classpath/license.html. +# +# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 +# +AS_ADMIN_USERPASSWORD=javajoe \ No newline at end of file
diff --git a/live/TCK/EE11/jersey-tck/pom.tomcat.xml b/live/TCK/EE11/jersey-tck/pom.tomcat.xml new file mode 100644 index 0000000..081c773 --- /dev/null +++ b/live/TCK/EE11/jersey-tck/pom.tomcat.xml
@@ -0,0 +1,709 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<!-- + + Copyright (c) 2024 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 + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--> +<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 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <groupId>org.glassfish.jersey.core</groupId> + <artifactId>jersey-tck</artifactId> + <version>4.0.0</version> + <packaging>jar</packaging> + + <name>Jakarta RESTful WS Compliance for Jersey</name> + <description>This test verifies the compliance of Eclipse Jersey with Jakarta REST</description> + + <properties> + <maven.compiler.source>11</maven.compiler.source> + <maven.compiler.target>11</maven.compiler.target> + <jersey.version>4.0.99-SNAPSHOT</jersey.version> <!-- the public version that pass the tck --> + <tomcat.container.version>11.0.0-M18</tomcat.container.version> + <tomcat.home>${project.build.directory}/apache-tomcat-${tomcat.container.version}</tomcat.home> + <tomcat.modules>${tomcat.home}/lib</tomcat.modules> + <jakarta.platform.version>10.0.0</jakarta.platform.version> + <junit.jupiter.version>5.7.2</junit.jupiter.version> + <jakarta.rest.version>4.0.0</jakarta.rest.version> + <tck.artifactId>jakarta-restful-ws-tck</tck.artifactId> + <tck.version>4.0.0</tck.version> + <hk2.version>4.0.0-M1</hk2.version> + <mimepull.version>1.9.15</mimepull.version> + </properties> + + <dependencyManagement> + <dependencies> + <dependency> + <groupId>org.junit</groupId> + <artifactId>junit-bom</artifactId> + <version>${junit.jupiter.version}</version> + <type>pom</type> + <scope>import</scope> + </dependency> + <dependency> + <groupId>org.glassfish.jersey</groupId> + <artifactId>jersey-bom</artifactId> + <version>${jersey.version}</version> + <type>pom</type> + <scope>import</scope> + </dependency> + </dependencies> + </dependencyManagement> + + <repositories> + <repository> + <id>jakarta-snapshots</id> + <url>https://jakarta.oss.sonatype.org/content/repositories/staging/</url> + </repository> + </repositories> + + <dependencies> + <dependency> + <groupId>org.junit.jupiter</groupId> + <artifactId>junit-jupiter</artifactId> + <version>${junit.jupiter.version}</version> + </dependency> + + <dependency> + <groupId>org.apache.tomcat.embed</groupId> + <artifactId>tomcat-embed-core</artifactId> + <version>${tomcat.container.version}</version> + </dependency> + + <dependency> + <groupId>org.apache.tomcat</groupId> + <artifactId>tomcat-jasper</artifactId> + <version>${tomcat.container.version}</version> + </dependency> + + <dependency> + <groupId>org.jboss.arquillian.container</groupId> + <artifactId>arquillian-tomcat-managed-10</artifactId> + <version>1.2.1-SNAPSHOT</version> + </dependency> + + <dependency> + <groupId>com.sun.xml.bind</groupId> + <artifactId>jaxb-impl</artifactId> + <version>3.0.0</version> + <scope>runtime</scope> + </dependency> + + <dependency> + <groupId>jakarta.ws.rs</groupId> + <artifactId>${tck.artifactId}</artifactId> + <version>${tck.version}</version> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>jakarta.ws.rs</groupId> + <artifactId>jakarta.ws.rs-api</artifactId> + <version>${project.version}</version> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.hamcrest</groupId> + <artifactId>hamcrest</artifactId> + <version>2.2</version> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.jboss.arquillian.junit5</groupId> + <artifactId>arquillian-junit5-container</artifactId> + <version>1.7.0.Alpha10</version> + </dependency> + + <dependency> + <groupId>jakarta.platform</groupId> + <artifactId>jakarta.jakartaee-api</artifactId> + <version>${jakarta.platform.version}</version> + <scope>provided</scope> + </dependency> + + <dependency> + <groupId>commons-httpclient</groupId> + <artifactId>commons-httpclient</artifactId> + <version>3.1</version> + </dependency> + + <dependency> + <groupId>org.glassfish.jersey.core</groupId> + <artifactId>jersey-server</artifactId> + <version>${jersey.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.containers</groupId> + <artifactId>jersey-container-grizzly2-http</artifactId> + <version>${jersey.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.media</groupId> + <artifactId>jersey-media-json-binding</artifactId> + <version>${jersey.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.media</groupId> + <artifactId>jersey-media-jaxb</artifactId> + <version>${jersey.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.media</groupId> + <artifactId>jersey-media-sse</artifactId> + <version>${jersey.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.media</groupId> + <artifactId>jersey-media-multipart</artifactId> + <version>${jersey.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.inject</groupId> + <artifactId>jersey-hk2</artifactId> + <version>${jersey.version}</version> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.apache.tomcat</groupId> + <artifactId>tomcat-catalina</artifactId> + <version>${tomcat.container.version}</version> + </dependency> + + <dependency> + <groupId>com.sun.xml.bind</groupId> + <artifactId>jaxb-osgi</artifactId> + <version>4.0.0</version> + </dependency> + + <dependency> + <groupId>jakarta.json</groupId> + <artifactId>jakarta.json-api</artifactId> + <version>2.1.3</version> + </dependency> + <dependency> + <groupId>org.eclipse.parsson</groupId> + <artifactId>parsson</artifactId> + <version>1.1.5</version> + </dependency> + <dependency> + <groupId>org.eclipse.parsson</groupId> + <artifactId>parsson-media</artifactId> + <version>1.1.5</version> + </dependency> + + <dependency> + <groupId>jakarta.json.bind</groupId> + <artifactId>jakarta.json.bind-api</artifactId> + <version>3.0.0</version> + </dependency> + <dependency> + <groupId>org.eclipse</groupId> + <artifactId>yasson</artifactId> + <version>3.0.3</version> + </dependency> + + <dependency> + <groupId>jakarta.inject</groupId> + <artifactId>jakarta.inject-api</artifactId> + <version>2.0.1</version> + </dependency> + <dependency> + <groupId>org.glassfish.hk2</groupId> + <artifactId>hk2-api</artifactId> + <version>${hk2.version}</version> + <exclusions> + <exclusion> + <groupId>jakarta.inject</groupId> + <artifactId>jakarta.inject-api</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.glassfish.hk2</groupId> + <artifactId>hk2-locator</artifactId> + <version>${hk2.version}</version> + </dependency> + <dependency> + <groupId>org.glassfish.hk2</groupId> + <artifactId>hk2-utils</artifactId> + <version>${hk2.version}</version> + </dependency> + + <dependency> + <groupId>org.jvnet.mimepull</groupId> + <artifactId>mimepull</artifactId> + <version>${mimepull.version}</version> + </dependency> + + <dependency> + <groupId>jakarta.tck</groupId> + <artifactId>sigtest-maven-plugin</artifactId> + <version>2.2</version> + </dependency> + <dependency> + <groupId>org.netbeans.tools</groupId> + <artifactId>sigtest-maven-plugin</artifactId> + <version>1.7</version> + </dependency> + + </dependencies> + + + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-dependency-plugin</artifactId> + <version>3.2.0</version> + <executions> + <execution> + <id>unpack</id> + <phase>pre-integration-test</phase> + <goals> + <goal>unpack</goal> + </goals> + <configuration> + <artifactItems> + <artifactItem> + <groupId>org.apache.tomcat</groupId> + <artifactId>tomcat</artifactId> + <version>${tomcat.container.version}</version> + <type>zip</type> + <overWrite>false</overWrite> + <outputDirectory>${project.build.directory}</outputDirectory> + </artifactItem> + </artifactItems> + </configuration> + </execution> + <execution> + <id>copy</id> + <phase>pre-integration-test</phase> + <goals> + <goal>copy</goal> + </goals> + <configuration> + <artifactItems> + <artifactItem> + <groupId>jakarta.inject</groupId> + <artifactId>jakarta.inject-api</artifactId> + <version>2.0.1</version> + <type>jar</type> + <overWrite>true</overWrite> + <outputDirectory>${tomcat.modules}</outputDirectory> + <destFileName>jakarta.inject-api.jar</destFileName> + </artifactItem> + <artifactItem> + <groupId>jakarta.json</groupId> + <artifactId>jakarta.json-api</artifactId> + <version>2.1.3</version> + <type>jar</type> + <overWrite>true</overWrite> + <outputDirectory>${tomcat.modules}</outputDirectory> + <destFileName>jakarta.json-api.jar</destFileName> + </artifactItem> + <artifactItem> + <groupId>jakarta.xml.bind</groupId> + <artifactId>jakarta.xml.bind-api</artifactId> + <version>3.0.0</version> + <type>jar</type> + <overWrite>true</overWrite> + <outputDirectory>${tomcat.modules}</outputDirectory> + <destFileName>jakarta.xml.bind-api.jar</destFileName> + </artifactItem> + <artifactItem> + <groupId>jakarta.activation</groupId> + <artifactId>jakarta.activation-api</artifactId> + <version>2.1.3</version> + <type>jar</type> + <overWrite>true</overWrite> + <outputDirectory>${tomcat.modules}</outputDirectory> + <destFileName>jakarta.activation-api.jar</destFileName> + </artifactItem> + <artifactItem> + <groupId>jakarta.json.bind</groupId> + <artifactId>jakarta.json.bind-api</artifactId> + <version>3.0.0</version> + <type>jar</type> + <overWrite>true</overWrite> + <outputDirectory>${tomcat.modules}</outputDirectory> + <destFileName>jakarta.json.bind-api.jar</destFileName> + </artifactItem> + <artifactItem> + <groupId>jakarta.validation</groupId> + <artifactId>jakarta.validation-api</artifactId> + <version>3.1.0-M1</version> + <type>jar</type> + <overWrite>true</overWrite> + <outputDirectory>${tomcat.modules}</outputDirectory> + <destFileName>jakarta.validation-api.jar</destFileName> + </artifactItem> + <artifactItem> + <groupId>com.sun.xml.bind</groupId> + <artifactId>jaxb-osgi</artifactId> + <version>3.0.0</version> + <type>jar</type> + <overWrite>true</overWrite> + <outputDirectory>${tomcat.modules}</outputDirectory> + <destFileName>jaxb-osgi.jar</destFileName> + </artifactItem> + <artifactItem> + <groupId>org.eclipse.parsson</groupId> + <artifactId>parsson</artifactId> + <version>1.1.5</version> + <type>jar</type> + <overWrite>true</overWrite> + <outputDirectory>${tomcat.modules}</outputDirectory> + <destFileName>parsson.jar</destFileName> + </artifactItem> + <artifactItem> + <groupId>org.eclipse.parsson</groupId> + <artifactId>parsson-media</artifactId> + <version>1.1.5</version> + <type>jar</type> + <overWrite>true</overWrite> + <outputDirectory>${tomcat.modules}</outputDirectory> + <destFileName>parsson-media.jar</destFileName> + </artifactItem> + <artifactItem> + <groupId>org.eclipse</groupId> + <artifactId>yasson</artifactId> + <version>3.0.3</version> + <type>jar</type> + <overWrite>true</overWrite> + <outputDirectory>${tomcat.modules}</outputDirectory> + <destFileName>yasson.jar</destFileName> + </artifactItem> + <artifactItem> + <groupId>org.jvnet.mimepull</groupId> + <artifactId>mimepull</artifactId> + <version>${mimepull.version}</version> + <type>jar</type> + <overWrite>true</overWrite> + <outputDirectory>${tomcat.modules}</outputDirectory> + <destFileName>mimepull.jar</destFileName> + </artifactItem> + <artifactItem> + <groupId>org.javassist</groupId> + <artifactId>javassist</artifactId> + <version>3.29.2-GA</version> + <type>jar</type> + <overWrite>true</overWrite> + <outputDirectory>${tomcat.modules}</outputDirectory> + <destFileName>javassist.jar</destFileName> + </artifactItem> + <artifactItem> + <groupId>org.glassfish.hk2</groupId> + <artifactId>hk2-api</artifactId> + <version>${hk2.version}</version> + <type>jar</type> + <overWrite>true</overWrite> + <outputDirectory>${tomcat.modules}</outputDirectory> + <destFileName>hk2-api.jar</destFileName> + </artifactItem> + <artifactItem> + <groupId>org.glassfish.hk2</groupId> + <artifactId>hk2-utils</artifactId> + <version>${hk2.version}</version> + <type>jar</type> + <overWrite>true</overWrite> + <outputDirectory>${tomcat.modules}</outputDirectory> + <destFileName>hk2-utils.jar</destFileName> + </artifactItem> + <artifactItem> + <groupId>org.glassfish.hk2</groupId> + <artifactId>hk2-locator</artifactId> + <version>${hk2.version}</version> + <type>jar</type> + <overWrite>true</overWrite> + <outputDirectory>${tomcat.modules}</outputDirectory> + <destFileName>hk2-locator.jar</destFileName> + </artifactItem> + <artifactItem> + <groupId>org.glassfish.jersey.core</groupId> + <artifactId>jersey-client</artifactId> + <version>${jersey.version}</version> + <type>jar</type> + <overWrite>true</overWrite> + <outputDirectory>${tomcat.modules}</outputDirectory> + <destFileName>jersey-client.jar</destFileName> + </artifactItem> + <artifactItem> + <groupId>org.glassfish.jersey.core</groupId> + <artifactId>jersey-server</artifactId> + <version>${jersey.version}</version> + <type>jar</type> + <overWrite>true</overWrite> + <outputDirectory>${tomcat.modules}</outputDirectory> + <destFileName>jersey-server.jar</destFileName> + </artifactItem> + <artifactItem> + <groupId>org.glassfish.jersey.core</groupId> + <artifactId>jersey-common</artifactId> + <version>${jersey.version}</version> + <type>jar</type> + <overWrite>true</overWrite> + <outputDirectory>${tomcat.modules}</outputDirectory> + <destFileName>jersey-common.jar</destFileName> + </artifactItem> + <artifactItem> + <groupId>org.glassfish.jersey.containers</groupId> + <artifactId>jersey-container-grizzly2-http</artifactId> + <version>${jersey.version}</version> + <type>jar</type> + <overWrite>true</overWrite> + <outputDirectory>${tomcat.modules}</outputDirectory> + <destFileName>jersey-container-grizzly2-http.jar</destFileName> + </artifactItem> + <artifactItem> + <groupId>org.glassfish.jersey.containers</groupId> + <artifactId>jersey-container-grizzly2-servlet</artifactId> + <version>${jersey.version}</version> + <type>jar</type> + <overWrite>true</overWrite> + <outputDirectory>${tomcat.modules}</outputDirectory> + <destFileName>jersey-container-grizzly2-servlet.jar</destFileName> + </artifactItem> + <artifactItem> + <groupId>org.glassfish.jersey.containers</groupId> + <artifactId>jersey-container-servlet-core</artifactId> + <version>${jersey.version}</version> + <type>jar</type> + <overWrite>true</overWrite> + <outputDirectory>${tomcat.modules}</outputDirectory> + <destFileName>jersey-container-servlet-core.jar</destFileName> + </artifactItem> + <artifactItem> + <groupId>org.glassfish.jersey.containers</groupId> + <artifactId>jersey-container-servlet</artifactId> + <version>${jersey.version}</version> + <type>jar</type> + <overWrite>true</overWrite> + <outputDirectory>${tomcat.modules}</outputDirectory> + <destFileName>jersey-container-servlet.jar</destFileName> + </artifactItem> + <artifactItem> + <groupId>org.glassfish.jersey.media</groupId> + <artifactId>jersey-media-sse</artifactId> + <version>${jersey.version}</version> + <type>jar</type> + <overWrite>true</overWrite> + <outputDirectory>${tomcat.modules}</outputDirectory> + <destFileName>jersey-media-sse.jar</destFileName> + </artifactItem> + <artifactItem> + <groupId>org.glassfish.jersey.media</groupId> + <artifactId>jersey-media-json-binding</artifactId> + <version>${jersey.version}</version> + <type>jar</type> + <overWrite>true</overWrite> + <outputDirectory>${tomcat.modules}</outputDirectory> + <destFileName>jersey-media-json-binding.jar</destFileName> + </artifactItem> + <artifactItem> + <groupId>org.glassfish.jersey.media</groupId> + <artifactId>jersey-media-multipart</artifactId> + <version>${jersey.version}</version> + <type>jar</type> + <overWrite>true</overWrite> + <outputDirectory>${tomcat.modules}</outputDirectory> + <destFileName>jersey-media-multipart.jar</destFileName> + </artifactItem> + <artifactItem> + <groupId>org.glassfish.jersey.media</groupId> + <artifactId>jersey-media-json-processing</artifactId> + <version>${jersey.version}</version> + <type>jar</type> + <overWrite>true</overWrite> + <outputDirectory>${tomcat.modules}</outputDirectory> + <destFileName>jersey-media-json-processing.jar</destFileName> + </artifactItem> + <artifactItem> + <groupId>org.glassfish.jersey.media</groupId> + <artifactId>jersey-media-jaxb</artifactId> + <version>${jersey.version}</version> + <type>jar</type> + <overWrite>true</overWrite> + <outputDirectory>${tomcat.modules}</outputDirectory> + <destFileName>jersey-media-jaxb.jar</destFileName> + </artifactItem> + <artifactItem> + <groupId>org.glassfish.jersey.inject</groupId> + <artifactId>jersey-hk2</artifactId> + <version>${jersey.version}</version> + <type>jar</type> + <overWrite>true</overWrite> + <outputDirectory>${tomcat.modules}</outputDirectory> + <destFileName>jersey-hk2.jar</destFileName> + </artifactItem> + +<!-- <artifactItem>--> +<!-- <groupId>org.glassfish.jersey.ext.cdi</groupId>--> +<!-- <artifactId>jersey-cdi1x</artifactId>--> +<!-- <version>${jersey.version}</version>--> +<!-- <type>jar</type>--> +<!-- <overWrite>true</overWrite>--> +<!-- <outputDirectory>${tomcat.modules}</outputDirectory>--> +<!-- <destFileName>jersey-cdi1x.jar</destFileName>--> +<!-- </artifactItem>--> +<!-- <artifactItem>--> +<!-- <groupId>org.glassfish.jersey.ext.cdi</groupId>--> +<!-- <artifactId>jersey-cdi1x-servlet</artifactId>--> +<!-- <version>${jersey.version}</version>--> +<!-- <type>jar</type>--> +<!-- <overWrite>true</overWrite>--> +<!-- <outputDirectory>${tomcat.modules}</outputDirectory>--> +<!-- <destFileName>jersey-cdi1x-servlet.jar</destFileName>--> +<!-- </artifactItem>--> +<!-- <artifactItem>--> +<!-- <groupId>org.glassfish.jersey.ext.cdi</groupId>--> +<!-- <artifactId>jersey-cdi1x-transaction</artifactId>--> +<!-- <version>${jersey.version}</version>--> +<!-- <type>jar</type>--> +<!-- <overWrite>true</overWrite>--> +<!-- <outputDirectory>${tomcat.modules}</outputDirectory>--> +<!-- <destFileName>jersey-cdi1x-transaction.jar</destFileName>--> +<!-- </artifactItem>--> +<!-- <artifactItem>--> +<!-- <groupId>org.glassfish.jersey.ext</groupId>--> +<!-- <artifactId>jersey-bean-validation</artifactId>--> +<!-- <version>${jersey.version}</version>--> +<!-- <type>jar</type>--> +<!-- <overWrite>true</overWrite>--> +<!-- <outputDirectory>${tomcat.modules}</outputDirectory>--> +<!-- <destFileName>jersey-bean-validation.jar</destFileName>--> +<!-- </artifactItem>--> + <artifactItem> + <groupId>jakarta.ws.rs</groupId> + <artifactId>jakarta.ws.rs-api</artifactId> + <version>${jakarta.rest.version}</version> + <type>jar</type> + <overWrite>true</overWrite> + <outputDirectory>${tomcat.modules}</outputDirectory> + <destFileName>jakarta.ws.rs-api.jar</destFileName> + </artifactItem> + + <artifactItem> + <groupId>org.apache.tomcat</groupId> + <artifactId>tomcat-jasper</artifactId> + <version>${tomcat.container.version}</version> + <type>jar</type> + <overWrite>true</overWrite> + <outputDirectory>${tomcat.modules}</outputDirectory> + <destFileName>jasper.jar</destFileName> + </artifactItem> + </artifactItems> + </configuration> + </execution> + </executions> + </plugin> + <plugin> + <artifactId>maven-antrun-plugin</artifactId> + <version>3.0.0</version> + <executions> + <execution> + <id>override-users</id> + <phase>pre-integration-test</phase> + <configuration> + <target> + <copy todir="${basedir}/target/apache-tomcat-${tomcat.container.version}/conf" overwrite="true"> + <fileset dir="${basedir}" includes="tomcat-users.xml"/> + </copy> + <copy todir="${basedir}/target/apache-tomcat-${tomcat.container.version}/conf" overwrite="true"> + <fileset dir="${basedir}" includes="server.xml"/> + </copy> + </target> + </configuration> + <goals> + <goal>run</goal> + </goals> + </execution> + </executions> + </plugin> + <plugin> + <artifactId>maven-failsafe-plugin</artifactId> + <version>3.0.0-M5</version> + <executions> + <execution> + <id>container-tests</id> + <goals> + <goal>integration-test</goal> + <goal>verify</goal> + </goals> + <configuration> + <excludes> + <exclude>**/SeBootstrapIT.java</exclude> + </excludes> +<!-- <includes>--> +<!-- <include>**/JAXRSSigTestIT.java</include>--> +<!--<!– <include>ee.jakarta.tck.ws.rs.spec.client.exceptions.ClientExceptionsIT.java</include>–>--> +<!-- </includes>--> + <skipTests>false</skipTests> <!-- Do not skip when the jersey-tck profile is on --> + <dependenciesToScan>jakarta.ws.rs:${tck.artifactId}</dependenciesToScan> + <systemPropertyVariables> + <servlet_adaptor>org.glassfish.jersey.servlet.ServletContainer</servlet_adaptor> + <webServerHost>localhost</webServerHost> + <webServerPort>8080</webServerPort> + <junit.log.traceflag>true</junit.log.traceflag> + <user>j2ee</user> + <password>j2ee</password> + <authuser>javajoe</authuser> + <authpassword>javajoe</authpassword> + <porting.ts.url.class.1>ee.jakarta.tck.ws.rs.lib.implementation.sun.common.SunRIURL</porting.ts.url.class.1> + <jimage.dir>${project.build.directory}/jdk11-bundle</jimage.dir> + <optional.tech.packages.to.ignore>jakarta.xml.bind</optional.tech.packages.to.ignore> + <signature.sigTestClasspath>${tomcat.modules}/jakarta.ws.rs-api.jar${path.separator}${tomcat.modules}/jakarta.xml.bind-api.jar${path.separator}${project.build.directory}/jdk11-bundle/java.base${path.separator}${project.build.directory}/jdk11-bundle/java.rmi${path.separator}${project.build.directory}/jdk11-bundle/java.sql${path.separator}${project.build.directory}/jdk11-bundle/java.naming</signature.sigTestClasspath> + </systemPropertyVariables> + <environmentVariables> + <CATALINA_HOME>${project.basedir}/target/apache-tomcat-${tomcat.container.version}</CATALINA_HOME> + </environmentVariables> + </configuration> + </execution> + <execution> + <id>se-tests</id> + <goals> + <goal>integration-test</goal> + <goal>verify</goal> + </goals> + <configuration> + <skipTests>false</skipTests> <!-- Do not skip when the jersey-tck profile is on --> + <includes> + <include>**/SeBootstrapIT.java</include> + </includes> + <dependenciesToScan>jakarta.ws.rs:${tck.artifactId}</dependenciesToScan> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + </build> + <profiles> + <profile> + <id>jersey-tck</id> + <properties> + <jersey.version>3.1.99-SNAPSHOT</jersey.version> <!-- When running the profile, use SNAPSHOT --> + </properties> + </profile> + </profiles> +</project>
diff --git a/live/TCK/EE11/jersey-tck/pom.xml b/live/TCK/EE11/jersey-tck/pom.xml new file mode 100644 index 0000000..d8f6816 --- /dev/null +++ b/live/TCK/EE11/jersey-tck/pom.xml
@@ -0,0 +1,545 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<!-- + + Copyright (c) 2022, 2023 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 + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--> +<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 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <groupId>org.glassfish.jersey.core</groupId> + <artifactId>jersey-tck</artifactId> + <version>4.0.0</version> + <packaging>jar</packaging> + + <name>Jakarta RESTful WS Compliance for Jersey</name> + <description>This test verifies the compliance of Eclipse Jersey with Jakarta REST</description> + + <properties> + <maven.compiler.source>11</maven.compiler.source> + <maven.compiler.target>11</maven.compiler.target> + <jersey.version>3.1.2</jersey.version> <!-- the public version that pass the tck --> + <glassfish.container.version>7.0.4</glassfish.container.version> + <glassfish.home>${project.build.directory}/glassfish7</glassfish.home> + <jakarta.platform.version>10.0.0</jakarta.platform.version> + <junit.jupiter.version>5.7.2</junit.jupiter.version> + <jakarta.rest.version>3.1.0</jakarta.rest.version> + <tck.artifactId>jakarta-restful-ws-tck</tck.artifactId> + <tck.version>3.1.3</tck.version> + </properties> + + <dependencyManagement> + <dependencies> + <dependency> + <groupId>org.junit</groupId> + <artifactId>junit-bom</artifactId> + <version>${junit.jupiter.version}</version> + <type>pom</type> + <scope>import</scope> + </dependency> + <dependency> + <groupId>org.glassfish.jersey</groupId> + <artifactId>jersey-bom</artifactId> + <version>${jersey.version}</version> + <type>pom</type> + <scope>import</scope> + </dependency> + </dependencies> + </dependencyManagement> + + <repositories> + <repository> + <id>jakarta-snapshots</id> + <url>https://jakarta.oss.sonatype.org/content/repositories/staging/</url> + </repository> + </repositories> + + <dependencies> + <dependency> + <groupId>org.junit.jupiter</groupId> + <artifactId>junit-jupiter</artifactId> + <version>${junit.jupiter.version}</version> + </dependency> + + <dependency> + <groupId>org.glassfish.hk2</groupId> + <artifactId>hk2-locator</artifactId> + <version>3.0.0</version> + </dependency> + + <dependency> + <groupId>com.sun.xml.bind</groupId> + <artifactId>jaxb-impl</artifactId> + <version>3.0.0</version> + <scope>runtime</scope> + </dependency> + + <dependency> + <groupId>org.jboss.arquillian.container</groupId> + <artifactId>arquillian-glassfish-managed-6</artifactId> + <version>1.0.0.Alpha1</version> + </dependency> + + <dependency> + <groupId>jakarta.ws.rs</groupId> + <artifactId>${tck.artifactId}</artifactId> + <version>${tck.version}</version> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>jakarta.ws.rs</groupId> + <artifactId>jakarta.ws.rs-api</artifactId> + <version>${project.version}</version> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.hamcrest</groupId> + <artifactId>hamcrest</artifactId> + <version>2.2</version> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.glassfish.main.common</groupId> + <artifactId>simple-glassfish-api</artifactId> + <version>${glassfish.container.version}</version> + </dependency> + + <dependency> + <groupId>org.jboss.arquillian.junit5</groupId> + <artifactId>arquillian-junit5-container</artifactId> + <version>1.7.0.Alpha10</version> + </dependency> + + <dependency> + <groupId>jakarta.platform</groupId> + <artifactId>jakarta.jakartaee-api</artifactId> + <version>${jakarta.platform.version}</version> + <scope>provided</scope> + </dependency> + + <dependency> + <groupId>commons-httpclient</groupId> + <artifactId>commons-httpclient</artifactId> + <version>3.1</version> + </dependency> + + <dependency> + <groupId>org.glassfish.jersey.core</groupId> + <artifactId>jersey-server</artifactId> + <version>${jersey.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.containers</groupId> + <artifactId>jersey-container-grizzly2-http</artifactId> + <version>${jersey.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.netbeans.tools</groupId> + <artifactId>sigtest-maven-plugin</artifactId> + <version>1.4</version> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.media</groupId> + <artifactId>jersey-media-json-binding</artifactId> + <version>${jersey.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.media</groupId> + <artifactId>jersey-media-jaxb</artifactId> + <version>${jersey.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.media</groupId> + <artifactId>jersey-media-sse</artifactId> + <version>${jersey.version}</version> + <scope>test</scope> + </dependency> + + </dependencies> + + + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-dependency-plugin</artifactId> + <version>3.2.0</version> + <executions> + <execution> + <id>unpack</id> + <phase>pre-integration-test</phase> + <goals> + <goal>unpack</goal> + </goals> + <configuration> + <artifactItems> + <artifactItem> + <groupId>org.glassfish.main.distributions</groupId> + <artifactId>glassfish</artifactId> + <version>${glassfish.container.version}</version> + <type>zip</type> + <overWrite>false</overWrite> + <outputDirectory>${project.build.directory}</outputDirectory> + </artifactItem> + </artifactItems> + </configuration> + </execution> + <execution> + <id>copy</id> + <phase>pre-integration-test</phase> + <goals> + <goal>copy</goal> + </goals> + <configuration> + <artifactItems> + <artifactItem> + <groupId>org.glassfish.jersey.core</groupId> + <artifactId>jersey-client</artifactId> + <version>${jersey.version}</version> + <type>jar</type> + <overWrite>true</overWrite> + <outputDirectory>${glassfish.home}/glassfish/modules</outputDirectory> + <destFileName>jersey-client.jar</destFileName> + </artifactItem> + <artifactItem> + <groupId>org.glassfish.jersey.core</groupId> + <artifactId>jersey-server</artifactId> + <version>${jersey.version}</version> + <type>jar</type> + <overWrite>true</overWrite> + <outputDirectory>${glassfish.home}/glassfish/modules</outputDirectory> + <destFileName>jersey-server.jar</destFileName> + </artifactItem> + <artifactItem> + <groupId>org.glassfish.jersey.core</groupId> + <artifactId>jersey-common</artifactId> + <version>${jersey.version}</version> + <type>jar</type> + <overWrite>true</overWrite> + <outputDirectory>${glassfish.home}/glassfish/modules</outputDirectory> + <destFileName>jersey-common.jar</destFileName> + </artifactItem> + <artifactItem> + <groupId>org.glassfish.jersey.containers</groupId> + <artifactId>jersey-container-grizzly2-http</artifactId> + <version>${jersey.version}</version> + <type>jar</type> + <overWrite>true</overWrite> + <outputDirectory>${glassfish.home}/glassfish/modules</outputDirectory> + <destFileName>jersey-container-grizzly2-http.jar</destFileName> + </artifactItem> + <artifactItem> + <groupId>org.glassfish.jersey.containers</groupId> + <artifactId>jersey-container-servlet-core</artifactId> + <version>${jersey.version}</version> + <type>jar</type> + <overWrite>true</overWrite> + <outputDirectory>${glassfish.home}/glassfish/modules</outputDirectory> + <destFileName>jersey-container-servlet-core.jar</destFileName> + </artifactItem> + <artifactItem> + <groupId>org.glassfish.jersey.containers</groupId> + <artifactId>jersey-container-servlet</artifactId> + <version>${jersey.version}</version> + <type>jar</type> + <overWrite>true</overWrite> + <outputDirectory>${glassfish.home}/glassfish/modules</outputDirectory> + <destFileName>jersey-container-servlet.jar</destFileName> + </artifactItem> + <artifactItem> + <groupId>org.glassfish.jersey.media</groupId> + <artifactId>jersey-media-sse</artifactId> + <version>${jersey.version}</version> + <type>jar</type> + <overWrite>true</overWrite> + <outputDirectory>${glassfish.home}/glassfish/modules</outputDirectory> + <destFileName>jersey-media-sse.jar</destFileName> + </artifactItem> + <artifactItem> + <groupId>org.glassfish.jersey.media</groupId> + <artifactId>jersey-media-json-binding</artifactId> + <version>${jersey.version}</version> + <type>jar</type> + <overWrite>true</overWrite> + <outputDirectory>${glassfish.home}/glassfish/modules</outputDirectory> + <destFileName>jersey-media-json-binding.jar</destFileName> + </artifactItem> + <artifactItem> + <groupId>jakarta.ws.rs</groupId> + <artifactId>jakarta.ws.rs-api</artifactId> + <version>${jakarta.rest.version}</version> + <type>jar</type> + <overWrite>true</overWrite> + <outputDirectory>${glassfish.home}/glassfish/modules</outputDirectory> + <destFileName>jakarta.ws.rs-api.jar</destFileName> + </artifactItem> + </artifactItems> + </configuration> + </execution> + </executions> + </plugin> + <plugin> + <artifactId>exec-maven-plugin</artifactId> + <groupId>org.codehaus.mojo</groupId> + <executions> + <execution> + <id>StopDomain1</id> + <phase>pre-integration-test</phase> + <goals> + <goal>exec</goal> + </goals> + <configuration> + <workingDirectory>${asadmin.home}</workingDirectory> + <executable>${asadmin}</executable> + <arguments> + <argument>stop-domain</argument> + </arguments> + </configuration> + </execution> + <execution> + <id>StartDomain1</id> + <phase>pre-integration-test</phase> + <goals> + <goal>exec</goal> + </goals> + <configuration> + <workingDirectory>${asadmin.home}</workingDirectory> + <executable>${asadmin}</executable> + <arguments> + <argument>start-domain</argument> + </arguments> + </configuration> + </execution> + <execution> + <id>Enable Trace requests</id> + <phase>pre-integration-test</phase> + <goals> + <goal>exec</goal> + </goals> + <configuration> + <workingDirectory>${asadmin.home}</workingDirectory> + <executable>${asadmin}</executable> + <arguments> + <argument>set</argument> + <argument>server-config.network-config.protocols.protocol.http-listener-1.http.trace-enabled=true</argument> + </arguments> + </configuration> + </execution> + <execution> + <id>Delete User j2ee</id> + <phase>pre-integration-test</phase> + <goals> + <goal>exec</goal> + </goals> + <configuration> + <workingDirectory>${asadmin.home}</workingDirectory> + <executable>${asadmin}</executable> + <arguments> + <argument>--passwordfile</argument> + <argument>${project.basedir}/j2ee.pass</argument> + <argument>delete-file-user</argument> + <argument>j2ee</argument> + </arguments> + <successCodes> + <successCode>0</successCode> + <successCode>1</successCode> + </successCodes> + </configuration> + </execution> + <execution> + <id>Add User j2ee</id> + <phase>pre-integration-test</phase> + <goals> + <goal>exec</goal> + </goals> + <configuration> + <workingDirectory>${asadmin.home}</workingDirectory> + <executable>${asadmin}</executable> + <arguments> + <argument>--passwordfile</argument> + <argument>${project.basedir}/j2ee.pass</argument> + <argument>create-file-user</argument> + <argument>--groups</argument> + <argument>staff:mgr</argument> + <argument>j2ee</argument> + </arguments> + </configuration> + </execution> + <execution> + <id>Delete User javajoe</id> + <phase>pre-integration-test</phase> + <goals> + <goal>exec</goal> + </goals> + <configuration> + <workingDirectory>${asadmin.home}</workingDirectory> + <executable>${asadmin}</executable> + <arguments> + <argument>--passwordfile</argument> + <argument>${project.basedir}/javajoe.pass</argument> + <argument>delete-file-user</argument> + <argument>javajoe</argument> + </arguments> + <successCodes> + <successCode>0</successCode> + <successCode>1</successCode> + </successCodes> + </configuration> + </execution> + <execution> + <id>Add User javajoe</id> + <phase>pre-integration-test</phase> + <goals> + <goal>exec</goal> + </goals> + <configuration> + <workingDirectory>${asadmin.home}</workingDirectory> + <executable>${asadmin}</executable> + <arguments> + <argument>--passwordfile</argument> + <argument>${project.basedir}/javajoe.pass</argument> + <argument>create-file-user</argument> + <argument>--groups</argument> + <argument>guest</argument> + <argument>javajoe</argument> + </arguments> + </configuration> + </execution> + <execution> + <id>list users</id> + <phase>pre-integration-test</phase> + <goals> + <goal>exec</goal> + </goals> + <configuration> + <workingDirectory>${asadmin.home}</workingDirectory> + <executable>${asadmin}</executable> + <arguments> + <argument>list-file-users</argument> + </arguments> + </configuration> + </execution> + <execution> + <id>StopDomain</id> + <phase>pre-integration-test</phase> + <goals> + <goal>exec</goal> + </goals> + <configuration> + <workingDirectory>${asadmin.home}</workingDirectory> + <executable>${asadmin}</executable> + <arguments> + <argument>stop-domain</argument> + </arguments> + </configuration> + </execution> + </executions> + </plugin> + + <plugin> + <artifactId>maven-failsafe-plugin</artifactId> + <version>3.0.0-M5</version> + <executions> + <execution> + <id>gf-tests</id> + <goals> + <goal>integration-test</goal> + <goal>verify</goal> + </goals> + <configuration> + <excludes> + <exclude>**/SeBootstrapIT.java</exclude> + </excludes> + <skipTests>false</skipTests> <!-- Do not skip when the jersey-tck profile is on --> + <dependenciesToScan>jakarta.ws.rs:${tck.artifactId}</dependenciesToScan> + <systemPropertyVariables> + <GLASSFISH_HOME>${glassfish.home}</GLASSFISH_HOME> + <servlet_adaptor>org.glassfish.jersey.servlet.ServletContainer</servlet_adaptor> + <webServerHost>localhost</webServerHost> + <webServerPort>8080</webServerPort> + <junit.log.traceflag>true</junit.log.traceflag> + <user>j2ee</user> + <password>j2ee</password> + <authuser>javajoe</authuser> + <authpassword>javajoe</authpassword> + <porting.ts.url.class.1>ee.jakarta.tck.ws.rs.lib.implementation.sun.common.SunRIURL</porting.ts.url.class.1> + <jimage.dir>${project.build.directory}/jdk11-bundle</jimage.dir> + <optional.tech.packages.to.ignore>jakarta.xml.bind</optional.tech.packages.to.ignore> + <signature.sigTestClasspath>${glassfish.home}/glassfish/modules/jakarta.ws.rs-api.jar:${glassfish.home}/glassfish/modules/jakarta.xml.bind-api.jar:${project.build.directory}/jdk11-bundle/java.base:${project.build.directory}/jdk11-bundle/java.rmi:${project.build.directory}/jdk11-bundle/java.sql:${project.build.directory}/jdk11-bundle/java.naming</signature.sigTestClasspath> + </systemPropertyVariables> + <environmentVariables> + <GLASSFISH_HOME>${glassfish.home}</GLASSFISH_HOME> + </environmentVariables> + </configuration> + </execution> + <execution> + <id>se-tests</id> + <goals> + <goal>integration-test</goal> + <goal>verify</goal> + </goals> + <configuration> + <skipTests>false</skipTests> <!-- Do not skip when the jersey-tck profile is on --> + <includes> + <include>**/SeBootstrapIT.java</include> + </includes> + <dependenciesToScan>jakarta.ws.rs:${tck.artifactId}</dependenciesToScan> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + </build> + <profiles> + <profile> + <id>onLinux</id> + <activation> + <os> + <family>unix</family> + </os> + </activation> + <properties> + <asadmin.home>${basedir}</asadmin.home> + <asadmin>${glassfish.home}/glassfish/bin/asadmin</asadmin> + </properties> + </profile> + <profile> + <id>onWindows</id> + <activation> + <os> + <family>Windows</family> + </os> + </activation> + <properties> + <asadmin.home>${glassfish.home}/glassfish/bin</asadmin.home> + <asadmin>asadmin</asadmin> + </properties> + </profile> + <profile> + <id>jersey-tck</id> + <properties> + <jersey.version>3.1.99-SNAPSHOT</jersey.version> <!-- When running the profile, use SNAPSHOT --> + </properties> + </profile> + </profiles> +</project>
diff --git a/live/TCK/EE11/jersey-tck/server.xml b/live/TCK/EE11/jersey-tck/server.xml new file mode 100644 index 0000000..1192525 --- /dev/null +++ b/live/TCK/EE11/jersey-tck/server.xml
@@ -0,0 +1,153 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<!-- Note: A "Server" is not itself a "Container", so you may not + define subcomponents such as "Valves" at this level. + Documentation at /docs/config/server.html + --> +<Server port="8005" shutdown="SHUTDOWN"> + <Listener className="org.apache.catalina.startup.VersionLoggerListener" /> + <!-- Security listener. Documentation at /docs/config/listeners.html + <Listener className="org.apache.catalina.security.SecurityListener" /> + --> + <!-- APR library loader. Documentation at /docs/apr.html --> + <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" /> + <!-- Prevent memory leaks due to use of particular java/javax APIs--> + <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" /> + <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" /> + <Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" /> + + <!-- Global JNDI resources + Documentation at /docs/jndi-resources-howto.html + --> + <GlobalNamingResources> + <!-- Editable user database that can also be used by + UserDatabaseRealm to authenticate users + --> + <Resource name="UserDatabase" auth="Container" + type="org.apache.catalina.UserDatabase" + description="User database that can be updated and saved" + factory="org.apache.catalina.users.MemoryUserDatabaseFactory" + pathname="conf/tomcat-users.xml" /> + </GlobalNamingResources> + + <!-- A "Service" is a collection of one or more "Connectors" that share + a single "Container" Note: A "Service" is not itself a "Container", + so you may not define subcomponents such as "Valves" at this level. + Documentation at /docs/config/service.html + --> + <Service name="Catalina"> + + <!--The connectors can use a shared executor, you can define one or more named thread pools--> + <!-- + <Executor name="tomcatThreadPool" namePrefix="catalina-exec-" + maxThreads="150" minSpareThreads="4"/> + --> + + + <!-- A "Connector" represents an endpoint by which requests are received + and responses are returned. Documentation at : + HTTP Connector: /docs/config/http.html + AJP Connector: /docs/config/ajp.html + Define a non-SSL/TLS HTTP/1.1 Connector on port 8080 + --> + <Connector port="8080" protocol="HTTP/1.1" + connectionTimeout="20000" + redirectPort="8443" + allowTrace="true"/> + <!-- A "Connector" using the shared thread pool--> + <!-- + <Connector executor="tomcatThreadPool" + port="8080" protocol="HTTP/1.1" + connectionTimeout="20000" + redirectPort="8443" /> + --> + <!-- Define an SSL/TLS HTTP/1.1 Connector on port 8443 with HTTP/2 + This connector uses the NIO implementation. The default + SSLImplementation will depend on the presence of the APR/native + library and the useOpenSSL attribute of the AprLifecycleListener. + Either JSSE or OpenSSL style configuration may be used regardless of + the SSLImplementation selected. JSSE style configuration is used below. + --> + <!-- + <Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol" + maxThreads="150" SSLEnabled="true"> + <UpgradeProtocol className="org.apache.coyote.http2.Http2Protocol" /> + <SSLHostConfig> + <Certificate certificateKeystoreFile="conf/localhost-rsa.jks" + type="RSA" /> + </SSLHostConfig> + </Connector> + --> + + <!-- Define an AJP 1.3 Connector on port 8009 --> + <!-- + <Connector protocol="AJP/1.3" + address="::1" + port="8009" + redirectPort="8443" /> + --> + + <!-- An Engine represents the entry point (within Catalina) that processes + every request. The Engine implementation for Tomcat stand alone + analyzes the HTTP headers included with the request, and passes them + on to the appropriate Host (virtual host). + Documentation at /docs/config/engine.html --> + + <!-- You should set jvmRoute to support load-balancing via AJP ie : + <Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1"> + --> + <Engine name="Catalina" defaultHost="localhost"> + + <!--For clustering, please take a look at documentation at: + /docs/cluster-howto.html (simple how to) + /docs/config/cluster.html (reference documentation) --> + <!-- + <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/> + --> + + <!-- Use the LockOutRealm to prevent attempts to guess user passwords + via a brute-force attack --> + <Realm className="org.apache.catalina.realm.LockOutRealm"> + <!-- This Realm uses the UserDatabase configured in the global JNDI + resources under the key "UserDatabase". Any edits + that are performed against this UserDatabase are immediately + available for use by the Realm. --> + <Realm className="org.apache.catalina.realm.UserDatabaseRealm" + resourceName="UserDatabase"/> + </Realm> + + <Host name="localhost" appBase="webapps" + unpackWARs="true" autoDeploy="true"> + + <!-- SingleSignOn valve, share authentication between web applications + Documentation at: /docs/config/valve.html --> + <!-- + <Valve className="org.apache.catalina.authenticator.SingleSignOn" /> + --> + + <!-- Access log processes all example. + Documentation at: /docs/config/valve.html + Note: The pattern used is equivalent to using pattern="common" --> + <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" + prefix="localhost_access_log" suffix=".txt" + pattern="%h %l %u %t "%r" %s %b" /> + + </Host> + </Engine> + </Service> +</Server>
diff --git a/live/TCK/EE11/jersey-tck/src/main/java/org/glassfish/jersey/core/tck/JerseyApplicationArchiveProcessor.java b/live/TCK/EE11/jersey-tck/src/main/java/org/glassfish/jersey/core/tck/JerseyApplicationArchiveProcessor.java new file mode 100644 index 0000000..c5597e5 --- /dev/null +++ b/live/TCK/EE11/jersey-tck/src/main/java/org/glassfish/jersey/core/tck/JerseyApplicationArchiveProcessor.java
@@ -0,0 +1,35 @@ +/* + * Copyright (c) 2022 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 + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package org.glassfish.jersey.core.tck; + +import org.jboss.arquillian.container.test.spi.client.deployment.ApplicationArchiveProcessor; +import org.jboss.arquillian.test.spi.TestClass; +import org.jboss.shrinkwrap.api.Archive; +import org.jboss.shrinkwrap.api.spec.WebArchive; + +public class JerseyApplicationArchiveProcessor implements ApplicationArchiveProcessor { + @Override + public void process(Archive<?> archive, TestClass testClass) { + if ("jaxrs_ee_rs_container_requestcontext_security_web.war".equals(archive.getName())) { + WebArchive webArchive = (WebArchive) archive; + webArchive.addAsWebInfResource("jaxrs_ee_rs_container_requestcontext_security_web.war.sun-web.xml", "sun-web.xml"); + } else if ("jaxrs_ee_core_securitycontext_basic_web.war".equals(archive.getName())) { + WebArchive webArchive = (WebArchive) archive; + webArchive.addAsWebInfResource("jaxrs_ee_core_securitycontext_basic_web.war.sun-web.xml", "sun-web.xml"); + } + } +}
diff --git a/live/TCK/EE11/jersey-tck/src/main/java/org/glassfish/jersey/core/tck/JerseyLoadableExtension.java b/live/TCK/EE11/jersey-tck/src/main/java/org/glassfish/jersey/core/tck/JerseyLoadableExtension.java new file mode 100644 index 0000000..d4da355 --- /dev/null +++ b/live/TCK/EE11/jersey-tck/src/main/java/org/glassfish/jersey/core/tck/JerseyLoadableExtension.java
@@ -0,0 +1,27 @@ +/* + * Copyright (c) 2022 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 + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package org.glassfish.jersey.core.tck; + +import org.jboss.arquillian.container.test.spi.client.deployment.ApplicationArchiveProcessor; +import org.jboss.arquillian.core.spi.LoadableExtension; + +public class JerseyLoadableExtension implements LoadableExtension { + @Override + public void register(ExtensionBuilder extensionBuilder) { + extensionBuilder.service(ApplicationArchiveProcessor.class, JerseyApplicationArchiveProcessor.class); + } +}
diff --git a/live/TCK/EE11/jersey-tck/src/main/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension b/live/TCK/EE11/jersey-tck/src/main/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension new file mode 100644 index 0000000..577c00f --- /dev/null +++ b/live/TCK/EE11/jersey-tck/src/main/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension
@@ -0,0 +1 @@ +org.glassfish.jersey.core.tck.JerseyLoadableExtension \ No newline at end of file
diff --git a/live/TCK/EE11/jersey-tck/src/main/resources/jaxrs_ee_core_securitycontext_basic_web.war.sun-web.xml b/live/TCK/EE11/jersey-tck/src/main/resources/jaxrs_ee_core_securitycontext_basic_web.war.sun-web.xml new file mode 100644 index 0000000..8e2a251 --- /dev/null +++ b/live/TCK/EE11/jersey-tck/src/main/resources/jaxrs_ee_core_securitycontext_basic_web.war.sun-web.xml
@@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + + Copyright (c) 2022 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 + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--> + +<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 8.0 Servlet 2.4//EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-web-app_2_5-0.dtd"> +<sun-web-app> + <context-root>jaxrs_ee_core_securitycontext_basic_web</context-root> + <security-role-mapping> + <role-name>DIRECTOR</role-name> + <principal-name>j2ee</principal-name> + </security-role-mapping> + <security-role-mapping> + <role-name>OTHERROLE</role-name> + <principal-name>javajoe</principal-name> + </security-role-mapping> +</sun-web-app>
diff --git a/live/TCK/EE11/jersey-tck/src/main/resources/jaxrs_ee_rs_container_requestcontext_security_web.war.sun-web.xml b/live/TCK/EE11/jersey-tck/src/main/resources/jaxrs_ee_rs_container_requestcontext_security_web.war.sun-web.xml new file mode 100644 index 0000000..a5efdc5 --- /dev/null +++ b/live/TCK/EE11/jersey-tck/src/main/resources/jaxrs_ee_rs_container_requestcontext_security_web.war.sun-web.xml
@@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + + Copyright (c) 2022 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 + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--> + +<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 8.0 Servlet 2.4//EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-web-app_2_5-0.dtd"> +<sun-web-app> + <context-root>jaxrs_ee_rs_container_requestcontext_security_web</context-root> + <security-role-mapping> + <role-name>DIRECTOR</role-name> + <principal-name>j2ee</principal-name> + </security-role-mapping> +</sun-web-app>
diff --git a/live/TCK/EE11/jersey-tck/tomcat-users.xml b/live/TCK/EE11/jersey-tck/tomcat-users.xml new file mode 100644 index 0000000..9f55278 --- /dev/null +++ b/live/TCK/EE11/jersey-tck/tomcat-users.xml
@@ -0,0 +1,60 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<tomcat-users xmlns="http://tomcat.apache.org/xml" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://tomcat.apache.org/xml tomcat-users.xsd" + version="1.0"> +<!-- + By default, no user is included in the "manager-gui" role required + to operate the "/manager/html" web application. If you wish to use this app, + you must define such a user - the username and password are arbitrary. + + Built-in Tomcat manager roles: + - manager-gui - allows access to the HTML GUI and the status pages + - manager-script - allows access to the HTTP API and the status pages + - manager-jmx - allows access to the JMX proxy and the status pages + - manager-status - allows access to the status pages only + + The users below are wrapped in a comment and are therefore ignored. If you + wish to configure one or more of these users for use with the manager web + application, do not forget to remove the <!.. ..> that surrounds them. You + will also need to set the passwords to something appropriate. +--> +<!-- + <user username="admin" password="<must-be-changed>" roles="manager-gui"/> + <user username="robot" password="<must-be-changed>" roles="manager-script"/> +--> +<!-- + The sample user and role entries below are intended for use with the + examples web application. They are wrapped in a comment and thus are ignored + when reading this file. If you wish to configure these users for use with the + examples web application, do not forget to remove the <!.. ..> that surrounds + them. You will also need to set the passwords to something appropriate. +--> +<!-- + <role rolename="tomcat"/> + <role rolename="role1"/> + <user username="tomcat" password="<must-be-changed>" roles="tomcat"/> + <user username="both" password="<must-be-changed>" roles="tomcat,role1"/> + <user username="role1" password="<must-be-changed>" roles="role1"/> +--> + <role rolename="DIRECTOR"/> + <role rolename="OTHERROLE"/> + <user username="javajoe" password="javajoe" roles="OTHERROLE"/> + <user username="j2ee" password="j2ee" roles="manager-gui,manager-script,DIRECTOR"/> +</tomcat-users>