ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 19220] - [PATCH] add nested conditions to <fail>
Date Mon, 19 Jan 2004 12:23:07 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19220>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19220

[PATCH] add nested conditions to <fail>





------- Additional Comments From j_a_fernandez@yahoo.com  2004-01-19 12:23 -------
What is wrong with saying:

<if>
    <and>
      <available file="myLib1.jar"/>
      <available file="myLib2.jar"/>
      ...
    </and>
    <else>
      <fail>......</fail>
    </else>
</if>

Moreover now in ANT 1.6 you can define your own macrodef
to do what you want:

<macrodef name="failunless">
<element name="conditions"/>
<sequential>
<if>
    <and>
      <conditions/>
    </and>
    <else>
      <fail>......</fail>
    </else>
</if>
</sequential>
</macrodef>

And you can use it as:
<failunless>
  <conditions>
      <available file="myLib1.jar"/>
      <available file="myLib2.jar"/>
      ...
  </conditions>
</failunless>

Wasn't that what you wanted?

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


Mime
View raw message