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 31513] - task dependencies are being executed even if 'if' attribute do not match
Date Sun, 03 Oct 2004 01:21:31 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=31513>.
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=31513

task dependencies are being executed even if 'if' attribute do not match





------- Additional Comments From Svante.U.Schubert@gmx.de  2004-10-03 01:21 -------
Very well spoken Steve. I am pleased and I do not really need a new religion
(resp. fork).

But as Florin as earlier stated, you surly should give an example in the docu
(i.e. http://ant.apache.org/manual/using.html#tasks) about the relation of 'if
and 'depends'. Especially that all depends task will be executed even when a
condition does not met.
It is not apparent, as if I would be a high-performant parser, I would be lazy
and wouldn't bother with the dependent tasks, when the parent is not executed
anyway. 
Concerning the desired switch for a complete different flow of execution, as
Florin earlier had required, I couldn't find in the documentation, either. Only
the neglecting of the execution of the interior of a task of one line of flow
seems possible.


Concerning your example:
<target name="if-run" depends="test" if="valid-precondition" >
<target name="unless-run" depends="test" unless="valid-precondition" >
<target name="inconsistent" depends="check-preconditions,if-run,unless-run" 

In the blashemous religion the 'test' would have been executed in any case.

In my original given example I wanted to run a pre-build test, if I am able to
build anyway, so that there wouldn't appear any tasks like compile, smoke-test,
distribution in the log. 
But it is only a minor blemish, no real harm for this very nice product.

Thanks for your help, Steve

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message