From 4900f56974d72a04b117c2364703603654706cbc Mon Sep 17 00:00:00 2001 From: Lorenzo Bettini Date: Sat, 10 Aug 2024 11:47:19 +0200 Subject: [PATCH] Always use Java 17 for the build and rely on the toolchain to force compilation and tests with other Java versions. I left comments to document what I think it's the semantics of those Jenkinsfile parts --- Jenkinsfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index a0fd182daed..46d3a62f1d8 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -25,9 +25,9 @@ pipeline { } tools { - jdk "temurin-jdk11-latest" + // 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" - jdk "temurin-jdk21-latest" } stages { @@ -58,6 +58,7 @@ pipeline { stage('Maven/Tycho Build & Test') { environment { MAVEN_OPTS = "-Xmx1500m" + // set all Java versions needed by our toolchains.xml JAVA_HOME_11_X64 = tool(type:'jdk', name:'temurin-jdk11-latest') JAVA_HOME_17_X64 = tool(type:'jdk', name:'temurin-jdk17-latest') JAVA_HOME_21_X64 = tool(type:'jdk', name:'temurin-jdk21-latest')