Skip to content

Commit b2a52ef

Browse files
committed
Use Maven Central metadata for version resolution, add CodeQL dispatch trigger
1 parent 684f42d commit b2a52ef

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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://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}')
70+
MAVEN_VERSION=$(curl -sf "https://dlcdn.apache.org/maven/maven-3/" | grep -o 'href="[0-9][^"]*"' | tr -dc '0-9.')
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)