ant-user mailing list archives

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

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

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

  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 <> 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:  
> <>
> For additional commands, e-mail:
> <>

Douglas WF Acheson

Do You Yahoo!?
Yahoo! Health - your guide to health and wellness

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message