On Thu, 3 Apr 2003, Erik Hatcher <[EMAIL PROTECTED]>
wrote:

> Any ideas on the differences between using <taskdef> under project
> or under a target?

Several, and they vary with the Ant version in use.

With Ant 1.5.x, the main difference is that taskdefs defined at the
project level will get evaluated immediately, so Ant creates the
"real" task objects and real nested elements at parser time.  If you
put the taskdef into a target, things go the UnknownElement route
first.  This causes several differences.

With CVS HEAD, things have become different, and <taskdef> is supposed
to work consistently now (unchecked 8-) - as all tasks will be
UnknowElement until used now.

With Ant 1.4, nested child elements didn't work properly in one of the
two cases, can't exactly remember which.

Stefan

Reply via email to