ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: Property Precedence
Date Wed, 12 Jun 2002 16:27:47 GMT
On Wed, 12 Jun 2002, Edward Grinvald <> 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


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

View raw message