maven-wrapper
maven-wrapper copied to clipboard
[MWRAPPER-57] Make sure that Maven Wrapper created with distribution type set to script won't fail on Unix machines
Adam Gabrys opened MWRAPPER-57 and commented
When the Maven wrapper:wrapper goal is executed with the -Dtype=script parameter the maven-wrapper.jar and MavenWrapperDownloader.java files are not created. The problem is that the mvnw.cmd script guarantees that the Maven distribution will be downloaded. However, the mvnw script fails when the curl and wget binaries are not installed. It may cause potential issues like "works on my PC, but fails on the CI system". The documentation doesn't Inform the users about that fact.
I see a few possibilities to handle it:
- remove the
scriptoption, then the people usebinorsource. Thesourceoption generates the requiredMavenWrapperDownloader.javafile - extend the
scriptdocumentation with a warning that it may fail - generate different scripts depending on the chosen option - when
scriptis not
No further details from MWRAPPER-57
Slawomir Jaranowski commented
Another proposition MWRAPPER-59 - inline MavenWrapperDownloader.java into mvnw script.