From d189eb07a36c0b366a63f7e36f9a202656871e52 Mon Sep 17 00:00:00 2001 From: Conor MacNeill Date: Fri, 12 Sep 2003 14:04:46 +0000 Subject: [PATCH] Mark entry and exit of and PR: 22718 Submitted by: Jesse Glick git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@275227 13f79535-47bb-0310-9956-ffa450edef68 --- src/main/org/apache/tools/ant/taskdefs/Ant.java | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/main/org/apache/tools/ant/taskdefs/Ant.java b/src/main/org/apache/tools/ant/taskdefs/Ant.java index c25f5bfbb..edfd493c3 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Ant.java +++ b/src/main/org/apache/tools/ant/taskdefs/Ant.java @@ -226,8 +226,7 @@ public class Ant extends Task { 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 @@ public class Ant extends Task { 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 @@ public class Ant extends Task { 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 @@ public class Ant extends Task { addReferences(); - if (target != null) { - if (!"".equals(target)) { + if (target != null && !"".equals(target)) { + try { + log("Entering " + antFile + "..."); newProject.executeTarget(target); + } finally { + log("Exiting " + antFile + "."); } } } finally {