/[Apache-SVN]/cocoon/branches/BRANCH_2_1_X/tools/bin/ant.bat
ViewVC logotype

Diff of /cocoon/branches/BRANCH_2_1_X/tools/bin/ant.bat

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

--- cocoon/branches/BRANCH_2_1_X/tools/bin/ant.bat	2005/04/30 07:18:54	165388
+++ cocoon/branches/BRANCH_2_1_X/tools/bin/ant.bat	2005/04/30 07:27:51	165389
@@ -1,6 +1,6 @@
 @echo off
 
-REM  Copyright 2001,2004 The Apache Software Foundation
+REM  Copyright 2001,2004-2005 The Apache Software Foundation
 REM
 REM  Licensed under the Apache License, Version 2.0 (the "License");
 REM  you may not use this file except in compliance with the License.
@@ -17,6 +17,7 @@ REM  limitations under the License.
 if exist "%HOME%\antrc_pre.bat" call "%HOME%\antrc_pre.bat"
 
 if "%OS%"=="Windows_NT" @setlocal
+if "%OS%"=="WINNT" @setlocal
 
 rem %~dp0 is expanded pathname of the current script under NT
 set DEFAULT_ANT_HOME=%~dp0..
@@ -24,6 +25,8 @@ set DEFAULT_ANT_HOME=%~dp0..
 if "%ANT_HOME%"=="" set ANT_HOME=%DEFAULT_ANT_HOME%
 set DEFAULT_ANT_HOME=
 
+set _USE_CLASSPATH=yes
+
 rem Slurp the command line arguments. This loop allows for an unlimited number
 rem of arguments (up to the command line limit, anyway).
 set ANT_CMD_LINE_ARGS=%1
@@ -31,9 +34,17 @@ if ""%1""=="""" goto doneStart
 shift
 :setupArgs
 if ""%1""=="""" goto doneStart
+if ""%1""==""-noclasspath"" goto clearclasspath
 set ANT_CMD_LINE_ARGS=%ANT_CMD_LINE_ARGS% %1
 shift
 goto setupArgs
+
+rem here is there is a -noclasspath in the options
+:clearclasspath
+set _USE_CLASSPATH=no
+shift
+goto setupArgs
+
 rem This label provides a place for the argument list loop to break out
 rem and for NT handling to skip to.
 
@@ -78,21 +89,29 @@ if "%_JAVACMD%" == "" set _JAVACMD=java.
 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%
 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%
+goto end
+
 :runAntWithClasspath
-"%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%ANT_HOME%" org.apache.tools.ant.launch.Launcher %ANT_ARGS% -lib "%CLASSPATH%" %ANT_CMD_LINE_ARGS%
+"%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%ANT_HOME%" org.apache.tools.ant.launch.Launcher %ANT_ARGS% -cp "%CLASSPATH%" %ANT_CMD_LINE_ARGS%
 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%
 goto end
 
 :runAntWithJikesAndClasspath
-"%_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%  -lib "%CLASSPATH%" %ANT_CMD_LINE_ARGS%
+"%_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%  -cp "%CLASSPATH%" %ANT_CMD_LINE_ARGS%
 goto end
 
 :end
@@ -100,6 +119,7 @@ set _JAVACMD=
 set ANT_CMD_LINE_ARGS=
 
 if "%OS%"=="Windows_NT" @endlocal
+if "%OS%"=="WINNT" @endlocal
 
 :mainEnd
 if exist "%HOME%\antrc_post.bat" call "%HOME%\antrc_post.bat"

 

infrastructure at apache.org
ViewVC Help
Powered by ViewVC 1.1.26