bodewig 01/10/29 23:07:28
Modified: src/main/org/apache/tools/ant/taskdefs Ant.java
Log:
initialize the new project first so that loggers have been configured
before we fiddle with its properties.
Don't carry over user properties for basedir and ant.file from the
second to the third call in a chain of <ant> invokes <ant> ...
Revision Changes Path
1.31 +9 -3
jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Ant.java
Index: Ant.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Ant.java,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- Ant.java 2001/10/28 21:26:28 1.30
+++ Ant.java 2001/10/30 07:07:28 1.31
@@ -202,6 +202,11 @@
e = prop1.keys();
while (e.hasMoreElements()) {
String arg = (String) e.nextElement();
+ if ("basedir".equals(arg) || "ant.file".equals(arg)) {
+ // basedir and ant.file get special treatment in execute()
+ continue;
+ }
+
String value = (String) prop1.get(arg);
if (inheritAll == true){
newProject.setProperty(arg, value);
@@ -238,8 +243,11 @@
reinit();
}
- if ( (dir == null) && (inheritAll == true) )
+ if ( (dir == null) && (inheritAll == true) ) {
dir = project.getBaseDir();
+ }
+
+ initializeProject();
if (dir != null) {
newProject.setBaseDir(dir);
@@ -247,8 +255,6 @@
} else {
dir = project.getBaseDir();
}
-
- initializeProject();
// Override with local-defined properties
Enumeration e = properties.elements();
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>