ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Garrick Olson <Garrick.Ol...@Aceva.com>
Subject [Patch] Logging in dynamic tasks
Date Fri, 14 Sep 2001 18:19:27 GMT

I noticed that when a task is created using taskdef, all messages were being
logged against the target.

Index: UnknownElement.java
===================================================================
RCS file:
/home/cvspublic/jakarta-ant/src/main/org/apache/tools/ant/UnknownElement.jav
a,v
retrieving revision 1.9
diff -u -r1.9 UnknownElement.java
--- UnknownElement.java	2001/08/19 05:52:00	1.9
+++ UnknownElement.java	2001/09/14 18:01:46
@@ -101,7 +101,13 @@
             throw new BuildException("Could not create task of type: "
                                      + elementName, location);
         }
-        realTask.execute();
+        
+        try {
+            project.fireTaskStarted(realTask);
+            realTask.execute();
+        } finally {
+            project.fireTaskFinished(realTask, null);
+        }
     }
 
     public void addChild(UnknownElement child) {



Confidential Information. This email is for intended recipient only.




Mime
View raw message