ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: Property Precedence
Date Wed, 12 Jun 2002 16:27:47 GMT
On Wed, 12 Jun 2002, Edward Grinvald <EDWARD.GRINVALD@ca.com> wrote:

> Hello, could somebody please explain to me what is the precedence of
> properties in a project: 

> + set in build.xml 
> + specified with -D at prompt 

-D wins over <property>.

The first <property> wins over a second one setting a property of the
same name.

> + from the properties file 

Not sure what you mean here.  <property file="..." />?  This has the
same precedence as <property name="..." /> repeated for all properties
in that file.

> + is there a difference between setting a property in the xml, or
> calling .setProperty() from a <script>.

Yes.  <property> will not overwrite existing properties.  setProperty
will.  Use setNewProperty to get the same behavior in scripts anf
<property>.

Stefan

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message