You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Alejandro Abdelnur <al...@sun.com> on 2001/09/02 04:35:20 UTC

[PATCH] ant1.4B2 - property task, added override value support

i've modified the the org.apache.tools.ant.taskdefs.Property class to
support value overriding.

if the override attribute is present and set to true or yes, allows to
change the value of an existing project property (user properties are
not affected).

this functionality works with all the flavors of the property task
(value, file, etc.)

	<property name="favorite.color" value="red" />
	<property name="favorite.color" value="green" override="yes" />


attached you'll find the modified Property.java file.

regards.

a

Re: [PATCH] ant1.4B2 - property task, added override value support

Posted by Stefan Bodewig <bo...@apache.org>.
This is something that we'll have to revisit, when we talk about
property scoping in Ant2.  

So far my understanding is that most committers (including myself)
think that the property definition that comes first should win in
general - that is users defining properties on the command line can be
sure that nothing inside the scripts can alter the values they define.

It may be OK to allow overrides (marking a <property> as defining a
default value or something) but not to enforce them.

Stefan