slachiewicz opened a new pull request, #23:
URL: https://github.com/apache/maven-jenkins-lib/pull/23
**This fixes a live breakage.** The wrapper provisioning added in `53fd00c`
(#22) passes `-Dmaven=${maven}`, but that value is the *pattern* the
Jenkinsfiles supply — `"4.0.x"`, `"3.9.x"` — which exists to be mapped by
`jenkinsEnv.mvnFromVersion` to a Jenkins **tool installation name**. The
wrapper turns it into a download URL instead. Reproduced locally:
```
$ mvn org.apache.maven.plugins:maven-wrapper-plugin:3.3.4:wrapper
-Dmaven=4.0.x
exit 0
$ cat .mvn/wrapper/maven-wrapper.properties
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/4.0.x/apache-maven-4.0.x-bin.zip
```
That URL is a 404, and so is the `3.9.x` equivalent. Because the wrapper
goal itself exits 0, nothing fails until `./mvnw` tries to download — so every
build going through `asfMavenTlpPlgnBuild` or `asfMavenTlpStdBuild` breaks, on
Maven 3 and 4 alike.
This resolves the pattern through `jenkinsEnv.mvnVersionFromPattern` first
and fails the stage when it cannot, instead of provisioning an URL that will
not resolve.
**Requires apache/maven-jenkins-env#8**, which adds that method — please
merge that one first.
Verified by reproducing the bad `distributionUrl` locally and confirming
both URLs 404. The shared library itself cannot be executed outside Jenkins, so
the wiring has not been run end to end.
--
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]