Skip to content

Commit

Permalink
HSEARCH-**** TODO: JDK 21 as a baseline
Browse files Browse the repository at this point in the history
since Lucene has bumped it to 21: apache/lucene#12753
  • Loading branch information
marko-bekhta committed Mar 4, 2024
1 parent df452a4 commit a275372
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 11 deletions.
10 changes: 3 additions & 7 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ import org.hibernate.jenkins.pipeline.helpers.alternative.AlternativeMultiMap
* settingsId: ...
*/

@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.
Expand Down Expand Up @@ -169,17 +169,13 @@ stage('Configure') {
jdk: [
// 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(version: '11', testCompilerTool: 'OpenJDK 11 Latest',
condition: TestCondition.AFTER_MERGE),
new JdkBuildEnvironment(version: '17', testCompilerTool: 'OpenJDK 17 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(version: '21', testCompilerTool: 'OpenJDK 21 Latest',
testLauncherArgs: '--enable-preview',
condition: TestCondition.AFTER_MERGE),
condition: TestCondition.BEFORE_MERGE,
isDefault: true),
new JdkBuildEnvironment(version: '22', testCompilerTool: 'OpenJDK 22 Latest',
testLauncherArgs: '--enable-preview',
condition: TestCondition.AFTER_MERGE),
Expand Down
2 changes: 1 addition & 1 deletion ci/dependency-update/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def pullContainerImages() {
}

def withMavenWorkspace(Closure body) {
withMaven(jdk: 'OpenJDK 17 Latest', maven: 'Apache Maven 3.9',
withMaven(jdk: 'OpenJDK 21 Latest', maven: 'Apache Maven 3.9',
mavenLocalRepo: env.WORKSPACE_TMP + '/.m2repository',
options: [artifactsPublisher(disabled: true)]) {
body()
Expand Down
2 changes: 1 addition & 1 deletion ci/release/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ pipeline {
}
tools {
maven 'Apache Maven 3.9'
jdk 'OpenJDK 17 Latest'
jdk 'OpenJDK 21 Latest'
}
options {
buildDiscarder logRotator(daysToKeepStr: '30', numToKeepStr: '10')
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -203,10 +203,10 @@
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

<!-- JDK version required for the build; we target 11 but require at least 17 for the build -->
<jdk.min.version>17</jdk.min.version>
<jdk.min.version>21</jdk.min.version>
<!-- The lowest supported version of Java for applications using Hibernate Search -->
<!-- Set statically, independently from the current JDK: we want our code to comply with this version -->
<java-version.main.release>11</java-version.main.release>
<java-version.main.release>21</java-version.main.release>
<java-version.main.compiler.java_home>${java.home}</java-version.main.compiler.java_home>
<java-version.main.compiler>${java-version.main.compiler.java_home}/bin/javac</java-version.main.compiler>
<!-- The version of test bytecode, useful for testing compatibility with newer JDKs -->
Expand Down

0 comments on commit a275372

Please sign in to comment.