ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Benson <gudnabr...@gmail.com>
Subject Re: a simple question regarding condition if/unless
Date Mon, 21 May 2012 17:26:32 GMT
If I understand your question correctly, yes, you would have to add
unless="test" everywhere you want to make target execution optional.

Matt

On Mon, May 21, 2012 at 11:06 AM, xsli2 <xsli2@yahoo.com> wrote:
> The target "test" calls two other targets:
>
> <target name="test" depends="testA, testB"/>
>
> Now, I want to add some condition: when the property "abc" is
> available(regardless of its value), only run target "testB", skipping
> "testA". I know I can use unless="abc" in target "testA" definition block.
> The fact is that "testA" is similar pattern:
>
> <target name="testA" depends="testA1, testA2, testA3"/>
>
> So, I have to go to the deep. Right now, I am using:
>
> <target name="testA1" unless="abc">
>  ...
> </target>
>
> Same with "testA2" and "testA3". Is there are 10 of them, I have to add
> unless="abc" 10 times? Can I add such condition in the target "test" only
> once?
>
> Thank you very much.
>
>
>
> --
> View this message in context: http://ant.1045680.n5.nabble.com/a-simple-question-regarding-condition-if-unless-tp5713011.html
> Sent from the Ant - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>

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


Mime
View raw message