ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ray Tayek <>
Subject Re: test environment variable and if statement
Date Tue, 05 Feb 2002 06:06:31 GMT
At 06:06 PM 2/4/02 -0800, you wrote:
>--- Ray Tayek <> wrote:
> > what is <condition?

i got this to work:

     <property environment="env"/>
     <property name="tmp" value="${env.TMP}"/> <echo message="$TMP=${tmp}"/>
     <condition property="isDos"> <os family="dos" /> </condition> <echo

     <condition property="isUnix"> <os family="unix" /> </condition> <echo


on dos it mumbles: C:\TMP, true, and isUnix.

but it looks like the if's are only available on tasks

what i would like to do is to set a property called pathToMyJar to be one 
thing or another depending on some boolean.

then i could say: <pathelement location="${pathToJunit}/junit.jar"/> and 
build up classpaths.


ray tayek
actively seeking telecommuting work
orange county java users group
hate spam?

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message