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
This commit is contained in:
John Dennis Casey 2007-06-01 21:21:43 +00:00
parent 1a0b546e7f
commit dce22c78fb
1 changed files with 15 additions and 4 deletions

View File

@ -98,7 +98,7 @@ goto error
if NOT "%OS%"=="Windows_NT" goto Win9xArg if NOT "%OS%"=="Windows_NT" goto Win9xArg
@REM -- 4NT shell @REM -- 4NT shell
if "%eval[2+2]" == "4" goto 4NTArgs if "%@eval[2+2]" == "4" goto 4NTArgs
@REM -- Regular WinNT shell @REM -- Regular WinNT shell
set MAVEN_CMD_LINE_ARGS=%* set MAVEN_CMD_LINE_ARGS=%*
@ -123,14 +123,25 @@ goto Win9xApp
:endInit :endInit
SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" 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 @REM Start MAVEN2
for %%i in ("%M2_HOME%"\lib\maven-embedder-*) do set CLASSWORLDS_JAR="%%i" :runm2
%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% %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 if ERRORLEVEL 1 goto error
goto end goto end
:error :error
if "%OS%"=="Windows_NT" @endlocal
set ERROR_CODE=1 set ERROR_CODE=1
:end :end