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 42143] New: - Boolean expressions in if and unless attributes
Date Tue, 17 Apr 2007 09:51:40 GMT
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: svroemisse@servoy.com


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: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message