Upgrade to Java 17.

Closes #1537
This commit is contained in:
Mark Paluch
2021-09-20 08:49:25 +02:00
parent bafb598024
commit ced9f751e6
2 changed files with 12 additions and 111 deletions

51
Jenkinsfile vendored
View File

@@ -12,7 +12,7 @@ pipeline {
}
stages {
stage("test: baseline (jdk8)") {
stage("test: baseline (Java 17)") {
agent {
label 'data'
}
@@ -23,7 +23,7 @@ pipeline {
steps {
script {
docker.withRegistry('', 'hub.docker.com-springbuildmaster') {
docker.image('adoptopenjdk/openjdk8:latest').inside('-v $HOME:/tmp/jenkins-home') {
docker.image('openjdk:17').inside('-v $HOME:/tmp/jenkins-home') {
sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -s settings.xml clean dependency:list verify -Dsort -B'
}
}
@@ -31,51 +31,6 @@ pipeline {
}
}
stage("Test other configurations") {
when {
branch(pattern: "main|(\\d\\.\\d\\.x)", comparator: "REGEXP")
}
parallel {
stage("test: baseline (jdk11)") {
agent {
label 'data'
}
options { timeout(time: 30, unit: 'MINUTES') }
environment {
ARTIFACTORY = credentials('02bd1690-b54f-4c9f-819d-a77cb7a9822c')
}
steps {
script {
docker.withRegistry('', 'hub.docker.com-springbuildmaster') {
docker.image('adoptopenjdk/openjdk11:latest').inside('-v $HOME:/tmp/jenkins-home') {
sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -s settings.xml -Pjava11 clean dependency:list verify -Dsort -B'
}
}
}
}
}
stage("test: baseline (jdk17)") {
agent {
label 'data'
}
options { timeout(time: 30, unit: 'MINUTES') }
environment {
ARTIFACTORY = credentials('02bd1690-b54f-4c9f-819d-a77cb7a9822c')
}
steps {
script {
docker.withRegistry('', 'hub.docker.com-springbuildmaster') {
docker.image('openjdk:17-bullseye').inside('-v $HOME:/tmp/jenkins-home') {
sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -s settings.xml -Pjava11 clean dependency:list verify -Dsort -B'
}
}
}
}
}
}
}
stage('Build project and release to artifactory') {
agent {
label 'data'
@@ -89,7 +44,7 @@ pipeline {
steps {
script {
docker.withRegistry('', 'hub.docker.com-springbuildmaster') {
docker.image('adoptopenjdk/openjdk8:latest').inside('-v $HOME:/tmp/jenkins-home') {
docker.image('openjdk:17').inside('-v $HOME:/tmp/jenkins-home') {
sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -s settings.xml -Pci,artifactory ' +
'-Dartifactory.server=https://repo.spring.io ' +
"-Dartifactory.username=${ARTIFACTORY_USR} " +

View File

@@ -92,9 +92,11 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.root>${basedir}</project.root>
<source.level>1.8</source.level>
<source.level>17</source.level>
<dist.id>${project.artifactId}</dist.id>
<jacoco.destfile>${project.build.directory}/jacoco.exec</jacoco.destfile>
<kotlin.jvm.target>11</kotlin.jvm.target>
<maven.kotlin.skip>false</maven.kotlin.skip>
<apt>1.1.3</apt>
<aspectj>1.9.7</aspectj>
@@ -104,6 +106,7 @@
<guava>19.0</guava>
<hamcrest>1.3</hamcrest>
<jackson>2.13.1</jackson>
<jaxb>2.3.1</jaxb>
<jacoco>0.8.7</jacoco>
<jodatime>2.10.13</jodatime>
<jmolecules>1.4.0</jmolecules>
@@ -129,10 +132,13 @@
<spring>5.3.13</spring>
<spring-hateoas>1.4.0</spring-hateoas>
<spring-plugin>2.0.0.RELEASE</spring-plugin>
<servlet-api>4.0.1</servlet-api>
<testcontainers>1.16.2</testcontainers>
<threetenbp>1.5.2</threetenbp>
<validation>1.1.0.Final</validation>
<webbeans>2.0.25</webbeans>
<!-- OWB requires via XBean a newer ASM version -->
<webbeans.xbean>4.20</webbeans.xbean>
<javax-annotation-api>1.3.2</javax-annotation-api>
@@ -208,43 +214,11 @@
</profile>
<!-- Used to build Java 11+ -->
<profile>
<id>java11</id>
<properties>
<jaxb.version>2.2.11</jaxb.version>
<java-activation.version>1.1.1</java-activation.version>
</properties>
<dependencies>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>${jaxb.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
<version>${java-activation.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
<version>${javax-annotation-api}</version>
<scope>provided</scope>
</dependency>
</dependencies>
</profile>
<!--
Profile to be run before a release is executed, currently does the following:
- Prevents thrid-party snapshot dependencies in projects
- Prevents third-party snapshot dependencies in projects
-->
<profile>
@@ -278,34 +252,6 @@
</build>
</profile>
<profile>
<!-- Profile for SonarCube -->
<id>sonarcube</id>
<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco}</version>
<configuration>
<destFile>${jacoco.destfile}</destFile>
</configuration>
<executions>
<execution>
<id>jacoco-initialize</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<!--
@@ -1108,7 +1054,7 @@
<artifactId>kotlin-maven-plugin</artifactId>
<version>${kotlin}</version>
<configuration>
<jvmTarget>${source.level}</jvmTarget>
<jvmTarget>${kotlin.jvm.target}</jvmTarget>
<apiVersion>1.3</apiVersion>
<languageVersion>1.3</languageVersion>
<args>