ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Benson <gudnabr...@yahoo.com>
Subject Re: ant-selection statements
Date Mon, 19 Aug 2002 20:05:44 GMT
If for some reason you don't want to use ant-contrib,
simple if-then-else cases can be handled by depends
and if/unless attributes on targets:

<target name="check">
  <condition property="check">
    <istrue value="${val}" />
  </condition>
</target>

<target name="ifyes" if="check">
  <echo message="yes" />
</target>

<target name="ifno" unless="check">
  <echo message="no" />
</target>

<target name="callme" depends="checkval,ifyes,ifno" />


-Matt

--- Theresa Huffer <thuffer@eswoosh.com> wrote:
> Does anyone know of an additional resource for ant
> with more examples 
> than the website? I am trying to use the condition
> task as an ordinary 
> selection statement (if then else, type of logic),
> but ant doesn't seem 
> to allow it. For example, IF user input is abc then
> do this ELSE do 
> this... How can I get around this? Any help would be
> 
> appreciated--Theresa:) 
> 
> 
> --
> To unsubscribe, e-mail:  
> <mailto:ant-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:ant-user-help@jakarta.apache.org>
> 


__________________________________________________
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com

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