ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael McCallum" <mich...@spinsoftware.com>
Subject Re: Conditional statements
Date Fri, 09 Mar 2001 00:46:16 GMT
This is a question for the user list not the devel list.

set a property with the available task and then have two targets one using if on the property
and 
one unless.

eg
<project>
<available property="foo" file="c:\xml.jar">

<target name="foo" depends="iffoo,unlessfoo"/>

<target name="iffoo" if="foo"/>

<target name="unlessfoo" unless="foo"/>
</project>

Michael
On 8 Mar 2001, at 16:54, Gotaparthy, Pradeep wrote:

> How I can test  the existence of object at the build time?
>   Ex: if directory c:\xml.jar is exists
>           then
>             task1
>           else 
>            task2
> 
> 
>                    
>      
> 
> 
> 


--- BEGIN GEEK CODE BLOCK ---
Version 3.12
GCS d+(-) s:- a-- C++(+++)$ UL++++(H)(S)$ P+++$ L+++$>++++
E--- W++ N++ o++ K? !w() O? !M V? PS+ PE+++ Y+ t+ 5++ X++ 
R(+) !tv b++(++++) D++ G>++ e++> h--()(*) r+ y+()
--- END GEEK CODE BLOCK ---

---------------------------------------------------------------------
To unsubscribe, e-mail: ant-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: ant-dev-help@jakarta.apache.org


Mime
View raw message