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 returned. I searched the archives and found http://marc.info/?l=ant-user&m=108324404604680&w=2 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 Regards, Dominic Bishop --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]