ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: Problems with use of 'if'
Date Wed, 26 Jul 2000 15:13:18 GMT
>>>>> "MG" == Marc Gemis <> writes:

 MG> Now depending on whether I put target t2 or target t1 at the top,
 MG> I get different results. (prop is either t1 or t2) A bug or am I
 MG> missing something ?

You are pointing at one of the most confusing spots of Ant,

To make a long story short: <property> shouldn't actually be viewed as
a task but more something like an entity declaration. The <property>
constructs are "executed" by the parser and only the first value
encountered by the parser is considered. The ${} replacement happens
at runtime as well BTW.

Note that you don't even need to put the <property> things into
targets at all.

There has been a heated discussion on ant-dev during the past days so
expect part of the issue around properties to change - although I
cannot tell you which direction might be taken.


View raw message