ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Loughran" <stev...@iseran.com>
Subject Re: test environment variable and if statement
Date Tue, 05 Feb 2002 06:56:18 GMT

> 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.

look at <condition> more closely; you can set the value of the assignment to
whatever you want.

Also the way <property> works, the first assignment wins, so something like
the following will act as an if/then/else assignment

<condition property="path1" value="${dospath} > <osfamily="windows" />
</condition>
<property name="path1" value="${unixpath"} />

[but with correct param names and things]


--
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