conor 2003/09/12 07:04:46
Modified: src/main/org/apache/tools/ant/taskdefs Ant.java
Log:
Mark entry and exit of <ant> and <antcall>
PR: 22718
Submitted by: Jesse Glick
Revision Changes Path
1.90 +9 -7 ant/src/main/org/apache/tools/ant/taskdefs/Ant.java
Index: Ant.java
===================================================================
RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/Ant.java,v
retrieving revision 1.89
retrieving revision 1.90
diff -u -w -u -r1.89 -r1.90
--- Ant.java 10 Sep 2003 13:57:19 -0000 1.89
+++ Ant.java 12 Sep 2003 14:04:46 -0000 1.90
@@ -226,8 +226,7 @@
addAlmostAll(getProject().getProperties());
}
- Enumeration e;
- e = propertySets.elements();
+ Enumeration e = propertySets.elements();
while (e.hasMoreElements()) {
PropertySet ps = (PropertySet) e.nextElement();
addAlmostAll(ps.getProperties());
@@ -339,7 +338,8 @@
if (dir != null) {
newProject.setBaseDir(dir);
- if (savedDir != null) { // has been set explicitly
+ if (savedDir != null) {
+ // has been set explicitly
newProject.setInheritedProperty("basedir" ,
dir.getAbsolutePath());
}
@@ -357,8 +357,7 @@
antFile = file.getAbsolutePath();
log("calling target " + (target != null ? target : "[default]")
- + " in build file " + antFile.toString(),
- Project.MSG_VERBOSE);
+ + " in build file " + antFile, Project.MSG_VERBOSE);
newProject.setUserProperty("ant.file" , antFile);
// Are we trying to call the target in which we are defined (or
@@ -410,9 +409,12 @@
addReferences();
- if (target != null) {
- if (!"".equals(target)) {
+ if (target != null && !"".equals(target)) {
+ try {
+ log("Entering " + antFile + "...");
newProject.executeTarget(target);
+ } finally {
+ log("Exiting " + antFile + ".");
}
}
} finally {
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]