Conor,
What about a 'localproperty' that's only valid inside its block (target)
and cannot be overwritten by commandline?
Or what about a 'mutableproperty' that is valid anywhere, can be
overwritten anywhere except by the commandline?
I like 'localproperty' - idea. It doesn't pollude the namespace and
doesn't have side effects (what the current 'property' does) and
supports overwriting (what the current 'property' does not).
Ingo.
----------------------------------------------
Ingo,
It is a feature which has caused much debate on this list and I think we
are
moving to address it somehow. It comes about from the need to override
properties set in a build file from the command line. If the properties
are
set in the build file and can be changed, it is difficult to override
them
at the command line, or from another ant project. Thus either properties
are
immutable, allowing the command line to have precedence or properties
have a
precedence associated with them so that only properties cannot be set
with a
lower precedence value.
Conor
> >
> > Hi,
> >
> > I can set a property only once = it always has the first assigned
> value:
> >
> > <target name="a">
> > <property name="tmp" value="tmp/a"/>
> > <target/>
> > <target name="b">
> > <property name="tmp" value="tmp/b"/>
> >
> > The Value of ${tmp} is still tmp/a
> >
> > <target/>
> >
> > Is this a feature or a bug?
> >
> > Ingo
> >
>