peterreilly 2004/09/24 01:13:26
Modified: . WHATSNEW build.sh build.bat
src/main/org/apache/tools/ant Main.java
src/main/org/apache/tools/ant/launch Launcher.java
Log:
Add a new option -nouserlib to the ant command.
This allows running ant without loading the jars from ${user.home}/.ant/lib.
This is useful for building ant.
Revision Changes Path
1.662 +4 -0 ant/WHATSNEW
Index: WHATSNEW
===================================================================
RCS file: /home/cvs/ant/WHATSNEW,v
retrieving revision 1.661
retrieving revision 1.662
diff -u -r1.661 -r1.662
--- WHATSNEW 10 Sep 2004 16:42:45 -0000 1.661
+++ WHATSNEW 24 Sep 2004 08:13:25 -0000 1.662
@@ -53,6 +53,10 @@
* Added searchpath attribute to <exec> for searching path variable(s)
when resolveexecutable = true.
+* Added -nouserlib option to allow running ant without automatically loading
+ up ${user.dir}/.lib/ant. This is useful when compiling ant, and antlibs.
+ Modified the build.sh and build.bat to use the option.
+
Changes from Ant 1.6.2 to current Ant 1.6 CVS version
=====================================================
1.40 +1 -1 ant/build.sh
Index: build.sh
===================================================================
RCS file: /home/cvs/ant/build.sh,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -r1.39 -r1.40
--- build.sh 24 Feb 2004 21:01:19 -0000 1.39
+++ build.sh 24 Sep 2004 08:13:25 -0000 1.40
@@ -41,5 +41,5 @@
ANT_INSTALL="-emacs"
fi
-bootstrap/bin/ant -lib lib/optional "$ANT_INSTALL" $*
+bootstrap/bin/ant -nouserlib -lib lib/optional "$ANT_INSTALL" $*
1.42 +1 -1 ant/build.bat
Index: build.bat
===================================================================
RCS file: /home/cvs/ant/build.bat,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -r1.41 -r1.42
--- build.bat 10 Nov 2003 16:48:56 -0000 1.41
+++ build.bat 24 Sep 2004 08:13:25 -0000 1.42
@@ -17,7 +17,7 @@
goto cleanup
:install_ant
-call bootstrap\bin\ant.bat -lib lib/optional -Dant.install="%REAL_ANT_HOME%"
%1 %2 %3 %4 %5 %6 %7 %8 %9
+call bootstrap\bin\ant.bat -nouserlib -lib lib/optional
-Dant.install="%REAL_ANT_HOME%" %1 %2 %3 %4 %5 %6 %7 %8 %9
rem clean up
:cleanup
1.109 +2 -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.108
retrieving revision 1.109
diff -u -r1.108 -r1.109
--- Main.java 18 Jun 2004 13:42:04 -0000 1.108
+++ Main.java 24 Sep 2004 08:13:25 -0000 1.109
@@ -834,6 +834,8 @@
msg.append(" -s <file> the filesystem and use it" +
lSep);
msg.append(" -nice number A niceness value for the main
thread:" + lSep +
" 1 (lowest) to 10 (highest); 5
is the default" + lSep);
+ msg.append(" -nouserlib Run ant within using the jar
files from ${user.home}/"
+ + ".ant/lib");
System.out.println(msg.toString());
}
1.22 +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.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- Launcher.java 8 Sep 2004 11:25:32 -0000 1.21
+++ Launcher.java 24 Sep 2004 08:13:25 -0000 1.22
@@ -122,6 +122,7 @@
String cpString = null;
List argList = new ArrayList();
String[] newArgs;
+ boolean noUserLib = false;
for (int i = 0; i < args.length; ++i) {
if (args[i].equals("-lib")) {
@@ -140,6 +141,8 @@
+ "not be repeated");
}
cpString = args[++i];
+ } else if (args[i].equals("--nouserlib") ||
args[i].equals("-nouserlib")) {
+ noUserLib = true;
} else {
argList.add(args[i]);
}
@@ -182,8 +185,8 @@
File userLibDir
= new File(System.getProperty("user.home"), USER_LIBDIR);
- URL[] userJars = Locator.getLocationURLs(userLibDir);
+ URL[] userJars = noUserLib ? new URL[0] :
Locator.getLocationURLs(userLibDir);
int numJars = libJars.length + userJars.length + systemJars.length;
if (toolsJar != null) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]