[MWRAPPER-57] Make sure that Maven Wrapper created with distribution type set to script won't fail on Unix machines
- Dominant language
- Java
- Stars
- 254
- Forks
- 78
- Avg merge
- 5h 26m
- Merged PRs (30d)
- 2
Description
**[Adam Gabrys](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=JIRAUSER285856)** opened **[MWRAPPER-57](https://issues.apache.org/jira/browse/MWRAPPER-57?redirect=false)** 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:
1. remove the `script` option, then the people use `bin` or `source`. The `source` option generates the required `MavenWrapperDownloader.java` file
2. extend the `script` documentation with a warning that it may fail
3. generate different scripts depending on the chosen option - when `script` is not
---
No further details from [MWRAPPER-57](https://issues.apache.org/jira/browse/MWRAPPER-57?redirect=false)
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the wrapper:wrapper goal and compare the generated mvnw.cmd and mvnw scripts, especially the script type behavior described in the issue. Review how maven-wrapper.jar and MavenWrapperDownloader.java are conditionally generated, then determine and document which listed option should ensure Unix machines work without curl or wget.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, shell
- Domain
- build-system, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100