Skip to content

Commit e6f7a52

Browse files
committed
HV-2145 Require JDK 25 for the build
Signed-off-by: marko-bekhta <[email protected]>
1 parent 5b626ce commit e6f7a52

File tree

7 files changed

+19
-25
lines changed

7 files changed

+19
-25
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,20 +63,20 @@ jobs:
6363
matrix:
6464
os:
6565
- {
66-
name: "Linux JDK 21",
66+
name: "Linux JDK 25",
6767
runs-on: 'ubuntu-latest',
6868
java: {
69-
version: 21
69+
version: 25
7070
},
7171
maven: {
7272
args: ''
7373
}
7474
}
7575
- {
76-
name: "Windows JDK 21",
76+
name: "Windows JDK 25",
7777
runs-on: 'windows-latest',
7878
java: {
79-
version: 21
79+
version: 25
8080
},
8181
maven: {
8282
args: ''

CONTRIBUTING.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Just fork this repository, build your test case and attach it as an archive to a
4949

5050
### <a id="setup-build-tools"></a> Build tools
5151

52-
You will need JDK 21 or above for the build.
52+
You will need JDK 25 or above for the build.
5353

5454
A maven wrapper script is provided at the root of the repository (`./mvnw`),
5555
so you can use that and don't need to care about the required version of Maven
@@ -97,7 +97,7 @@ If you already did that, close IntelliJ IDEA, run `./mvnw clean`, and open Intel
9797
You will need to change some settings:
9898

9999
* `Build, Execution, Deployment > Build Tools > Maven`: set `Maven home path` to `Use Maven wrapper`
100-
* In `Project structure`, make sure the project JDK is JDK 21.
100+
* In `Project structure`, make sure the project JDK is JDK 25.
101101
* Set up [formatting rules and code style](#setup-ide-formatting).
102102

103103
Then a few steps will initialize your workspace:
@@ -349,19 +349,19 @@ than [the one required for the build](#setup-build-tools),
349349
you will need to have both JDKs installed,
350350
and then you will need to pass additional properties to Maven.
351351

352-
To test Hibernate Validator against the JDK 17:
352+
To test Hibernate Validator against the JDK 25:
353353

354354
```bash
355355
./mvnw clean install
356356
```
357357

358-
To test Hibernate Validator against JDKs other than 17:
358+
To test Hibernate Validator against JDKs other than 25:
359359

360360
```bash
361361
./mvnw clean install -Djava-version.test.release=21 -Djava-version.test.compiler.java_home=/path/to/jdk21
362362
```
363363

364-
Or more simply, if the JDK you want to test against is newer than 21 and is your default JDK:
364+
Or more simply, if the JDK you want to test against is newer than 25 and is your default JDK:
365365

366366
```bash
367367
./mvnw clean install -Djava-version.test.release=18

Jenkinsfile

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ import org.hibernate.jenkins.pipeline.helpers.alternative.AlternativeMultiMap
7575
*
7676
*/
7777

78-
@Field final String DEFAULT_JDK_TOOL = 'OpenJDK 21 Latest'
78+
@Field final String DEFAULT_JDK_TOOL = 'OpenJDK 25 Latest'
7979
@Field final String MAVEN_TOOL = 'Apache Maven 3.9'
8080

8181
// Default node pattern, to be used for resource-intensive stages.
@@ -115,31 +115,25 @@ stage('Configure') {
115115
new JdkBuildEnvironment(testJavaVersion: '17', testCompilerTool: 'OpenJDK 17 Latest',
116116
condition: TestCondition.AFTER_MERGE),
117117
new JdkBuildEnvironment(testJavaVersion: '21', testCompilerTool: 'OpenJDK 21 Latest',
118-
condition: TestCondition.BEFORE_MERGE,
119-
isDefault: true),
118+
condition: TestCondition.AFTER_MERGE),
120119

121120
// We want to enable preview features when testing newer builds of OpenJDK:
122121
// even if we don't use these features, just enabling them can cause side effects
123122
// and it's useful to test that.
124-
new JdkBuildEnvironment(testJavaVersion: '23', testCompilerTool: 'OpenJDK 23 Latest',
125-
testLauncherArgs: '--enable-preview',
126-
condition: TestCondition.AFTER_MERGE),
127-
new JdkBuildEnvironment(testJavaVersion: '24', testCompilerTool: 'OpenJDK 24 Latest',
128-
testLauncherArgs: '--enable-preview',
129-
condition: TestCondition.AFTER_MERGE),
130123
new JdkBuildEnvironment(testJavaVersion: '25', testCompilerTool: 'OpenJDK 25 Latest',
131124
testLauncherArgs: '--enable-preview',
132-
condition: TestCondition.AFTER_MERGE),
125+
condition: TestCondition.BEFORE_MERGE,
126+
isDefault: true),
133127
new JdkBuildEnvironment(testJavaVersion: '26', testCompilerTool: 'OpenJDK 26 Latest',
134128
testLauncherArgs: '--enable-preview',
135129
condition: TestCondition.AFTER_MERGE)
136130
],
137131
wildflyTck: [
138-
new WildFlyTckBuildEnvironment(testJavaVersion: '21', testCompilerTool: 'OpenJDK 21 Latest',
132+
new WildFlyTckBuildEnvironment(testJavaVersion: '25', testCompilerTool: 'OpenJDK 25 Latest',
139133
condition: TestCondition.ON_DEMAND)
140134
],
141135
sigtest: [
142-
new SigTestBuildEnvironment(testJavaVersion: '21', jdkTool: 'OpenJDK 21 Latest',
136+
new SigTestBuildEnvironment(testJavaVersion: '25', jdkTool: 'OpenJDK 25 Latest',
143137
condition: TestCondition.BEFORE_MERGE)
144138
]
145139
])

jenkins/nightly/Jenkinsfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
@Library('hibernate-jenkins-pipeline-helpers') _
77

88
def withMavenWorkspace(Closure body) {
9-
withMavenWorkspace('OpenJDK 21 Latest', body)
9+
withMavenWorkspace('OpenJDK 25 Latest', body)
1010
}
1111

1212
def withMavenWorkspace(jdk, Closure body) {

jenkins/release/Jenkinsfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ pipeline {
1313
}
1414
tools {
1515
maven 'Apache Maven 3.9'
16-
jdk 'OpenJDK 21 Latest'
16+
jdk 'OpenJDK 25 Latest'
1717
}
1818
options {
1919
buildDiscarder logRotator(daysToKeepStr: '30', numToKeepStr: '10')

jenkins/snapshot-publish/Jenkinsfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ pipeline {
1818
}
1919
tools {
2020
maven 'Apache Maven 3.9'
21-
jdk 'OpenJDK 21 Latest'
21+
jdk 'OpenJDK 25 Latest'
2222
}
2323
options {
2424
// Wait for 1h before publishing snapshots, in case there's more commits.

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@
405405

406406
<!-- JDK version required for the build -->
407407
<!-- Remember to update README/CONTRIBUTING when changing the version here. -->
408-
<jdk.min.version>21</jdk.min.version>
408+
<jdk.min.version>25</jdk.min.version>
409409
<!-- Maven version required for the build -->
410410
<!--
411411
When changing the version here, remember to:

0 commit comments

Comments
 (0)