From f0dd2146d6426b6e7f72b6ded5b92b632d027d66 Mon Sep 17 00:00:00 2001 From: Lorenzo Bettini Date: Sat, 10 Aug 2024 16:07:17 +0200 Subject: [PATCH] Always use Java 21 for the Jenkins build And use the toolchain for Java 17 and 11 --- Jenkinsfile | 7 ++++--- pom.xml | 29 +++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 46d3a62f1d8..4354ff9c074 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -25,9 +25,9 @@ pipeline { } tools { - // the Java version we use to run the build (minimal requirement for Maven/Tycho) - // we force other Java versions through Maven toolchains - jdk "temurin-jdk17-latest" + // the Java version we use to run the build + // we force the effective JDK version for compilation/testing through Maven toolchains + jdk "temurin-jdk21-latest" } stages { @@ -68,6 +68,7 @@ pipeline { sh """ ./full-build.sh --tp=${selectedTargetPlatform()} \ ${javaVersion() == 11 ? '--toolchains releng/toolchains.xml -Pstrict-jdk-11' : ''} \ + ${javaVersion() == 17 ? '--toolchains releng/toolchains.xml -Pstrict-jdk-17' : ''} \ ${javaVersion() == 21 ? '-Pstrict-jdk-21' : ''} """ } diff --git a/pom.xml b/pom.xml index 04f8b31934b..a3d4be6af61 100644 --- a/pom.xml +++ b/pom.xml @@ -445,8 +445,37 @@ + + strict-jdk-17 + + + + org.apache.maven.plugins + maven-toolchains-plugin + + + + toolchain + + + + + + + + 17 + + + + + + + strict-jdk-21 +