You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by bu...@apache.org on 2007/04/17 12:20:01 UTC

DO NOT REPLY [Bug 42143] - Boolean expressions in if and unless attributes

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42143>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42143





------- Additional Comments From stevel@apache.org  2007-04-17 03:20 -------
There's lots of reasons why this is really hard, and its been asked for before,
but I wont close it as wontfix, as it a sign of pent up need. 

Can I point out that there is a much cleaner way to do this; use the condition
task to set a property containing all your tests, and depend on the result:

    
    <target name="check-rebuild-needed">
      <condition property="make-the-jars" >
       <or>
        <isset property="A_changed" />
        <isset property="B_changed" />
      </condition>
    </target>
    
    <target name="make_jars" depends="check-rebuild-needed" if="make-the-jars">
     ...
    </target>

This keeps the dependency graph in order, lets you declare complex conditions,
and is fairly easy to debug.

-steve


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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