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 43503] New: - add the if/unless like attributes to all core tasks
Date Fri, 28 Sep 2007 11:13:09 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=43503>.
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=43503

           Summary: add the if/unless like attributes to all core tasks
           Product: Ant
           Version: 1.7.0
          Platform: All
        OS/Version: other
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Core tasks
        AssignedTo: dev@ant.apache.org
        ReportedBy: francis.andre@easynet.fr


Hi Ants

IMHO, developping a conditional build process with ant would be more 
straightforward if all core and optional tasks of Ant would get the same 
conditional execution attributes "if" and "unless" as those defined for the 
<target> task.

So, could you consider to add those attributes as a general enhancement. As 
example, it is more readeable and maintanable to define

	<condition property="has.filename1">
		<isset property="filename1"/>
	</condition>
	<condition property="has.filename2">
		<isset property="filename2"/>
	</condition>
	<condition property="has.filename3">
		<isset property="filename3"/>
	</condition>
        <copy file="${filename1}" todir="tmp" if="has.filename1"/>
        <copy file="${filename2}" todir="tmp" if="has.filename2"/>
        <copy file="${filename3}" todir="tmp" if="has.filename3"/>




than


	<condition property="has.filename1">
		<isset property="filename1"/>
	</condition>
	<condition property="has.filename2">
		<isset property="filename2"/>
	</condition>
	<condition property="has.filename3">
		<isset property="filename3"/>
	</condition>

	<target name="copy-db-jar" depends="copy-db-jar-1, copy-db-jar-2, copy-
db-jar-3">
	</target>
	<target name="copy-db-jar-1" if="has.filename1">
            <copy file="${filename1}" todir="tmp"/>
	</target>
	<target name="copy-db-jar-2" if="has.filename2">
            <copy file="${filename2}" todir="tmp"/>
	</target>
	<target name="copy-db-jar-3" if="has.filename3">
            <copy file="${filename3}" todir="tmp"/>
	</target>
	<antcall target="copy-db-jar"/>

    
Regards

-- 
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