ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Loughran" <>
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" />
<property name="path1" value="${unixpath"} />

[but with correct param names and things]

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

View raw message