diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 82ab0eced..9a323715a 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -29,7 +29,7 @@ jobs:
strategy:
matrix:
os: [ ubuntu-latest ]
- java: [ '11' ]
+ java: [ '21' ]
steps:
- uses: actions/checkout@v4
@@ -60,7 +60,7 @@ jobs:
strategy:
matrix:
os: [ ubuntu-latest, windows-latest ]
- java: [ '8', '11', '17' ]
+ java: [ '8', '11', '17', '21' ]
steps:
- uses: actions/checkout@v4
@@ -68,7 +68,7 @@ jobs:
uses: actions/setup-java@v4
with:
distribution: temurin
- java-version: ${{ matrix.java }}
+ java-version: ${{ matrix.java }}, 21
- uses: actions/cache@v4
with:
@@ -78,21 +78,33 @@ jobs:
${{ matrix.os }}-maven-
- name: Set up Maven
+ uses: stCarolas/setup-maven@v5
+ with:
+ maven-version: '3.9.8'
+
+ - name: Build and test with maven
+ # Skip all static checks, they were already done in the compile jobs
run:
- mvn --errors --batch-mode --show-version org.apache.maven.plugins:maven-wrapper-plugin:3.3.2:wrapper "-Dmaven=3.9.8"
+ mvn -B --errors --activate-profiles ci,jdk8 "-DjdkToolchainVersion=[,9)" --no-transfer-progress package
+ if: matrix.java == '8'
+
+ - name: Build and test with maven
+ # Skip all static checks, they were already done in the compile jobs
+ run:
+ mvn -B --errors --activate-profiles ci "-DjdkToolchainVersion=[11,12)" --no-transfer-progress package
+ if: matrix.java == '11'
- name: Build and test with maven
# Skip all static checks, they were already done in the compile jobs
run:
- mvnw.cmd -B --errors --activate-profiles ci,jdk${{ matrix.java }} --no-transfer-progress package
- shell: cmd
- if: matrix.os == 'windows-latest'
+ mvn -B --errors --activate-profiles ci "-DjdkToolchainVersion=[17,18)" --no-transfer-progress package
+ if: matrix.java == '17'
- name: Build and test with maven
# Skip all static checks, they were already done in the compile jobs
run:
- ./mvnw -B --errors --activate-profiles ci,jdk${{ matrix.java }} --no-transfer-progress package
- if: matrix.os != 'windows-latest'
+ mvn -B --errors --activate-profiles ci "-DjdkToolchainVersion=[21,22)" --no-transfer-progress package
+ if: matrix.java == '21'
- name: Archive test results and logs
# if: success() || failure() to also get the test results on successful runs.
diff --git a/pom.xml b/pom.xml
index 348334b85..90ab77bdd 100644
--- a/pom.xml
+++ b/pom.xml
@@ -79,7 +79,8 @@
- 11
+ 21
+ [${minimalJavaBuildVersion},)
3.9.8
UTF-8
@@ -132,6 +133,47 @@
+
+ toolchains
+
+
+ jdkToolchainVersion
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-toolchains-plugin
+ 3.2.0
+
+
+ load
+ validate
+
+ select-jdk-toolchain
+
+
+ [${minimalJavaBuildVersion},)
+ Never
+
+
+
+ pre-test
+ process-test-classes
+
+ select-jdk-toolchain
+
+
+ ${jdkToolchainVersion}
+ Never
+
+
+
+
+
+
+
jdk8
@@ -162,15 +204,6 @@
-
- jdk11
-
-
- jdk17
-
-
- jdk21
-
ci