From 6bc28ca24a30e09c062eaf02af1f0025d64ec5c0 Mon Sep 17 00:00:00 2001 From: marko-bekhta Date: Tue, 17 Dec 2024 12:09:01 +0100 Subject: [PATCH 1/3] HV-2071 Build with JDK 21 --- Jenkinsfile | 12 ++++++------ jenkins/nightly/Jenkinsfile | 2 +- jenkins/release/Jenkinsfile | 2 +- jenkins/snapshot-publish/Jenkinsfile | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) 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/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. From 33c807840fecfc73fe7f2b91786bd2b8a760b54c Mon Sep 17 00:00:00 2001 From: marko-bekhta Date: Tue, 17 Dec 2024 12:13:26 +0100 Subject: [PATCH 2/3] HV-2071 Set JDK 21 as a minimum required for the build --- README.md | 2 +- pom.xml | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) 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/pom.xml b/pom.xml index f14cfb405f..54a24570b5 100644 --- a/pom.xml +++ b/pom.xml @@ -403,7 +403,7 @@ - 17 + 21