summaryrefslogtreecommitdiff
path: root/src/script
diff options
context:
space:
mode:
authorJacobus Martinus Kruithof <jkf@apache.org>2006-03-13 20:32:48 +0000
committerJacobus Martinus Kruithof <jkf@apache.org>2006-03-13 20:32:48 +0000
commit41a3cbc6ad50cdd8c5ccace39ff286267ca0341c (patch)
tree15cb509295875e8134a928fc3505897879201c93 /src/script
parent032a5a3bb3564f8574fb2a35866b06a651007a10 (diff)
downloadant-41a3cbc6ad50cdd8c5ccace39ff286267ca0341c.tar.gz
Patch for PR28914 / similar (maybe even identical) to the proposed patch of Benjamin Burgess
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@385653 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/script')
-rwxr-xr-xsrc/script/ant.bat11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/script/ant.bat b/src/script/ant.bat
index 26a8a3cdc..dc908426a 100755
--- a/src/script/ant.bat
+++ b/src/script/ant.bat
@@ -32,6 +32,9 @@ if "%ANT_HOME%"=="" set ANT_HOME=%DEFAULT_ANT_HOME%
set DEFAULT_ANT_HOME=
set _USE_CLASSPATH=yes
+rem CLASSPATH must not be used if it is equal to ""
+if "%CLASSPATH%"=="""" set _USE_CLASSPATH=no
+if "%CLASSPATH%"=="" set _USE_CLASSPATH=no
rem Slurp the command line arguments. This loop allows for an unlimited number
rem of arguments (up to the command line limit, anyway).
@@ -96,13 +99,6 @@ if not "%JIKESPATH%"=="" goto runAntWithJikes
:runAnt
if "%_USE_CLASSPATH%"=="no" goto runAntNoClasspath
-if not "%CLASSPATH%"=="" goto runAntWithClasspath
-"%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%ANT_HOME%" org.apache.tools.ant.launch.Launcher %ANT_ARGS% %ANT_CMD_LINE_ARGS%
-rem Check the error code of the Ant build
-if not "%OS%"=="Windows_NT" goto onError
-set ANT_ERROR=%ERRORLEVEL%
-goto end
-
:runAntNoClasspath
"%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%ANT_HOME%" org.apache.tools.ant.launch.Launcher %ANT_ARGS% %ANT_CMD_LINE_ARGS%
rem Check the error code of the Ant build
@@ -119,7 +115,6 @@ goto end
:runAntWithJikes
if "%_USE_CLASSPATH%"=="no" goto runAntWithJikesNoClasspath
-if not "%CLASSPATH%"=="" goto runAntWithJikesAndClasspath
:runAntWithJikesNoClasspath
"%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%ANT_HOME%" "-Djikes.class.path=%JIKESPATH%" org.apache.tools.ant.launch.Launcher %ANT_ARGS% %ANT_CMD_LINE_ARGS%