Skip to content

Commit 684f42d

Browse files
committed
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
1 parent a206cea commit 684f42d

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

.github/workflows/codeql-analysis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ defaults:
1414
run:
1515
working-directory: ./client
1616
on:
17+
workflow_dispatch:
1718
schedule:
1819
- cron: '19 3 * * 5'
1920

Jenkinsfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ pipeline {
6767
steps {
6868
container('ci') {
6969
sh '''
70-
MAVEN_VERSION=$(curl -sf "https://api.github.com/repos/apache/maven/releases/latest" | grep '"tag_name"' | sed 's/.*"maven-\\([^"]*\\)".*/\\1/')
70+
MAVEN_VERSION=$(curl -sf "https://repo1.maven.org/maven2/org/apache/maven/apache-maven/maven-metadata.xml" | awk -F '[<>]' '/<version>3\\.[0-9]+\\.[0-9]+</{v=$3} END{print v}')
7171
curl -o maven.tar.gz -L "https://dlcdn.apache.org/maven/maven-3/${MAVEN_VERSION}/binaries/apache-maven-${MAVEN_VERSION}-bin.tar.gz"
7272
tar -xzf maven.tar.gz -C ${WORKSPACE}
7373
rm -f maven.tar.gz

0 commit comments

Comments
 (0)