peterreilly 2004/10/05 01:37:01 Modified: . WHATSNEW build.bat build.sh src/script ant.bat src/main/org/apache/tools/ant Main.java src/main/org/apache/tools/ant/launch Launcher.java Log: -noclasspath option Added -noclasspath option to allow running ant WITHOUT using CLASSPATH env variable. Modified ant.bat to do this so that %CLASSPATH% is not looked at. Modified build.sh and build.bat to use the option. Revision Changes Path 1.670 +4 -0 ant/WHATSNEW Index: WHATSNEW =================================================================== RCS file: /home/cvs/ant/WHATSNEW,v retrieving revision 1.669 retrieving revision 1.670 diff -u -r1.669 -r1.670 --- WHATSNEW 30 Sep 2004 17:32:56 -0000 1.669 +++ WHATSNEW 5 Oct 2004 08:36:59 -0000 1.670 @@ -60,6 +60,10 @@ up ${user.dir}/.lib/ant. This is useful when compiling ant, and antlibs. Modified the build.sh and build.bat to use the option. +* Added -noclasspath option to allow running ant WITHOUT using CLASSPATH env + variable. Modified ant.bat to do this so that %CLASSPATH% is not looked at. + Modified build.sh and build.bat to use the option. + Changes from Ant 1.6.2 to current Ant 1.6 CVS version ===================================================== 1.43 +1 -1 ant/build.bat Index: build.bat =================================================================== RCS file: /home/cvs/ant/build.bat,v retrieving revision 1.42 retrieving revision 1.43 diff -u -r1.42 -r1.43 --- build.bat 24 Sep 2004 08:13:25 -0000 1.42 +++ build.bat 5 Oct 2004 08:36:59 -0000 1.43 @@ -17,7 +17,7 @@ goto cleanup :install_ant -call bootstrap\bin\ant.bat -nouserlib -lib lib/optional -Dant.install="%REAL_ANT_HOME%" %1 %2 %3 %4 %5 %6 %7 %8 %9 +call bootstrap\bin\ant.bat -nouserlib -noclasspath -lib lib/optional -Dant.install="%REAL_ANT_HOME%" %1 %2 %3 %4 %5 %6 %7 %8 %9 rem clean up :cleanup 1.41 +1 -1 ant/build.sh Index: build.sh =================================================================== RCS file: /home/cvs/ant/build.sh,v retrieving revision 1.40 retrieving revision 1.41 diff -u -r1.40 -r1.41 --- build.sh 24 Sep 2004 08:13:25 -0000 1.40 +++ build.sh 5 Oct 2004 08:37:00 -0000 1.41 @@ -41,5 +41,5 @@ ANT_INSTALL="-emacs" fi -bootstrap/bin/ant -nouserlib -lib lib/optional "$ANT_INSTALL" $* +bootstrap/bin/ant -nouserlib -noclasspath -lib lib/optional "$ANT_INSTALL" $* 1.39 +14 -0 ant/src/script/ant.bat Index: ant.bat =================================================================== RCS file: /home/cvs/ant/src/script/ant.bat,v retrieving revision 1.38 retrieving revision 1.39 diff -u -r1.38 -r1.39 --- ant.bat 6 Sep 2004 09:14:41 -0000 1.38 +++ ant.bat 5 Oct 2004 08:37:00 -0000 1.39 @@ -25,6 +25,8 @@ 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 @@ -32,9 +34,17 @@ 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. @@ -79,6 +89,7 @@ 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 @@ -88,7 +99,10 @@ 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 1.112 +1 -0 ant/src/main/org/apache/tools/ant/Main.java Index: Main.java =================================================================== RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/Main.java,v retrieving revision 1.111 retrieving revision 1.112 diff -u -r1.111 -r1.112 --- Main.java 5 Oct 2004 08:09:31 -0000 1.111 +++ Main.java 5 Oct 2004 08:37:00 -0000 1.112 @@ -840,6 +840,7 @@ + lSep); msg.append(" -nouserlib Run ant without using the jar files from ${user.home}/" + ".ant/lib"); + msg.append(" -noclasspath Run ant without using CLASSPATH"); System.out.println(msg.toString()); } 1.24 +4 -1 ant/src/main/org/apache/tools/ant/launch/Launcher.java Index: Launcher.java =================================================================== RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/launch/Launcher.java,v retrieving revision 1.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- Launcher.java 1 Oct 2004 18:46:15 -0000 1.23 +++ Launcher.java 5 Oct 2004 08:37:01 -0000 1.24 @@ -123,6 +123,7 @@ List argList = new ArrayList(); String[] newArgs; boolean noUserLib = false; + boolean noClassPath = false; for (int i = 0; i < args.length; ++i) { if (args[i].equals("-lib")) { @@ -143,6 +144,8 @@ cpString = args[++i]; } else if (args[i].equals("--nouserlib") || args[i].equals("-nouserlib")) { noUserLib = true; + } else if (args[i].equals("--noclasspath") || args[i].equals("-noclasspath")) { + noClassPath = true; } else { argList.add(args[i]); } @@ -156,7 +159,7 @@ List libPathURLs = new ArrayList(); - if (cpString != null) { + if (cpString != null && !noClassPath) { addPath(cpString, false, libPathURLs); }
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]