Skip to content

Commit 1d69ff5

Browse files
committed
Upgrade to Java 17.
Closes #1537
1 parent f8c463e commit 1d69ff5

File tree

2 files changed

+12
-111
lines changed

2 files changed

+12
-111
lines changed

Jenkinsfile

+3-48
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ pipeline {
1212
}
1313

1414
stages {
15-
stage("test: baseline (jdk8)") {
15+
stage("test: baseline (Java 17)") {
1616
agent {
1717
label 'data'
1818
}
@@ -23,59 +23,14 @@ pipeline {
2323
steps {
2424
script {
2525
docker.withRegistry('', 'hub.docker.com-springbuildmaster') {
26-
docker.image('adoptopenjdk/openjdk8:latest').inside('-v $HOME:/tmp/jenkins-home') {
26+
docker.image('openjdk:17').inside('-v $HOME:/tmp/jenkins-home') {
2727
sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -s settings.xml clean dependency:list verify -Dsort -B'
2828
}
2929
}
3030
}
3131
}
3232
}
3333

34-
stage("Test other configurations") {
35-
when {
36-
branch(pattern: "main|(\\d\\.\\d\\.x)", comparator: "REGEXP")
37-
}
38-
parallel {
39-
stage("test: baseline (jdk11)") {
40-
agent {
41-
label 'data'
42-
}
43-
options { timeout(time: 30, unit: 'MINUTES') }
44-
environment {
45-
ARTIFACTORY = credentials('02bd1690-b54f-4c9f-819d-a77cb7a9822c')
46-
}
47-
steps {
48-
script {
49-
docker.withRegistry('', 'hub.docker.com-springbuildmaster') {
50-
docker.image('adoptopenjdk/openjdk11:latest').inside('-v $HOME:/tmp/jenkins-home') {
51-
sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -s settings.xml -Pjava11 clean dependency:list verify -Dsort -B'
52-
}
53-
}
54-
}
55-
}
56-
}
57-
58-
stage("test: baseline (jdk17)") {
59-
agent {
60-
label 'data'
61-
}
62-
options { timeout(time: 30, unit: 'MINUTES') }
63-
environment {
64-
ARTIFACTORY = credentials('02bd1690-b54f-4c9f-819d-a77cb7a9822c')
65-
}
66-
steps {
67-
script {
68-
docker.withRegistry('', 'hub.docker.com-springbuildmaster') {
69-
docker.image('openjdk:17-bullseye').inside('-v $HOME:/tmp/jenkins-home') {
70-
sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -s settings.xml -Pjava11 clean dependency:list verify -Dsort -B'
71-
}
72-
}
73-
}
74-
}
75-
}
76-
}
77-
}
78-
7934
stage('Build project and release to artifactory') {
8035
agent {
8136
label 'data'
@@ -89,7 +44,7 @@ pipeline {
8944
steps {
9045
script {
9146
docker.withRegistry('', 'hub.docker.com-springbuildmaster') {
92-
docker.image('adoptopenjdk/openjdk8:latest').inside('-v $HOME:/tmp/jenkins-home') {
47+
docker.image('openjdk:17').inside('-v $HOME:/tmp/jenkins-home') {
9348
sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -s settings.xml -Pci,artifactory ' +
9449
'-Dartifactory.server=https://repo.spring.io ' +
9550
"-Dartifactory.username=${ARTIFACTORY_USR} " +

parent/pom.xml

+9-63
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,11 @@
9292

9393
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
9494
<project.root>${basedir}</project.root>
95-
<source.level>1.8</source.level>
95+
<source.level>17</source.level>
9696
<dist.id>${project.artifactId}</dist.id>
9797
<jacoco.destfile>${project.build.directory}/jacoco.exec</jacoco.destfile>
98+
<kotlin.jvm.target>11</kotlin.jvm.target>
99+
<maven.kotlin.skip>false</maven.kotlin.skip>
98100

99101
<apt>1.1.3</apt>
100102
<aspectj>1.9.7</aspectj>
@@ -104,6 +106,7 @@
104106
<guava>19.0</guava>
105107
<hamcrest>1.3</hamcrest>
106108
<jackson>2.13.1</jackson>
109+
<jaxb>2.3.1</jaxb>
107110
<jacoco>0.8.7</jacoco>
108111
<jodatime>2.10.13</jodatime>
109112
<jmolecules>1.4.0</jmolecules>
@@ -129,10 +132,13 @@
129132
<spring>5.3.13</spring>
130133
<spring-hateoas>1.4.0</spring-hateoas>
131134
<spring-plugin>2.0.0.RELEASE</spring-plugin>
135+
<servlet-api>4.0.1</servlet-api>
132136
<testcontainers>1.16.2</testcontainers>
133137
<threetenbp>1.5.2</threetenbp>
134138
<validation>1.1.0.Final</validation>
135139
<webbeans>2.0.25</webbeans>
140+
141+
<!-- OWB requires via XBean a newer ASM version -->
136142
<webbeans.xbean>4.20</webbeans.xbean>
137143
<javax-annotation-api>1.3.2</javax-annotation-api>
138144

@@ -208,43 +214,11 @@
208214

209215
</profile>
210216

211-
<!-- Used to build Java 11+ -->
212-
<profile>
213-
<id>java11</id>
214-
215-
<properties>
216-
<jaxb.version>2.2.11</jaxb.version>
217-
<java-activation.version>1.1.1</java-activation.version>
218-
</properties>
219-
220-
<dependencies>
221-
<dependency>
222-
<groupId>javax.xml.bind</groupId>
223-
<artifactId>jaxb-api</artifactId>
224-
<version>${jaxb.version}</version>
225-
<scope>provided</scope>
226-
</dependency>
227-
228-
<dependency>
229-
<groupId>javax.activation</groupId>
230-
<artifactId>activation</artifactId>
231-
<version>${java-activation.version}</version>
232-
<scope>provided</scope>
233-
</dependency>
234-
235-
<dependency>
236-
<groupId>javax.annotation</groupId>
237-
<artifactId>javax.annotation-api</artifactId>
238-
<version>${javax-annotation-api}</version>
239-
<scope>provided</scope>
240-
</dependency>
241-
</dependencies>
242-
</profile>
243217

244218
<!--
245219
Profile to be run before a release is executed, currently does the following:
246220

247-
- Prevents thrid-party snapshot dependencies in projects
221+
- Prevents third-party snapshot dependencies in projects
248222
-->
249223

250224
<profile>
@@ -278,34 +252,6 @@
278252
</build>
279253
</profile>
280254

281-
<profile>
282-
283-
<!-- Profile for SonarCube -->
284-
285-
<id>sonarcube</id>
286-
287-
<build>
288-
<plugins>
289-
<plugin>
290-
<groupId>org.jacoco</groupId>
291-
<artifactId>jacoco-maven-plugin</artifactId>
292-
<version>${jacoco}</version>
293-
<configuration>
294-
<destFile>${jacoco.destfile}</destFile>
295-
</configuration>
296-
<executions>
297-
<execution>
298-
<id>jacoco-initialize</id>
299-
<goals>
300-
<goal>prepare-agent</goal>
301-
</goals>
302-
</execution>
303-
</executions>
304-
</plugin>
305-
</plugins>
306-
</build>
307-
</profile>
308-
309255
<profile>
310256

311257
<!--
@@ -1108,7 +1054,7 @@
11081054
<artifactId>kotlin-maven-plugin</artifactId>
11091055
<version>${kotlin}</version>
11101056
<configuration>
1111-
<jvmTarget>${source.level}</jvmTarget>
1057+
<jvmTarget>${kotlin.jvm.target}</jvmTarget>
11121058
<apiVersion>1.3</apiVersion>
11131059
<languageVersion>1.3</languageVersion>
11141060
<args>

0 commit comments

Comments
 (0)