Peter Donald wrote:
Applied thanks!


I think it may be better to call realTask.perform(). The firing of messages should be the responsibility of the task itself. Also the code in perform() is more complete than the code below in terms of error handling.


Conor


On Sat, 15 Sep 2001 04:19, Garrick Olson wrote:

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.ja
v 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);
+        }








Reply via email to