ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Douglas WF Acheson <d...@yahoo.com>
Subject Re: "if" task
Date Tue, 30 Apr 2002 18:10:08 GMT
Hello,

  I created my own "if" task that works something like this:

<if expression = "${property}" equals = "someVale">
  <task name  = "some oater antTask"/>
</if>

  It works by comparing the value in expression to the value of equals.
 If the comparison it does an ANT call to the task described in the
sub-element task.  It only took me 30 mins to write the code.

  In addition, you can replace equals with notEquals, greaterThan etc. 
If you want the code please let me know and I will tell you where to
download it from.

Douglas WF Acheson


--- Martin Jericho <martin.j@jabcreative.com> wrote:
> I have seen a reference to a task called "if" in the dev mailing
> list.  It
> mentioned something called ant-contrib, which I found as a project on
> sourceforge, but it didn't seem to contain an if task.
> Does anyone know where I can get this extension?
> Why on earth isn't such basic functionality included in the standard
> ant
> tasks?  The whole process of creating a new target with an "if"
> attribute
> for every conditional execution is very ugly.
> 
> 
> 
> --
> To unsubscribe, e-mail:  
> <mailto:ant-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:ant-user-help@jakarta.apache.org>
> 


=====
Douglas WF Acheson

__________________________________________________
Do You Yahoo!?
Yahoo! Health - your guide to health and wellness
http://health.yahoo.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