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

           Summary: Boolean expressions in if and unless attributes
           Product: Ant
           Version: 1.7.0
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Wrapper scripts
        AssignedTo: dev@ant.apache.org
        ReportedBy: [EMAIL PROTECTED]


I'd like to have the possiblity to use expressions in the if attribute - and
possibly the unless attribute as well, like so:

    <target name="jars" depends="compile_B,compile_A" if="plugins_changed and
(A_changed or B_changed)">
        ... do stuff ...
    </target>


Without, I have to do this:

    <target name="jars" depends="jars_A_changed,jars_B_changed">
        <!-- Fake target to get conditional dependencies working -->
    </target>

    <target name="jars_A_changed" if="A_changed">
        <antcall target="make_jars"/>
        <property name="jars_made" value="blah"/>
    </target>

    <target name="jars_B_changed" if="B_changed">
        <antcall target="make_jars"/>
        <property name="jars_made" value="blah"/>
    </target>

    <target name="make_jars" if="plugins_changed" unless="jars_made">
        make jars
    </target>

That's ugly and error-prone. It's something I don't want my successor to 
encounter.

-- 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to