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 33956] - Ant target using both 'depends' and 'if'
Date Fri, 11 Mar 2005 10:59:46 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=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





------- Additional Comments From aps_jobs_aps@yahoo.com  2005-03-11 11:59 -------
(In reply to comment #1)
> 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"


Thanks for your response. Yes, I understand this is one scenario. Here's is my 
scenario. I am trying to reduce the number of antcalls in a huge project by 
using depends to evaluate performance.

<target name="1" if="condition1" depends="2,3,4"/>
<target name="2" if="condition1" />
<target name="3" if="condition1" />

<target name="4" if="condition1 + condition2" />

Now, target 4 needs condition 1 as well as condition 2. To achieve this, I 
would have to make target 4 depend on some other target that merges condition 1 
and condition 2 and then execute it?? Is that the only option?

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