At 02:54 22/12/00 -0500, Jason Rosenberg wrote: >I would like to be able to have something similar to the if/unless >attributes for the <target> tag, which causes the if/unless gating >to happen before any of the dependent targets are evaluated. >There are cases where I do know that I don't want a target, or any >of its dependent targets to be evaluated, if a certain condition >is true. Agreed - this is a problem ant2.0 will address hopefully. Many people have asked for it in one way or another ... What I suggest is something like
<target name="t1" depends="t2"/> <target name="t2" if="execute.t2"/> <target name="t1" if="execute.t1"> <ant-call target="t1"/> </target> It is not efficient or pretty but it does work ;) >Currently, what happens when you have an if and an unless in the >same target? Is it allowed. Are the 2 conditions "anded" or "ored"? don't know what the actual behaviour is but it should be undefined ;) Cheers, Pete *-----------------------------------------------------* | "Faced with the choice between changing one's mind, | | and proving that there is no need to do so - almost | | everyone gets busy on the proof." | | - John Kenneth Galbraith | *-----------------------------------------------------*
