ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jack J. Woehr" <...@purematrix.com>
Subject Re: <macrodef> and local
Date Mon, 21 Jun 2004 15:40:17 GMT
Stefan Bodewig wrote:

> On Mon, 21 Jun 2004, Jose Alberto Fernandez
> <jalberto@cellectivity.com> wrote:
> >> From: Stefan Bodewig [mailto:bodewig@apache.org]
> >
> >> The main limitation I see without local properties in <macrodef> is
> >> when your macro uses a property setting task like <basename> or
> >> <available> - you currently need to provide a unique property name
> >> to those tasks if you want to reuse the macro.
> >
> > Is this really the only reason, currently, for local properties?
>
> Not the only, but a very important one.
>
> > Because if that is the case, maybe we can solve the problem in a
> > completely different way, which is specific to <macrodef/>.
>
> What you describe is pretty much what I (and probably anybody else)
> use as a workaround.  I create what would be a local property by using
> a name contains the name of at least one of the task's attributes.

It seems to me that if someone really needs this sort of thing, then the use of
Ant-Contrib's Variable is pretty much sufficient, esp. if property parsing becomes
recursive (e.g., per the patch I submitted already) so that you can access properties
via a second-level indirection. Would one then still need locals? If absolutely
necessary, a GenUniquePropertyName task could be coded.

--
Jack J. Woehr      # We have gone from the horse and buggy
Senior Consultant  # to the moon rocket in one lifetime, but
Purematrix, Inc.   # there has not been a corresponding moral
www.purematrix.com # growth in mankind. - Dwight D. Eisenhower




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message