ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: IF statement
Date Mon, 04 Mar 2002 12:47:49 GMT
you don't need an if statement at all.

On Mon, 4 Mar 2002, Pavel Muhataev <PavelM@moscow.vestedev.com> wrote:

> Here is example.  

> <property environment="env"/> 
> <property name="was.home.default" 
>                 value="d:/Java/IBM/WebSphere/AppServer/lib"/>
> <property name="was.home.system" value="${env.WAS_HOME}"/>

> And now, how can I define property "was.home" to use
> "was.home.system" in case it is defined, or "was.home.default" in
> case of "was.home.system" is not defined???

<property environment="env"/>
<property name="env.WAS_HOME" value="d:/Java/IBM/WebSphere/AppServer/lib" />
<property name="was.home" value="${env.WAS_HOME}"/>

The second line will set the property env.WAS_HOME to your default
value, only if there is no environment variable named WAS_HOME.

Stefan

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