[MNG-7199] MAVENHOME_CONFIG var in mvnlauncher script improperly handles two options at once

This closes #518
This commit is contained in:
Michael Osipov 2021-07-29 13:13:31 +02:00
parent ef62d7a4bd
commit 750cb6cb15
8 changed files with 8 additions and 6 deletions

View File

@ -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" ] &&

View File

@ -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.

View File

@ -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}"`

View File

@ -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%"

View File

@ -1,4 +1,3 @@
LAUNCHER_JAR="$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar"
MAVEN_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
MAVENHOME_CONFIG=

View File

@ -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=

View File

@ -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 "$@"

View File

@ -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