mirror of https://github.com/apache/maven.git
[MNG-7199] MAVENHOME_CONFIG var in mvnlauncher script improperly handles two options at once
This closes #518
This commit is contained in:
parent
ef62d7a4bd
commit
750cb6cb15
|
@ -1,3 +1,5 @@
|
|||
CLASSWORLDS_CONF="${MAVEN_HOME}/bin/m2.conf"
|
||||
|
||||
# For Cygwin, ensure paths are in Unix format before anything is touched
|
||||
if $cygwin ; then
|
||||
[ -n "$MAVEN_HOME" ] &&
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
:init
|
||||
|
||||
set "CLASSWORLDS_CONF=%MAVEN_HOME%\bin\m2.conf"
|
||||
|
||||
@REM Find the project basedir, i.e., the directory that contains the directory ".mvn".
|
||||
@REM Fallback to current working directory if not found.
|
||||
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
LAUNCHER_JAR=`echo "${MAVEN_HOME}"/boot/plexus-classworlds-*.jar`
|
||||
MAVEN_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
|
||||
MAVENHOME_CONFIG=`echo "-Dclassworlds.conf=${MAVEN_HOME}/bin/m2.conf" "-Dmaven.home=${MAVEN_HOME}"`
|
||||
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
for %%i in ("%MAVEN_HOME%"\boot\plexus-classworlds-*) do set LAUNCHER_JAR="%%i"
|
||||
set MAVEN_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
|
||||
set MAVENHOME_CONFIG="-Dclassworlds.conf=%MAVEN_HOME%\bin\m2.conf" "-Dmaven.home=%MAVEN_HOME%"
|
||||
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
LAUNCHER_JAR="$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar"
|
||||
MAVEN_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
|
||||
MAVENHOME_CONFIG=
|
||||
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
set LAUNCHER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
|
||||
set MAVEN_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
|
||||
set MAVENHOME_CONFIG=
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@ exec "$JAVACMD" \
|
|||
$MAVEN_OPTS \
|
||||
$MAVEN_DEBUG_OPTS \
|
||||
-classpath "${LAUNCHER_JAR}" \
|
||||
$MAVENHOME_CONFIG \
|
||||
"-Dclassworlds.conf=$CLASSWORLDS_CONF" \
|
||||
"-Dmaven.home=$MAVEN_HOME" \
|
||||
"-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
|
||||
$MAVEN_LAUNCHER "$@"
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
%MAVEN_OPTS% ^
|
||||
%MAVEN_DEBUG_OPTS% ^
|
||||
-classpath %LAUNCHER_JAR% ^
|
||||
%MAVENHOME_CONFIG% ^
|
||||
"-Dclassworlds.conf=%CLASSWORLDS_CONF%" ^
|
||||
"-Dmaven.home=%MAVEN_HOME%" ^
|
||||
"-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" ^
|
||||
%MAVEN_LAUNCHER% %*
|
||||
if ERRORLEVEL 1 goto error
|
||||
|
|
Loading…
Reference in New Issue