ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: Order of property tasks relevant?
Date Thu, 07 Sep 2000 10:58:35 GMT
>>>>> "A" == Amshoff  <> writes:

 A> Hi.  I just started with Ant (Release 1.1, Win NT) and am
 A> wondering about the way properties are resolved.

Yes, they are confusing to put it as friendly as possible.

Basically, don't put <property> inside any targets, move them at the
top of your project and you won't get confused by the following facts:

(1) <property> is executed even if it is nested into a target that is
not part of the dependency tree.

(2) <property> is executed at parser time, not at runtime.

(3) <property>s are executed in the order the parser finds them (the
physical order in the file).

(4) ${} replacement happens at parser time - if you use ${} before you
define the property (again physically) like you do in your example,
the expansion cannot work as the property hasn't been defined yet.

(5) <property> will never overwrite the value of a property set

All these things are true for Ant 1.1 up to current CVS. Some things
(I'm still not sure if all points of this list) are going to change in
the future and before we release the next version.


View raw message