Hi all,

A bit of frustration...

I've just begun upgrading my antlibs to Ant 1.7 and I'm just blown over by the number of changed assumptions that are now part of base classes like Task and UnknownElement. It's just surprising coming from a 0.5 revision change. It's becoming harder and harder to upgrade with Ant for large antlib collections (IMO) because of the lack of a clear lifecyle structure for data types and tasks (and task containers and probably AntLibDefinitions too).

Some examples:

+ With Ant 1.7 the inability to execute the same task twice (even if _you've written it do handle this_)...UE was altered and now this line breaks (from lines 291:296). UE is one of the great mysteries of Ant for a extension developer:

   // Finished executing the task, null it to allow
   // GC do its job
   // If this UE is used again, a new "realthing" will be made
   realThing = null;
   getWrapper().setProxy(null); //OUCH!OUCH!OUCH!

If Task.maybeConfigure is called subsequently it promptly throws a NPE because it uses the proxy w/o checking for null.

+ With Ant 1.7 a complete reversal of the ordering of attribute configuration relative to child configuration...it's not the switching that's the fundamental problem (implementation details and all that) but Ant lacks any sort of public lifecycle event that a Task or TaskContainer implementation can consistently count on from release to release. It's always an adventure...even between minor minor revisions. It's even possible for a Task's "init()" method to be called multiple times...

Perhaps there could be a clear "I'm configured" trigger or event or callback or method or something before the task's execute method is called.

+ Perhaps DataTypes can also have the ability to know when they've been completely configured (from Ant's perspective)? I guess this is more of the same lack-of lifecycle transparency as is the case for Tasks. I often use "quiet" tasks to get these features, but this is a heavy-handed solution.

Ok...now I go back to upgrading...


The Wabbit

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to