[ https://issues.apache.org/jira/browse/MWRAPPER-90?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17656280#comment-17656280 ]
Michael Osipov commented on MWRAPPER-90: ---------------------------------------- POSIX shell provides only one array -- that is {{$@}}. > Use arrays to preserve potential whitespace in arguments > -------------------------------------------------------- > > Key: MWRAPPER-90 > URL: https://issues.apache.org/jira/browse/MWRAPPER-90 > Project: Maven Wrapper > Issue Type: Improvement > Components: Maven Wrapper Scripts > Reporter: Benjamin Marwell > Priority: Major > > The bash scripts call mvn using: > {code:java} > # shellcheck disable=SC2086 # safe args > exec "$JAVACMD" \ > $MAVEN_OPTS \ > $MAVEN_DEBUG_OPTS \ > -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \ > "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ > ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"{code} > However, this might mangle parameters containing spaces into multiple > parameters. It would be only safe when using arrays and use quotes, e.g. > {{{}"${MAVEN_OPTS[@]}"{}}}. Same for the others. This would also allow us to > disable the shellcheck check. -- This message was sent by Atlassian Jira (v8.20.10#820010)