ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "T Master" <tmas...@iknowledgeinc.com>
Subject Re: Conditional ANT building
Date Thu, 09 Aug 2001 15:40:03 GMT
How would someone check for a jvm of 1.3 being used, and those less than?
I want to enforce a fixed jdk version for development.
I use ant1.3 (currently).


----- Original Message ----- 
From: "Stefan Bodewig" <bodewig@apache.org>
To: <ant-user@jakarta.apache.org>
Sent: Thursday, August 09, 2001 9:15 AM
Subject: Re: Conditional ANT building


> 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