ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Reilly <peter.rei...@corvil.com>
Subject Re: Property overriding ignored in 1.6
Date Thu, 17 Jun 2004 11:13:02 GMT
Hi,

It has always been the case that ant did not allow property overriding.
However some tasks did not fullfill this contract, and this was
corrected in ant 1.6.0 and above.

The ant'ian way of doing this is to do:

<condition property="prop1" value="value2">
   <isset property="optProp"/>
</condition>
<property name="prop1" value="value1"/>

Peter

Aurele Venet wrote:

> Hello,
>
> not sure if I should post my question here or not, but I just upgraded 
> to ant 1.6 so as to use <typedef/> declarations.  However, my build 
> scripts stopped working.  In debug mode I discovered a number of 
> "Override property ignored..." msgs.  This is what I am doing:
>
> <property name="prop1" value="value1"/>
> <condition property="prop1" value="value2">
>    <isset property="optProp"/>
> </condition>
>
> I looked in the code and realised that the class 
> org.apache.tools.ant.PropertyHelper has a new piece of code that 
> disallows property overriding.   I guess asking if it is necessary is 
> a silly question and there must be a logical explanation for this, 
> however, my question is, is it not possible to put this as an option 
> that can be overriden from the command line?
>
> in the mean time I achieve the above using:
>
> <condition property="prop1" value="value2">
>    <isset property="optProp"/>
> </condition>
> <condition property="prop1" value="value1">
>    <not><isset property="optProp"/></not
> </condition>
>
> a bit of an overkill....
>
> kind regards
>
> Vrata
>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message