Browse Source

[MRM-2031] Switch to jdk 11

Signed-off-by: Olivier Lamy <olamy@apache.org>
pull/121/head
Olivier Lamy 1 year ago
parent
commit
4e15d4fd6f

+ 1
- 1
.github/workflows/maven.yml View File

@@ -28,7 +28,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
java: [8, 11]
java: [11, 17]
fail-fast: false

runs-on: ${{ matrix.os }}

+ 6
- 8
Jenkinsfile View File

@@ -28,10 +28,8 @@
* 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()

+ 10
- 22
archiva-modules/archiva-base/archiva-checksum/pom.xml View File

@@ -58,7 +58,17 @@
<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>
@@ -77,26 +87,4 @@
</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>

+ 4
- 19
archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/pom.xml View File

@@ -113,6 +113,10 @@
<artifactId>commons-io</artifactId>
</dependency>

<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
</dependency>

<!-- test dependencies -->
<dependency>
@@ -329,23 +333,4 @@
</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>

+ 13
- 23
archiva-modules/archiva-base/archiva-policies/pom.xml View File

@@ -75,6 +75,19 @@
<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>
@@ -137,27 +150,4 @@
</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>

+ 5
- 18
archiva-modules/archiva-base/archiva-proxy/pom.xml View File

@@ -133,8 +133,11 @@
<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>
@@ -171,20 +174,4 @@
</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>

+ 4
- 0
archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/pom.xml View File

@@ -33,6 +33,10 @@
</properties>

<dependencies>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-storage-api</artifactId>

+ 10
- 22
archiva-modules/archiva-base/archiva-transaction/pom.xml View File

@@ -56,29 +56,17 @@
<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>

+ 4
- 21
archiva-modules/archiva-maven/archiva-maven-proxy/pom.xml View File

@@ -123,7 +123,10 @@
<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>
@@ -253,24 +256,4 @@
</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>

+ 0
- 24
archiva-modules/archiva-maven/archiva-maven-repository/pom.xml View File

@@ -113,8 +113,6 @@
<artifactId>archiva-repository-admin-api</artifactId>
</dependency>



<dependency>
<groupId>jakarta.annotation</groupId>
<artifactId>jakarta.annotation-api</artifactId>
@@ -367,26 +365,4 @@
</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>

+ 16
- 37
archiva-modules/archiva-web/archiva-rest/archiva-rest-api/pom.xml View File

@@ -104,24 +104,24 @@
<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>
@@ -140,25 +140,4 @@
</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>

+ 11
- 23
archiva-modules/archiva-web/archiva-rest/archiva-rest-services/pom.xml View File

@@ -501,6 +501,17 @@
<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>

@@ -564,27 +575,4 @@
</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>

+ 4
- 24
archiva-modules/archiva-web/archiva-web-common/pom.xml View File

@@ -377,7 +377,10 @@
<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>
@@ -385,7 +388,6 @@
<scope>provided</scope>
</dependency>


<dependency>
<groupId>jakarta.annotation</groupId>
<artifactId>jakarta.annotation-api</artifactId>
@@ -596,26 +598,4 @@
</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>

+ 0
- 2
archiva-modules/archiva-web/archiva-webdav/pom.xml View File

@@ -391,12 +391,10 @@
<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>

+ 4
- 0
archiva-modules/metadata/metadata-model/pom.xml View File

@@ -32,6 +32,10 @@
</properties>

<dependencies>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-checksum</artifactId>

+ 5
- 22
archiva-modules/plugins/problem-reports/pom.xml View File

@@ -126,6 +126,11 @@
<scope>test</scope>
</dependency>

<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
@@ -158,27 +163,5 @@
</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>

+ 6
- 2
pom.xml View File

@@ -861,7 +861,11 @@
</exclusions>
</dependency>


<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.1</version>
</dependency>

<!-- START SNIPPET: rest-dependencies -->
@@ -1224,7 +1228,7 @@
<exclusions>
<exclusion>
<groupId>jakarta.annotation</groupId>
<artifactId>jakarta.annotation-api</artifactId>
<artifactId>jakarta.annotation-api</artifactId>
</exclusion>
</exclusions>
</dependency>

Loading…
Cancel
Save