slachiewicz commented on PR #23: URL: https://github.com/apache/maven-jenkins-lib/pull/23#issuecomment-5178605309
Confirmed in production — maven-resources-plugin master build #171, all three branches: ``` + mvn --errors --batch-mode --show-version org.apache.maven.plugins:maven-wrapper-plugin:3.3.4:wrapper -Dmaven=4.0.x [INFO] Configuring .mvn/wrapper/maven-wrapper.properties to use Maven 4.0.x and download from https://repo.maven.apache.org/maven2 [INFO] BUILD SUCCESS + ./mvnw -V ... clean verify ... wget: Failed to fetch https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/4.0.x/apache-maven-4.0.x-bin.zip Failed in branch linux-jdk17-m4.0.x_build ``` Exactly the failure mode this PR fixes: the wrapper goal reports `BUILD SUCCESS`, having written a `distributionUrl` that cannot resolve, and the build dies at the next step. `linux-jdk21-m4.0.x_build` fails identically. The same log also shows the second half of the problem, in the site branch: ``` OS: linux JDK: 17 Maven: [4.0.x] => Label: ubuntu JDK: jdk_17_latest Maven: maven_3_latest ... + mvn ... wrapper -Dmaven=[4.0.x] [INFO] Configuring .mvn/wrapper/maven-wrapper.properties to use Maven [4.0.x] ... wget: Failed to fetch .../apache-maven-[4.0.x]-bin.zip ``` That is a Jenkinsfile passing `siteMvn` as a List. Note `mvnFromVersion` quietly resolved `[4.0.x]` to `maven_3_latest` instead of failing — the `default:` fallback — which is why this went unnoticed until the wrapper started using the same value. apache/maven-jenkins-env#8 returns `null` for exactly that input so it fails loudly; the per-repo Jenkinsfiles are being fixed separately (apache/maven-resources-plugin#501 and four others). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
