Skip to content

Commit be4fd68

Browse files
committed
[cicd] Migrate to Java21
1 parent a4b5e82 commit be4fd68

File tree

8 files changed

+45
-25
lines changed

8 files changed

+45
-25
lines changed

.github/workflows/ci-container.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ jobs:
1111
- uses: actions/checkout@v4
1212
with:
1313
fetch-depth: 1
14-
- name: Set up JDK 17
14+
- name: Set up JDK 21
1515
uses: actions/setup-java@v4
1616
with:
1717
distribution: liberica
18-
java-version: '17'
18+
java-version: '21'
1919
- name: Set up QEMU
2020
uses: docker/setup-qemu-action@v3
2121
with:
@@ -36,7 +36,7 @@ jobs:
3636
# Hack around #5450
3737
- name: pull base image
3838
run: |
39-
docker pull --platform linux/amd64 --platform linux/arm64 gcr.io/distroless/java17-debian12:latest
39+
docker pull --platform linux/amd64 --platform linux/arm64 gcr.io/distroless/java21-debian12:latest
4040
- name: Build images
4141
run: mvn -V -B -q -Pdocker -DskipTests -Ddependency-check.skip=true -P !mac-dmg-on-unix,!installer,!concurrency-stress-tests,!micro-benchmarks,skip-build-dist-archives clean package
4242
- name: Check local images

.github/workflows/ci-snapshots.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ jobs:
1515
- uses: actions/checkout@v4
1616
with:
1717
fetch-depth: 1
18-
- name: Set up JDK 17
18+
- name: Set up JDK 21
1919
uses: actions/setup-java@v4
2020
with:
2121
distribution: liberica
22-
java-version: '17'
22+
java-version: '21'
2323
server-id: github
2424
settings-path: ${{ github.workspace }}
2525
- name: Cache Maven packages

.github/workflows/ci-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ permissions:
44
contents: read
55
env:
66
MAVEN_OPTS: -DtrimStackTrace=false -D'maven.resolver.transport=wagon'
7-
DEV_JDK: '17'
7+
DEV_JDK: '21'
88
jobs:
99
license:
1010
name: License check
@@ -40,7 +40,7 @@ jobs:
4040
fail-fast: false
4141
matrix:
4242
os: [ubuntu-latest, windows-latest, macOS-latest]
43-
jvm: ['17', '21']
43+
jvm: ['21']
4444
runs-on: ${{ matrix.os }}
4545
steps:
4646
- uses: actions/checkout@v4

.github/workflows/ci-xqts.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ jobs:
99
runs-on: ubuntu-latest
1010
steps:
1111
- uses: actions/checkout@v4
12-
- name: Set up JDK 17
12+
- name: Set up JDK 21
1313
uses: actions/setup-java@v4
1414
with:
1515
distribution: liberica
16-
java-version: '17'
16+
java-version: '21'
1717
- name: Cache Maven packages
1818
uses: actions/cache@v4
1919
with:

.github/workflows/sonarcloud.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ jobs:
1414
- uses: actions/checkout@v4
1515
with:
1616
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
17-
- name: Set up JDK 17
17+
- name: Set up JDK 21
1818
uses: actions/setup-java@v4
1919
with:
2020
distribution: liberica
21-
java-version: 17
21+
java-version: 21
2222
- name: Cache SonarCloud packages
2323
uses: actions/cache@v4
2424
with:

exist-core-jmh/pom.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -121,11 +121,6 @@
121121
<plugin>
122122
<groupId>org.apache.maven.plugins</groupId>
123123
<artifactId>maven-compiler-plugin</artifactId>
124-
<configuration>
125-
<compilerVersion>${project.build.target}</compilerVersion>
126-
<source>${project.build.source}</source>
127-
<target>${project.build.target}</target>
128-
</configuration>
129124
</plugin>
130125
<plugin>
131126
<groupId>org.apache.maven.plugins</groupId>

exist-core/pom.xml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1094,6 +1094,7 @@ The BaseX Team. The original license statement is also included below.]]></pream
10941094
</plugin>
10951095

10961096
<plugin>
1097+
<groupId>org.apache.maven.plugins</groupId>
10971098
<artifactId>maven-compiler-plugin</artifactId>
10981099
<executions>
10991100
<execution>
@@ -1135,9 +1136,9 @@ The BaseX Team. The original license statement is also included below.]]></pream
11351136
<configuration>
11361137
<forceAjcCompile>true</forceAjcCompile> <!-- Required, otherwise the Aspects are not re-compiled when the src/main/java is recompiled for the test phase -->
11371138
<showWeaveInfo>true</showWeaveInfo>
1138-
<complianceLevel>${project.build.source}</complianceLevel>
1139-
<source>${project.build.source}</source>
1140-
<target>${project.build.target}</target>
1139+
<complianceLevel>${maven.compiler.release}</complianceLevel>
1140+
<source>${maven.compiler.source}</source>
1141+
<target>${maven.compiler.target}</target>
11411142
<!-- sources>
11421143
<source>
11431144
<basedir>${project.build.sourceDirectory}</basedir>

exist-parent/pom.xml

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,9 @@
9292
</mailingLists>
9393

9494
<properties>
95-
<project.build.source>17</project.build.source>
96-
<project.build.target>17</project.build.target>
95+
<maven.compiler.release>21</maven.compiler.release>
96+
<maven.compiler.source>${maven.compiler.release}</maven.compiler.source>
97+
<maven.compiler.target>${maven.compiler.release}</maven.compiler.target>
9798
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
9899

99100
<project.copyright.name>The eXist-db Authors</project.copyright.name>
@@ -693,10 +694,8 @@
693694
<plugin>
694695
<groupId>org.apache.maven.plugins</groupId>
695696
<artifactId>maven-compiler-plugin</artifactId>
696-
<version>3.13.0</version>
697+
<version>3.14.0</version>
697698
<configuration>
698-
<source>${project.build.source}</source>
699-
<target>${project.build.target}</target>
700699
<encoding>${project.build.sourceEncoding}</encoding>
701700
</configuration>
702701
</plugin>
@@ -753,7 +752,7 @@
753752
<artifactId>maven-javadoc-plugin</artifactId>
754753
<version>3.11.2</version>
755754
<configuration>
756-
<source>${project.build.source}</source>
755+
<source>${maven.compiler.release}</source>
757756
<archive>
758757
<manifest>
759758
<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
@@ -977,6 +976,31 @@
977976
</pluginManagement>
978977

979978
<plugins>
979+
<plugin>
980+
<groupId>org.apache.maven.plugins</groupId>
981+
<artifactId>maven-enforcer-plugin</artifactId>
982+
<version>3.5.0</version>
983+
<executions>
984+
<execution>
985+
<id>enforce-java</id>
986+
<goals>
987+
<goal>enforce</goal>
988+
</goals>
989+
<configuration>
990+
<rules>
991+
<requireJavaVersion>
992+
<version>${maven.compiler.target}</version>
993+
<message>eXist-db requires (at least) OpenJDK ${maven.compiler.target} to build and run.</message>
994+
</requireJavaVersion>
995+
<requireMavenVersion>
996+
<message>Modern plugins require atleast maven 3.6.3.</message>
997+
<version>3.6.3</version>
998+
</requireMavenVersion>
999+
</rules>
1000+
</configuration>
1001+
</execution>
1002+
</executions>
1003+
</plugin>
9801004
<plugin>
9811005
<groupId>com.mycila</groupId>
9821006
<artifactId>license-maven-plugin</artifactId>

0 commit comments

Comments
 (0)