ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Reilly <>
Subject Re: <macrodef> and local
Date Mon, 21 Jun 2004 07:54:30 GMT
There is a patch in

It provides general purpose scoped local properties and it is thread safe.

Part of the discussion on the patch was:

Local properties may be declared in any "block" - a target, sequential or

There was a large discussion about the time of the first ant 1.6.0 beta, 
I proposed using local properties for macro-def properties, but 
luckilly, this
was rejected in favour of the more macro like attributes with the @{} 

When macrodef was first introduced, I was convinced that it was unusable 
local properties. With the help of ant-contrib's propertyregex with 
one can do most of what local properties allow.


Wascally Wabbit wrote:

> You can mostly kindof do this now by extending the PropertyHelper 
> class and
> installing an instance in the ant.PropertyHelper reference. I've done 
> this
> with two tasks <isolate> and <overlay> and both seem to work for most 
> issues
> with scoped property modifications (inside macros or not).
> While you wait for Ant 1.6.3 or 1.7(?), you might look at tweaking this
> class...assuming such a feature gets add to the core source...
> At 05:27 AM 6/17/2004, you wrote:
>> I am now convinced we need local properties; without it macrodef 
>> doesnt work fully.
>> One option: in the <macrodef> declaration, you declare which 
>> properties are local. When the macro exits these properties are 
>> deleted -if they were not set before entering the macro.
>> That is, properties set before the macro remain immutable, only those 
>> set inside get reset.
>> We'd need to do the cleanup on both a normal exit and a buildexception.
>> -steve
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail:
>> For additional commands, e-mail:
> The Wabbit
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message