[MWRAPPER-152] only-mvnw is not POSIX compatible
- Dominant language
- Java
- Stars
- 254
- Forks
- 78
- Avg merge
- 5h 26m
- Merged PRs (30d)
- 2
Description
**[Ryan Worcester](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=JIRAUSER307372)** opened **[MWRAPPER-152](https://issues.apache.org/jira/browse/MWRAPPER-152?redirect=false)** and commented
The maven wrapper type only-script file mvnw declares a shebang of #!/bin/sh which is the default shell. The default shell can be any shell therefore for this script to work as expected it needs to only use things common to all shells.
v3.3.2 at https://github.com/apache/maven-wrapper/blob/maven-wrapper-3.3.2/maven-wrapper-distribution/src/resources/only-mvnw#L161 uses mktemp which is not POSIX compliant. mktemp doesn't exist in ksh (korn shell) and doesn't exist in some versions of bash. My app's server has bash "GNU bash, version 5.0.0(2){-}release{-}(powerpc-ibm-aix6.1.9.0)" which lacks mktemp.
Therefore only-mvnw should be updated to not use mktemp along with any other shell specific things it contains.
---
**Affects:** 3.3.2
**Issue Links:**
- [MWRAPPER-88](https://issues.apache.org/jira/browse/MWRAPPER-88) mvnw is not POSIX compatible
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.