There is a patch in
http://issues.apache.org/bugzilla/show_bug.cgi?id=23942

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

Part of the discussion on the patch was:
http://marc.theaimsgroup.com/?l=ant-dev&m=106916954118249&w=2

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

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


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


Peter

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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


The Wabbit


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





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



Reply via email to