Skip to content

Commit ed8c16f

Browse files
committed
Enable JDK 21 in CI
1 parent 6ddb794 commit ed8c16f

File tree

2 files changed

+16
-13
lines changed

2 files changed

+16
-13
lines changed

.circleci/config.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,10 @@ jobs:
4444
docker:
4545
- image: cimg/openjdk:17.0
4646
<<: *default_steps
47-
48-
## Fails with "Source option 7 is no longer supported. Use 8 or later."
49-
# openjdk21:
50-
# docker:
51-
# - image: cimg/openjdk:21.0
52-
# <<: *default_steps
47+
openjdk21:
48+
docker:
49+
- image: cimg/openjdk:21.0
50+
<<: *default_steps
5351

5452
windows-openjdk12:
5553
executor: win/default
@@ -79,7 +77,7 @@ workflows:
7977
- openjdk11
8078
- openjdk13
8179
- openjdk17
82-
# - openjdk21
80+
- openjdk21
8381
- windows-openjdk12
8482
- openjdk8-jnr-exclude
8583
- openjdk8-jnr-latest

pom.xml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
<properties>
1515
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
1616
<project.scm.id>github</project.scm.id>
17-
<java.version>1.6</java.version>
17+
<java.version>1.7</java.version>
18+
<jdk.version>1.7</jdk.version>
1819
<!-- 3.1.0 is last version to support Java 7 -->
1920
<maven-wrapper-plugin.version>3.1.0</maven-wrapper-plugin.version>
2021
<!-- 2.22.2 is last version to support Java 7 -->
@@ -168,6 +169,10 @@
168169
<activation>
169170
<jdk>[16.0,)</jdk>
170171
</activation>
172+
<properties>
173+
<!-- Fix for JDK 21 which fails with "Source option 7 is no longer supported. Use 8 or later. -->
174+
<jdk.version>1.8</jdk.version>
175+
</properties>
171176
<build>
172177
<plugins>
173178
<plugin>
@@ -256,7 +261,7 @@
256261
<configuration>
257262
<rules>
258263
<requireJavaVersion>
259-
<version>[1.7.0-0,1.9.0-0),[9.0,18.0-0)</version>
264+
<version>[1.7.0-0,1.9.0-0),[9.0,22.0-0)</version>
260265
</requireJavaVersion>
261266
</rules>
262267
</configuration>
@@ -266,7 +271,7 @@
266271
<plugin>
267272
<groupId>org.apache.maven.plugins</groupId>
268273
<artifactId>maven-source-plugin</artifactId>
269-
<version>2.4</version>
274+
<version>3.3.0</version>
270275
<executions>
271276
<execution>
272277
<id>attach-sources</id>
@@ -281,16 +286,16 @@
281286
<artifactId>maven-compiler-plugin</artifactId>
282287
<version>3.8.1</version>
283288
<configuration>
284-
<source>1.7</source>
285-
<target>1.7</target>
289+
<source>${jdk.version}</source>
290+
<target>${jdk.version}</target>
286291
</configuration>
287292
</plugin>
288293
<plugin>
289294
<groupId>org.apache.maven.plugins</groupId>
290295
<artifactId>maven-javadoc-plugin</artifactId>
291296
<version>3.1.0</version>
292297
<configuration>
293-
<source>1.7</source>
298+
<source>${jdk.version}</source>
294299
</configuration>
295300
<executions>
296301
<execution>

0 commit comments

Comments
 (0)