ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ray Tayek <rta...@mediaone.net>
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 <rtayek@mediaone.net> wrote:
> > what is <condition?
>
>See:
>   http://jakarta.apache.org/ant/manual/CoreTasks/condition.html

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

message="isDos=${isDos}"/>
     <condition property="isUnix"> <os family="unix" /> </condition> <echo

message="isUnix=${isUnix}"/>

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.

thanks

---
ray tayek http://home.earthlink.net/~rtayek/
actively seeking telecommuting work
orange county java users group http://www.ocjug.org/
hate spam? http://samspade.org/ssw/


--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message