ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: Conditional ANT building
Date Thu, 09 Aug 2001 15:15:33 GMT
On Thu, 9 Aug 2001, Peter FLYNN <Peter.FLYNN@syntegra.com> wrote:

> I can obtain the ANT version using the property ant.java.version,

ant.version, not ant.java.version.

> but is there some way to say:
> 
> if ${ant.java.version} == "1.3" 
>    echo "Using ANT 1.3"
> else if ${ant.java.version} == "1.4"
>    do something else....

To do different things for 1.4 and earlier versions? Yes, but only
because ant.version will not be defined in Ant 1.3, so you can use
target's if/unless attributes and this property.

For versions after that, <condition> and the <equals> condition should
help.

Stefan

Mime
View raw message