diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 3ca57e593c..82a6607562 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -60,20 +60,20 @@ jobs:
matrix:
os:
- {
- name: "Linux JDK 17",
+ name: "Linux JDK 21",
runs-on: 'ubuntu-latest',
java: {
- version: 17
+ version: 21
},
maven: {
args: ''
}
}
- {
- name: "Windows JDK 17",
+ name: "Windows JDK 21",
runs-on: 'windows-latest',
java: {
- version: 17
+ version: 21
},
maven: {
args: ''
diff --git a/Jenkinsfile b/Jenkinsfile
index 1fe6751824..a1e0dabebd 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -75,7 +75,7 @@ import org.hibernate.jenkins.pipeline.helpers.alternative.AlternativeMultiMap
*
*/
-@Field final String DEFAULT_JDK_TOOL = 'OpenJDK 17 Latest'
+@Field final String DEFAULT_JDK_TOOL = 'OpenJDK 21 Latest'
@Field final String MAVEN_TOOL = 'Apache Maven 3.9'
// Default node pattern, to be used for resource-intensive stages.
@@ -101,14 +101,14 @@ stage('Configure') {
// This should not include every JDK; in particular let's not care too much about EOL'd JDKs like version 9
// See http://www.oracle.com/technetwork/java/javase/eol-135779.html
new JdkBuildEnvironment(testJavaVersion: '17', testCompilerTool: 'OpenJDK 17 Latest',
+ condition: TestCondition.AFTER_MERGE),
+ new JdkBuildEnvironment(testJavaVersion: '21', testCompilerTool: 'OpenJDK 21 Latest',
condition: TestCondition.BEFORE_MERGE,
isDefault: true),
+
// We want to enable preview features when testing newer builds of OpenJDK:
// even if we don't use these features, just enabling them can cause side effects
// and it's useful to test that.
- new JdkBuildEnvironment(testJavaVersion: '21', testCompilerTool: 'OpenJDK 21 Latest',
- testLauncherArgs: '--enable-preview',
- condition: TestCondition.AFTER_MERGE),
new JdkBuildEnvironment(testJavaVersion: '23', testCompilerTool: 'OpenJDK 23 Latest',
testLauncherArgs: '--enable-preview',
condition: TestCondition.AFTER_MERGE),
@@ -120,11 +120,11 @@ stage('Configure') {
condition: TestCondition.AFTER_MERGE)
],
wildflyTck: [
- new WildFlyTckBuildEnvironment(testJavaVersion: '17', testCompilerTool: 'OpenJDK 17 Latest',
+ new WildFlyTckBuildEnvironment(testJavaVersion: '21', testCompilerTool: 'OpenJDK 21 Latest',
condition: TestCondition.ON_DEMAND)
],
sigtest: [
- new SigTestBuildEnvironment(testJavaVersion: '17', jdkTool: 'OpenJDK 17 Latest',
+ new SigTestBuildEnvironment(testJavaVersion: '21', jdkTool: 'OpenJDK 21 Latest',
condition: TestCondition.BEFORE_MERGE)
]
])
diff --git a/README.md b/README.md
index 1a5acce6ec..1efab3ddd7 100644
--- a/README.md
+++ b/README.md
@@ -75,7 +75,7 @@ the Apache Software License 2.0. Refer to license.txt for more information.
## Build from Source
You can build Hibernate Validator from source by cloning the git repository `git://github.com/hibernate/hibernate-validator.git`.
-You will also need a JDK 17+ and Maven 3 (>= 3.9.8). With these prerequisites in place you can compile the source via:
+You will also need a JDK 21+ and Maven 3 (>= 3.9.9). With these prerequisites in place you can compile the source via:
mvn clean install
diff --git a/jenkins/nightly/Jenkinsfile b/jenkins/nightly/Jenkinsfile
index da55858e88..1442f3f767 100644
--- a/jenkins/nightly/Jenkinsfile
+++ b/jenkins/nightly/Jenkinsfile
@@ -6,7 +6,7 @@
@Library('hibernate-jenkins-pipeline-helpers') _
def withMavenWorkspace(Closure body) {
- withMavenWorkspace('OpenJDK 17 Latest', body)
+ withMavenWorkspace('OpenJDK 21 Latest', body)
}
def withMavenWorkspace(jdk, Closure body) {
diff --git a/jenkins/release/Jenkinsfile b/jenkins/release/Jenkinsfile
index e33278882c..c0e7d5e59c 100644
--- a/jenkins/release/Jenkinsfile
+++ b/jenkins/release/Jenkinsfile
@@ -13,7 +13,7 @@ pipeline {
}
tools {
maven 'Apache Maven 3.9'
- jdk 'OpenJDK 17 Latest'
+ jdk 'OpenJDK 21 Latest'
}
options {
buildDiscarder logRotator(daysToKeepStr: '30', numToKeepStr: '10')
diff --git a/jenkins/snapshot-publish/Jenkinsfile b/jenkins/snapshot-publish/Jenkinsfile
index 2be679bcd0..cc58dda587 100644
--- a/jenkins/snapshot-publish/Jenkinsfile
+++ b/jenkins/snapshot-publish/Jenkinsfile
@@ -18,7 +18,7 @@ pipeline {
}
tools {
maven 'Apache Maven 3.9'
- jdk 'OpenJDK 17 Latest'
+ jdk 'OpenJDK 21 Latest'
}
options {
// Wait for 1h before publishing snapshots, in case there's more commits.
diff --git a/pom.xml b/pom.xml
index f14cfb405f..54a24570b5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -403,7 +403,7 @@
- 17
+ 21