From 295826d697f2ef2af0b6c83afe0a489ec2447dd0 Mon Sep 17 00:00:00 2001 From: Manfred Moser Date: Tue, 12 Apr 2016 11:08:52 -0700 Subject: [PATCH] avoid using MAVEN_CMD_LINE_ARGS for invocation since that can losse parameter escaping --- maven-wrapper/mvnw | 3 ++- maven-wrapper/mvnw.cmd | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/maven-wrapper/mvnw b/maven-wrapper/mvnw index efb5d5d17b..e655940cc4 100755 --- a/maven-wrapper/mvnw +++ b/maven-wrapper/mvnw @@ -228,9 +228,10 @@ export MAVEN_CMD_LINE_ARGS WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain +# avoid using MAVEN_CMD_LINE_ARGS below since that would loose parameter escaping in $@ exec "$JAVACMD" \ $MAVEN_OPTS \ -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \ "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ - ${WRAPPER_LAUNCHER} $MAVEN_CMD_LINE_ARGS + ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@" diff --git a/maven-wrapper/mvnw.cmd b/maven-wrapper/mvnw.cmd index 0d49a2de0a..8e2b7459f7 100644 --- a/maven-wrapper/mvnw.cmd +++ b/maven-wrapper/mvnw.cmd @@ -121,7 +121,8 @@ SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" set WRAPPER_JAR=""%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"" set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain -%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CMD_LINE_ARGS% +# avoid using MAVEN_CMD_LINE_ARGS below since that would loose parameter escaping in %* +%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* if ERRORLEVEL 1 goto error goto end