ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Benson <gudnabr...@yahoo.com>
Subject Re: Conditional processing
Date Tue, 13 Aug 2002 19:48:07 GMT
<project name="test" default="invokeme">

  <target name="check">
    <condition property="yes">
      <isset property="someproperty" />
    </condition>
  </target>

  <target name="x" if="yes">
    <echo message="x" />
  </target>

  <target name="y" unless="yes">
    <echo message="y" />
  </target>

  <target name="invokeme" depends="check,x,y" />
</project>

-Matt



--- "Settle, William" <William.Settle@alltel.com>
wrote:
> I am looking for a way to test if a property is set
> and if so, do one
> thing.  If
> it is not set, then do another.  Something like
> 
> if property set
>   do something
> else
>   do something else
> 
> It looks like using the <condition> tag with the
> <isset> tag might work
> but I
> can't figure out how to make it work.
> 
> I would appreciate any help you can give,
> Bill
> 
> --
> 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