ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jose Alberto Fernandez" <>
Subject RE: local properties
Date Thu, 13 Jan 2005 11:19:08 GMT
> From: Kev Jackson [] 
> <define name="foo" scope="local"/>
> <define name="bar" scope="global"/>
> adding a scope parameter wouldn't be much use now, but for 
> later on we 
> could roll properties and local properties together with this 
> strategy.  
> Maybe people want to stick with properties because it's very 
> well known 
> and expressive, but then with local properties there's a 
> semantic difference
> global properties = <property/>
> local properties = <define/>

As Peter and me have said before, <define/> just produces a guaranteed
unique string value that can be used as a property name or something
It does not know anything about where you would use the string.
The string value is accessed like an attribute of <macrodef/> so you
refer to it just like an attribute.

You can control the sape of the string value using 'prefix' so that
you can control whether generated properties or references should be
passed through ant-calls or not.

What you proposed may be applicable to <local-property/> which is
a completely different mechanism being proposed. If we were to define
scopes, then I would suggest considering also scope="antlib" which
would make the property only visible to things defined in the same
library as where the property was defined. That would allow defining
proper modules with private properties only visible to the members of
the module.

Jose Alberto

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

View raw message