]> source.dussan.org Git - archiva.git/commitdiff
[MRM-2031] Switch to jdk 11
authorOlivier Lamy <olamy@apache.org>
Sat, 6 Aug 2022 01:30:06 +0000 (11:30 +1000)
committerOlivier Lamy <olamy@apache.org>
Sat, 6 Aug 2022 01:30:06 +0000 (11:30 +1000)
Signed-off-by: Olivier Lamy <olamy@apache.org>
17 files changed:
.github/workflows/maven.yml
Jenkinsfile
archiva-modules/archiva-base/archiva-checksum/pom.xml
archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/pom.xml
archiva-modules/archiva-base/archiva-policies/pom.xml
archiva-modules/archiva-base/archiva-proxy/pom.xml
archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/pom.xml
archiva-modules/archiva-base/archiva-transaction/pom.xml
archiva-modules/archiva-maven/archiva-maven-proxy/pom.xml
archiva-modules/archiva-maven/archiva-maven-repository/pom.xml
archiva-modules/archiva-web/archiva-rest/archiva-rest-api/pom.xml
archiva-modules/archiva-web/archiva-rest/archiva-rest-services/pom.xml
archiva-modules/archiva-web/archiva-web-common/pom.xml
archiva-modules/archiva-web/archiva-webdav/pom.xml
archiva-modules/metadata/metadata-model/pom.xml
archiva-modules/plugins/problem-reports/pom.xml
pom.xml

index e44e7f9767ffc08ddd3a34a01c854db95304e260..7fbfa26a69783f8acdd453cef5b5df142d3cf7d6 100644 (file)
@@ -28,7 +28,7 @@ jobs:
     strategy:
       matrix:
         os: [ubuntu-latest]
-        java: [8, 11]
+        java: [11, 17]
       fail-fast: false
 
     runs-on: ${{ matrix.os }}
index f807c0014ef2de0b1ee1dc532b6ea8a10b23afe6..34ce16e2fb8b238aff4da13c7ff680c1f3de0043 100644 (file)
  * Only the war and zip artifacts are archived in the jenkins build archive.
  */
 LABEL = 'ubuntu && !H23'
-buildJdk = 'jdk_1.8_latest'
-buildJdk9 = 'jdk_1.9_latest'
-buildJdk10 = 'jdk_10_latest'
-buildJdk11 = 'jdk_11_latest'
+buildJdk = 'jdk_11_latest'
+buildJdk17 = 'jdk_17_latest'
 buildMvn = 'maven_3.8.5'
 //localRepository = ".repository"
 //localRepository = "../.maven_repositories/${env.EXECUTOR_NUMBER}"
@@ -131,15 +129,15 @@ pipeline {
                     }
                 }
 
-                stage('JDK11') {
+                stage('JDK17') {
                     environment {
-                        ARCHIVA_USER_CONFIG_FILE = '/tmp/archiva-master-jdk-11-${env.JOB_NAME}.xml'
+                        ARCHIVA_USER_CONFIG_FILE = '/tmp/archiva-master-jdk-17-${env.JOB_NAME}.xml'
                     }
                     steps {
                         ws("${env.JOB_NAME}-JDK11") {
                             checkout scm
                             timeout(120) {
-                                withMaven(maven: buildMvn, jdk: buildJdk11,
+                                withMaven(maven: buildMvn, jdk: buildJdk17,
                                           mavenLocalRepo: ".repository",
                                           publisherStrategy: 'EXPLICIT',
                                           mavenOpts: mavenOpts,
@@ -155,7 +153,7 @@ pipeline {
                     }
                     post {
                         always {
-                            sh "rm -f /tmp/archiva-master-jdk-11-${env.JOB_NAME}.xml"
+                            sh "rm -f /tmp/archiva-master-jdk-17-${env.JOB_NAME}.xml"
                         }
                         success {
                             cleanWs()
index bd8c9c89d94516cf13c9717f73e60fd7a834c52c..516ea3a39a604137f66b01c4aef1f32501a40333 100644 (file)
       <groupId>commons-codec</groupId>
       <artifactId>commons-codec</artifactId>
     </dependency>
+    <dependency>
+      <groupId>jakarta.annotation</groupId>
+      <artifactId>jakarta.annotation-api</artifactId>
+      <scope>test</scope>
+    </dependency>
 
+    <dependency>
+      <groupId>jakarta.xml.bind</groupId>
+      <artifactId>jakarta.xml.bind-api</artifactId>
+      <scope>test</scope>
+    </dependency>
   </dependencies>
 
   <build>
     </pluginManagement>
   </build>
 
-  <profiles>
-    <profile>
-      <id>jdk9+</id>
-      <activation>
-        <jdk>[1.9,)</jdk>
-      </activation>
-      <dependencies>
-        <!-- Needed for JDK >= 9 -->
-        <dependency>
-          <groupId>jakarta.annotation</groupId>
-          <artifactId>jakarta.annotation-api</artifactId>
-          <scope>test</scope>
-        </dependency>
-
-        <dependency>
-          <groupId>jakarta.xml.bind</groupId>
-          <artifactId>jakarta.xml.bind-api</artifactId>
-          <scope>test</scope>
-        </dependency>
-      </dependencies>
-    </profile>
-  </profiles>
 </project>
index 310ff577fbfdb6e3da4d323c97dad1833ed444dc..2c734618a41b0e0f1ae481cbd43823cb7227134c 100644 (file)
       <artifactId>commons-io</artifactId>
     </dependency>
 
+    <dependency>
+      <groupId>jakarta.xml.bind</groupId>
+      <artifactId>jakarta.xml.bind-api</artifactId>
+    </dependency>
 
     <!-- test dependencies -->
     <dependency>
     </plugins>
   </build>
 
-  <!--
-The jaxb dependency is needed by the enunciate plugin starting with JDK9.
-Adding to the plugin dependency is not sufficient, so I have to add it as project dependency.
-Using provided scope to avoid adding it to packaging.
--->
-  <profiles>
-    <profile>
-      <id>jdk9+</id>
-      <activation>
-        <jdk>[1.9,)</jdk>
-      </activation>
-      <dependencies>
-        <dependency>
-          <groupId>jakarta.xml.bind</groupId>
-          <artifactId>jakarta.xml.bind-api</artifactId>
-        </dependency>
-      </dependencies>
-    </profile>
-  </profiles>
 </project>
index 9dc186ec95dcda7887baf99dca5f99ec2dc84660..41e0040567b696d841ae0185e94c47d413353440 100644 (file)
       <scope>runtime</scope>
     </dependency>
 
+
+    <dependency>
+      <groupId>jakarta.annotation</groupId>
+      <artifactId>jakarta.annotation-api</artifactId>
+      <scope>test</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>jakarta.xml.bind</groupId>
+      <artifactId>jakarta.xml.bind-api</artifactId>
+      <scope>test</scope>
+    </dependency>
+
     <!-- Test scope -->
 
     <dependency>
     </pluginManagement>
   </build>
 
-  <profiles>
-    <profile>
-      <id>jdk9+</id>
-      <activation>
-        <jdk>[1.9,)</jdk>
-      </activation>
-      <dependencies>
-        <!-- Needed for JDK >= 9 -->
-        <dependency>
-          <groupId>jakarta.annotation</groupId>
-          <artifactId>jakarta.annotation-api</artifactId>
-          <scope>test</scope>
-        </dependency>
-
-        <dependency>
-          <groupId>jakarta.xml.bind</groupId>
-          <artifactId>jakarta.xml.bind-api</artifactId>
-          <scope>test</scope>
-        </dependency>
-      </dependencies>
-    </profile>
-  </profiles>
-
 </project>
index 840b829f13ef48dc98c1c3faf2d40dba05d8010d..c7b6d734488e6f97c97a5f52a3000fa6786d1ca8 100644 (file)
       <artifactId>hsqldb</artifactId>
       <scope>test</scope>
     </dependency>
-
-
+    <dependency>
+      <groupId>jakarta.xml.bind</groupId>
+      <artifactId>jakarta.xml.bind-api</artifactId>
+      <scope>test</scope>
+    </dependency>
   </dependencies>
   <build>
     <plugins>
     </pluginManagement>
   </build>
 
-  <profiles>
-    <profile>
-      <id>jdk9+</id>
-      <activation>
-        <jdk>[1.9,)</jdk>
-      </activation>
-      <dependencies>
-        <!-- Needed for JDK >= 9 -->
-        <dependency>
-          <groupId>jakarta.xml.bind</groupId>
-          <artifactId>jakarta.xml.bind-api</artifactId>
-          <scope>test</scope>
-        </dependency>
-      </dependencies>
-    </profile>
-  </profiles>
 </project>
index d378abcadc3ddbc7108679fb7172ac07e3653841..4bf7b65d216d4067ad1f84dac9f64fdc37d65d8a 100644 (file)
   </properties>
 
   <dependencies>
+    <dependency>
+      <groupId>javax.xml.bind</groupId>
+      <artifactId>jaxb-api</artifactId>
+    </dependency>
     <dependency>
       <groupId>org.apache.archiva</groupId>
       <artifactId>archiva-storage-api</artifactId>
index 69f933c316264b25148b8042f669a4162400ac93..75deaffddadef9c7c14ad622a92117c58b092c84 100644 (file)
       <artifactId>log4j-jcl</artifactId>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <groupId>jakarta.annotation</groupId>
+      <artifactId>jakarta.annotation-api</artifactId>
+      <scope>test</scope>
+    </dependency>
 
+    <dependency>
+      <groupId>jakarta.xml.bind</groupId>
+      <artifactId>jakarta.xml.bind-api</artifactId>
+      <scope>test</scope>
+    </dependency>
   </dependencies>
 
-  <profiles>
-    <profile>
-      <id>jdk9+</id>
-      <activation>
-        <jdk>[1.9,)</jdk>
-      </activation>
-      <dependencies>
-        <!-- Needed for JDK >= 9 -->
-        <dependency>
-          <groupId>jakarta.annotation</groupId>
-          <artifactId>jakarta.annotation-api</artifactId>
-          <scope>test</scope>
-        </dependency>
-
-        <dependency>
-          <groupId>jakarta.xml.bind</groupId>
-          <artifactId>jakarta.xml.bind-api</artifactId>
-          <scope>test</scope>
-        </dependency>
-      </dependencies>
-    </profile>
-  </profiles>
 </project>
index 841ef71b59578a20972e6540eb2756d4c34ae7a3..cab8793528235f3a00ebacb9f0ec6358cfa2e3f1 100644 (file)
       <groupId>jakarta.annotation</groupId>
       <artifactId>jakarta.annotation-api</artifactId>
     </dependency>
-
+    <dependency>
+      <groupId>jakarta.xml.bind</groupId>
+      <artifactId>jakarta.xml.bind-api</artifactId>
+    </dependency>
     <dependency>
       <groupId>org.springframework</groupId>
       <artifactId>spring-context</artifactId>
     </plugins>
   </build>
 
-  <!--
-  The jaxb dependency is needed by the enunciate plugin starting with JDK9.
-  Adding to the plugin dependency is not sufficient, so I have to add it as project dependency.
-  Using provided scope to avoid adding it to packaging.
-  -->
-  <profiles>
-    <profile>
-      <id>jdk9+</id>
-      <activation>
-        <jdk>[1.9,)</jdk>
-      </activation>
-      <dependencies>
-        <dependency>
-          <groupId>jakarta.xml.bind</groupId>
-          <artifactId>jakarta.xml.bind-api</artifactId>
-        </dependency>
-      </dependencies>
-    </profile>
-  </profiles>
-
 </project>
index 71d3efed21dcc90b107fbfe2915ff77534b8cc9f..7be138c8493a62ac5af8abbbe7a900a0ba826a16 100644 (file)
       <artifactId>archiva-repository-admin-api</artifactId>
     </dependency>
 
-
-
     <dependency>
       <groupId>jakarta.annotation</groupId>
       <artifactId>jakarta.annotation-api</artifactId>
     </pluginManagement>
   </build>
 
-  <profiles>
-    <profile>
-      <id>jdk9+</id>
-      <activation>
-        <jdk>[1.9,)</jdk>
-      </activation>
-      <dependencies>
-        <!-- Needed for JDK >= 9 -->
-        <dependency>
-          <groupId>jakarta.annotation</groupId>
-          <artifactId>jakarta.annotation-api</artifactId>
-          <scope>test</scope>
-        </dependency>
-
-        <dependency>
-          <groupId>jakarta.xml.bind</groupId>
-          <artifactId>jakarta.xml.bind-api</artifactId>
-          <scope>test</scope>
-        </dependency>
-      </dependencies>
-    </profile>
-  </profiles>
 </project>
index fbc01e61f6fa81cfc23c6d0a3d801e878c869ec7..58f9403922b9afadf4784d4131227d0c2119b1e0 100644 (file)
       <groupId>jakarta.inject</groupId>
       <artifactId>jakarta.inject-api</artifactId>
     </dependency>
+    <dependency>
+      <groupId>jakarta.xml.bind</groupId>
+      <artifactId>jakarta.xml.bind-api</artifactId>
+    </dependency>
 
+    <dependency>
+      <groupId>io.swagger.core.v3</groupId>
+      <artifactId>swagger-core</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>io.swagger.core.v3</groupId>
+      <artifactId>swagger-jaxrs2</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>io.swagger.core.v3</groupId>
+      <artifactId>swagger-annotations</artifactId>
+    </dependency>
 
-      <dependency>
-        <groupId>io.swagger.core.v3</groupId>
-        <artifactId>swagger-core</artifactId>
-      </dependency>
-      <dependency>
-        <groupId>io.swagger.core.v3</groupId>
-        <artifactId>swagger-jaxrs2</artifactId>
-      </dependency>
-      <dependency>
-        <groupId>io.swagger.core.v3</groupId>
-        <artifactId>swagger-annotations</artifactId>
-      </dependency>
-      <dependency>
-        <groupId>jakarta.xml.bind</groupId>
-        <artifactId>jakarta.xml.bind-api</artifactId>
-      </dependency>
   </dependencies>
 
   <build>
     </plugins>
   </build>
 
-  <!-- 
-    The jaxb dependency is needed by the enunciate plugin starting with JDK9. 
-    Adding to the plugin dependency is not sufficient, so I have to add it as project dependency. 
-    Using provided scope to avoid adding it to packaging.
-  -->
-  <profiles>
-    <profile>
-      <id>jdk9+</id>
-      <activation>
-        <jdk>[1.9,)</jdk>
-      </activation>
-      <dependencies>
-        <dependency>
-          <groupId>jakarta.xml.bind</groupId>
-          <artifactId>jakarta.xml.bind-api</artifactId>
-        </dependency>
-      </dependencies>
-    </profile>
-  </profiles>
-
-
 </project>
index 2fd158e24673392e8f9d92497bfd7954c45f0175..a664df43cde053b3361c54bb5fc47eb86e1b8d37 100644 (file)
       <artifactId>jaxb-runtime</artifactId>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <groupId>jakarta.annotation</groupId>
+      <artifactId>jakarta.annotation-api</artifactId>
+      <scope>test</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>jakarta.xml.bind</groupId>
+      <artifactId>jakarta.xml.bind-api</artifactId>
+      <scope>test</scope>
+    </dependency>
 
   </dependencies>
 
     </plugins>
   </build>
 
-  <profiles>
-    <profile>
-      <id>jdk9+</id>
-      <activation>
-        <jdk>[1.9,)</jdk>
-      </activation>
-      <dependencies>
-        <!-- Needed for JDK >= 9 -->
-        <dependency>
-          <groupId>jakarta.annotation</groupId>
-          <artifactId>jakarta.annotation-api</artifactId>
-          <scope>test</scope>
-        </dependency>
-
-        <dependency>
-          <groupId>jakarta.xml.bind</groupId>
-          <artifactId>jakarta.xml.bind-api</artifactId>
-          <scope>test</scope>
-        </dependency>
-      </dependencies>
-    </profile>
-  </profiles>
-
 </project>
index e44ea64d831289d774967701f561261d21ff2684..f6a47c80f5489ce0f392f1796a4f0f66397cdfbe 100644 (file)
       <artifactId>jackson-jaxrs-json-provider</artifactId>
     </dependency>
 
-
+    <dependency>
+      <groupId>jakarta.xml.bind</groupId>
+      <artifactId>jakarta.xml.bind-api</artifactId>
+    </dependency>
 
     <dependency>
       <groupId>jakarta.mail</groupId>
       <scope>provided</scope>
     </dependency>
 
-
     <dependency>
       <groupId>jakarta.annotation</groupId>
       <artifactId>jakarta.annotation-api</artifactId>
       </plugin>
     </plugins>
   </build>
-
-  <!-- 
-    The jaxb dependency is needed by the enunciate plugin starting with JDK9. 
-    Adding to the plugin dependency is not sufficient, so I have to add it as project dependency. 
-    Using provided scope to avoid adding it to packaging.
-  -->
-  <profiles>
-    <profile>
-      <id>jdk9+</id>
-      <activation>
-        <jdk>[1.9,)</jdk>
-      </activation>
-      <dependencies>
-        <dependency>
-          <groupId>jakarta.xml.bind</groupId>
-          <artifactId>jakarta.xml.bind-api</artifactId>
-        </dependency>
-      </dependencies>
-    </profile>
-  </profiles>
-
-
 </project>
index 8efc940c7ba7150be1e2671d738c348767f3a3f7..0f3ada4a49ec79926549b11fecc49082da687bfb 100644 (file)
     <dependency>
       <groupId>jakarta.annotation</groupId>
       <artifactId>jakarta.annotation-api</artifactId>
-      <scope>test</scope>
     </dependency>
     <dependency>
       <groupId>jakarta.xml.bind</groupId>
       <artifactId>jakarta.xml.bind-api</artifactId>
-      <scope>test</scope>
     </dependency>
     <dependency>
       <groupId>org.glassfish.jaxb</groupId>
index 2363a1915e5b539a3b36ef4bc352dd1cdec30cc9..275d642a7f6215ac901b040b17a5d05056e6bd2a 100644 (file)
   </properties>
 
   <dependencies>
+    <dependency>
+      <groupId>javax.xml.bind</groupId>
+      <artifactId>jaxb-api</artifactId>
+    </dependency>
     <dependency>
       <groupId>org.apache.archiva</groupId>
       <artifactId>archiva-checksum</artifactId>
index b94505b9f4a1eb5e400403ee74e8c53f09bfc22c..7f0cb865c555c842c989204f6c608c86a8cfdf42 100644 (file)
       <scope>test</scope>
     </dependency>
 
+    <dependency>
+      <groupId>jakarta.xml.bind</groupId>
+      <artifactId>jakarta.xml.bind-api</artifactId>
+      <scope>test</scope>
+    </dependency>
   </dependencies>
   <build>
     <plugins>
       </plugin>
     </plugins>
   </build>
-  <profiles>
-    <profile>
-      <id>jdk9+</id>
-      <activation>
-        <jdk>[1.9,)</jdk>
-      </activation>
-      <dependencies>
-        <!-- Needed for JDK >= 9 -->
-        <dependency>
-          <groupId>jakarta.annotation</groupId>
-          <artifactId>jakarta.annotation-api</artifactId>
-          <scope>test</scope>
-        </dependency>
-
-        <dependency>
-          <groupId>jakarta.xml.bind</groupId>
-          <artifactId>jakarta.xml.bind-api</artifactId>
-          <scope>test</scope>
-        </dependency>
-      </dependencies>
-    </profile>
-  </profiles>
 
 </project>
diff --git a/pom.xml b/pom.xml
index b7279d3697755e4f609fab0c012975a99f67493a..6496e406bf053dcc2c911c31eb29d6e9498d7a14 100644 (file)
--- a/pom.xml
+++ b/pom.xml
         </exclusions>
       </dependency>
 
-
+      <dependency>
+        <groupId>javax.xml.bind</groupId>
+        <artifactId>jaxb-api</artifactId>
+        <version>2.3.1</version>
+      </dependency>
 
       <!-- START SNIPPET: rest-dependencies -->
       
         <exclusions>
           <exclusion>
             <groupId>jakarta.annotation</groupId>
-      <artifactId>jakarta.annotation-api</artifactId>
+            <artifactId>jakarta.annotation-api</artifactId>
           </exclusion>
         </exclusions>
       </dependency>