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 2005/03/11 08:02:59 UTC

DO NOT REPLY [Bug 33956] - Ant target using both 'depends' and 'if'

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=33956>.
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=33956


jan@materne.de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID
            Summary|Ant target using both       |Ant target using both
                   |'depends' and 'if'          |'depends' and 'if'




------- Additional Comments From jan@materne.de  2005-03-11 08:02 -------
The order is:
1. execute dependend targets
2. check if and unless clause
3. execute the target regarding to step 2

This is because you can do some checks in an earlier target which then sets the 
flag. E.g.

<target name="adminDoes.check">
    <input addproperty="answer" message="Do you have admin privileges?"/>
    <condition property="isAdmin">
        <equals arg1="${answer}" arg2="yes"/>
    </condition>
</target>

<target name="adminDoes" depends="adminDoes.check" if="isAdmin">
    <echo>Hello Admin</echo>
</target>


See also manual "Using Ant > Targets"

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