Repository navigation
Support keeping private maven registry for maven wrapper in only-script mode #32172
Replies: 2 comments 1 reply
|
Hi there, Get your discussion fixed faster by creating a minimal reproduction. This means a repository dedicated to reproducing this issue with the minimal dependencies and config possible. Before we start working on your issue we need to know exactly what's causing the current behavior. A minimal reproduction helps us with this. Discussions without reproductions are less likely to be converted to Issues. Please follow these steps:
If you need help with running renovate on your minimal reproduction repository, please refer to our Running Renovate guide. The Renovate team |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
When renovate suggests updates to the Maven wrapper, it does not retain hostnames of an internal Maven registry in the
distributionUrlparameter.The
distributionUrlparameter is important if the wrapper is used inonly-scriptmode, which is the new default.The following wrapper modes1 are available:
only-script(new default since mvnw 3.32)scriptbin(the old default i think)sourceExample of a
wrapper.propertiesfile withonly-scriptmode:Currently renovate scans the
wrapper.propertiesfile for the Pattern/^(.*?)\/org\/apache\/maven\/wrapper\/3 to extract the existing registry's fqdn. But this pattern does only match, if the wrapper is used in thebinmode. (wrapperUrlproperty). Renovate then forcefully setsMVNW_REPOURLtorepo.maven.apache.orgwhich cannot be overridden by the renovate user.I would be nice, if renovate would support retaining the registry hostname for the
only-scriptmode, like it does for thebinmode4.Reproduction
You can see that Renovate is changing the
distributionUrl. In the example, the public registry URLhttps://repo1.maven.org/maven2(vs.https://repo.maven.apache.org/maven2) was used for the test, as the update commandmvn wrapper:wrapperwould otherwise not run successfully with a real private URL. But I think you get the idea, because thedistributionUrlshould have remained stable in this case as well.Footnotes
Documentation about the wrapper modes: https://maven.apache.org/wrapper/#usage-with-or-without-binary-jar ↩
Maven Wrapper 3.3 Release Notes: https://github.com/apache/maven-wrapper/releases/tag/maven-wrapper-3.3.0 ↩
Relevant line of code: https://github.com/renovatebot/renovate/blob/87152d36e1f011fad38eb6fd73ed7f664f3ca0bd/lib/modules/manager/maven-wrapper/artifacts.ts#L188 ↩
Related Issue that lead to introduction of the feature to keep the internal registry hostname in
binmode: https://github.com/renovatebot/renovate/issues/20064 ↩All reactions