From dce22c78fb4459c5ba69b0c890aeb182db47c737 Mon Sep 17 00:00:00 2001 From: John Dennis Casey Date: Fri, 1 Jun 2007 21:21:43 +0000 Subject: [PATCH] OPEN - issue MNG-2503: mvn.bat file is not correct for 4NT 5.0 and does "endlocal" twice if error http://jira.codehaus.org/browse/MNG-2503 Applying the patch, even though it's not a patch...I was able to generate one using the supplied file and the current mvn.bat file from the trunk. git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@543621 13f79535-47bb-0310-9956-ffa450edef68 --- maven-embedder/src/bin/mvn.bat | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/maven-embedder/src/bin/mvn.bat b/maven-embedder/src/bin/mvn.bat index e66aa1442d..b259853481 100644 --- a/maven-embedder/src/bin/mvn.bat +++ b/maven-embedder/src/bin/mvn.bat @@ -98,7 +98,7 @@ goto error if NOT "%OS%"=="Windows_NT" goto Win9xArg @REM -- 4NT shell -if "%eval[2+2]" == "4" goto 4NTArgs +if "%@eval[2+2]" == "4" goto 4NTArgs @REM -- Regular WinNT shell set MAVEN_CMD_LINE_ARGS=%* @@ -123,14 +123,25 @@ goto Win9xApp :endInit SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" +@REM -- 4NT shell +if "%@eval[2+2]" == "4" goto 4NTCWJars + +@REM -- Regular WinNT shell +for %%i in ("%M2_HOME%"\core\boot\classworlds-*) do set CLASSWORLDS_JAR="%%i" +goto runm2 + +@REM The 4NT Shell from jp software +:4NTCWJars +for %%i in ("%M2_HOME%\core\boot\classworlds-*") do set CLASSWORLDS_JAR="%%i" +goto runm2 + @REM Start MAVEN2 -for %%i in ("%M2_HOME%"\lib\maven-embedder-*) do set CLASSWORLDS_JAR="%%i" -%MAVEN_JAVA_EXE% %MAVEN_OPTS% -classpath %CLASSWORLDS_JAR% "-Dclassworlds.conf=%M2_HOME%\bin\m2.conf" "-Dmaven.home=%M2_HOME%" org.codehaus.plexus.classworlds.launcher.Launcher %MAVEN_CMD_LINE_ARGS% +:runm2 +%MAVEN_JAVA_EXE% %MAVEN_OPTS% -classpath %CLASSWORLDS_JAR% "-Dclassworlds.conf=%M2_HOME%\bin\m2.conf" "-Dmaven.home=%M2_HOME%" org.codehaus.classworlds.Launcher %MAVEN_CMD_LINE_ARGS% if ERRORLEVEL 1 goto error goto end :error -if "%OS%"=="Windows_NT" @endlocal set ERROR_CODE=1 :end