On Thu, 21 Oct 2004, Jeff Davidson <[EMAIL PROTECTED]>
wrote:

> Aside from the difference that <my.macro.ant/> requires the dir=
> attribute to be set, whereas <my.preset.ant/> would simply fail
> (assuming "${basedir}/NOT SET" doesn't exist!), are there other
> vagaries, differences, or gotchas that are good to know?

Your macrodef-ed <ant> doesn't support any of the additional
attributes or nested elements of the <ant> task - the presetdef-ed one
does.  This may be good or bad, dependending on context.

In your example you'll probably prefer to the presetdef-ed version
since it still allows users to set the inheritAll attribute - but if
you wanted to enforce a specific value, macrodef could hide it away
for you.

This really comes down as the major difference between the two
approaches, presetdef only provides default values that can be changed
later, macrodef can enforce those values.

Stefan

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

Reply via email to