From b4b2ad60a653c6ea772cb2f2f299706fa87c7c88 Mon Sep 17 00:00:00 2001 From: Tobias Ortmayr Date: Fri, 1 May 2026 19:34:01 +0000 Subject: [PATCH 1/4] Resolve Maven version dynamically in Jenkinsfile Instead of hardcoding the Maven version (which breaks whenever Apache releases a new version), resolve the latest 3.x release from the GitHub API at build time. --- Jenkinsfile | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 8125f2b..589139d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -60,22 +60,21 @@ pipeline { YARN_CACHE_FOLDER = "${env.WORKSPACE}/yarn-cache" SPAWN_WRAP_SHIM_ROOT = "${env.WORKSPACE}" EMAIL_TO= "glsp-build@eclipse.org" - MAVEN_VERSION = "3.9.14" - } - + stages { stage('Download & Setup Maven') { steps { container('ci') { sh ''' - curl -o maven.tar.gz -L https://downloads.apache.org/maven/maven-3/${MAVEN_VERSION}/binaries/apache-maven-${MAVEN_VERSION}-bin.tar.gz + MAVEN_VERSION=$(curl -sf "https://api.github.com/repos/apache/maven/releases/latest" | grep '"tag_name"' | sed 's/.*"maven-\([^"]*\)".*/\1/') + curl -o maven.tar.gz -L "https://dlcdn.apache.org/maven/maven-3/${MAVEN_VERSION}/binaries/apache-maven-${MAVEN_VERSION}-bin.tar.gz" tar -xzf maven.tar.gz -C ${WORKSPACE} rm -f maven.tar.gz + echo "${WORKSPACE}/apache-maven-${MAVEN_VERSION}" > ${WORKSPACE}/.maven_home ''' - // Set MAVEN_HOME manually script { - env.MAVEN_HOME = "${env.WORKSPACE}/apache-maven-${env.MAVEN_VERSION}" + env.MAVEN_HOME = sh(script: "cat ${env.WORKSPACE}/.maven_home", returnStdout: true).trim() env.PATH = "${env.MAVEN_HOME}/bin:${env.PATH}" } sh "echo 'MAVEN_HOME set to ${env.MAVEN_HOME}'" From a206cea0ebb32125337d31ab0c0b6dd450fa9b98 Mon Sep 17 00:00:00 2001 From: Tobias Ortmayr Date: Fri, 1 May 2026 19:40:45 +0000 Subject: [PATCH 2/4] Fix Groovy escaping for sed backslashes in Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 589139d..c4b39e5 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -67,7 +67,7 @@ pipeline { steps { container('ci') { sh ''' - MAVEN_VERSION=$(curl -sf "https://api.github.com/repos/apache/maven/releases/latest" | grep '"tag_name"' | sed 's/.*"maven-\([^"]*\)".*/\1/') + MAVEN_VERSION=$(curl -sf "https://api.github.com/repos/apache/maven/releases/latest" | grep '"tag_name"' | sed 's/.*"maven-\\([^"]*\\)".*/\\1/') curl -o maven.tar.gz -L "https://dlcdn.apache.org/maven/maven-3/${MAVEN_VERSION}/binaries/apache-maven-${MAVEN_VERSION}-bin.tar.gz" tar -xzf maven.tar.gz -C ${WORKSPACE} rm -f maven.tar.gz From 684f42d5829b6bf81770950dbb7c6bd5a78c9bd0 Mon Sep 17 00:00:00 2001 From: Tobias Ortmayr Date: Fri, 1 May 2026 19:56:02 +0000 Subject: [PATCH 3/4] Use Maven Central metadata for version resolution, add CodeQL dispatch trigger - Switch from GitHub API to Maven Central maven-metadata.xml to resolve the latest Maven 3.x version (avoids rate limiting on unauthenticated requests) - Filter for stable 3.x releases only (no alpha/beta/rc, no Maven 4.x) - Add workflow_dispatch trigger to CodeQL workflow for manual runs --- .github/workflows/codeql-analysis.yml | 1 + Jenkinsfile | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index a3111bd..3086ad0 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -14,6 +14,7 @@ defaults: run: working-directory: ./client on: + workflow_dispatch: schedule: - cron: '19 3 * * 5' diff --git a/Jenkinsfile b/Jenkinsfile index c4b39e5..a1dedca 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -67,7 +67,7 @@ pipeline { steps { container('ci') { sh ''' - MAVEN_VERSION=$(curl -sf "https://api.github.com/repos/apache/maven/releases/latest" | grep '"tag_name"' | sed 's/.*"maven-\\([^"]*\\)".*/\\1/') + MAVEN_VERSION=$(curl -sf "https://repo1.maven.org/maven2/org/apache/maven/apache-maven/maven-metadata.xml" | awk -F '[<>]' '/3\\.[0-9]+\\.[0-9]+ Date: Fri, 1 May 2026 20:03:25 +0000 Subject: [PATCH 4/4] Use Maven Central metadata for version resolution, add CodeQL dispatch trigger --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index a1dedca..22409f0 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -67,7 +67,7 @@ pipeline { steps { container('ci') { sh ''' - MAVEN_VERSION=$(curl -sf "https://repo1.maven.org/maven2/org/apache/maven/apache-maven/maven-metadata.xml" | awk -F '[<>]' '/3\\.[0-9]+\\.[0-9]+