ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dominic Bishop" <>
Subject Custom SubBuildListener
Date Sat, 09 Feb 2008 20:35:38 GMT
I am writing my own SubBuildListener for a project and one of the things I
need to do is extract the Task instance from the BuildEvent.

I am using BuildEvent.getTask() within the taskFinished() method but all I
get back is an instance of UnknownElement. I've tried using
getTask()/getRealThing() on this instance but in both cases I get null

I searched the archives and found referencing a similar
issue with the taskStarted() call and looking at the source for
Task.perform() the reasoning given makes perfect sense. However I cannot
easily see from looking at the source why I get the same from within
taskFinished(), unless the action of executing the task somehow
un-configures it again?

I've just tried the workaround given in that e-mail and it does allow me to
get a proper task instance back but I'm wary of the mention of bad things
happening when doing this.

Anyone able to explain why I can't get the task instance from taskFinished()
or any alternative workarounds I could employ?

I should note I'm using Ant 1.7.0


Dominic Bishop

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message