You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by shaffic <sa...@gmail.com> on 2011/02/18 13:27:40 UTC
ant problem
Thanks can u tel me how i can use the if condition in my ant.
I am callin one ant2 script from another ant1 script,while calling ant2 i
don want to run all the targets.but when i run the ant2 alone it should run
all the targets.
pls do needfull
Thanks
shaffic
--
View this message in context: http://ant.1045680.n5.nabble.com/ant-problem-tp3391003p3391003.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
Re: ant problem
Posted by Stefan Bodewig <bo...@apache.org>.
On 2011-02-18, shaffic wrote:
> Thanks can u tel me how i can use the if condition in my ant.
> I am callin one ant2 script from another ant1 script,while calling ant2 i
> don want to run all the targets.but when i run the ant2 alone it should run
> all the targets.
You use unless on all targets in "ant2" with a property you only set
when calling from "ant1". Something like
ant1:
<ant ...>
<property name="called-from-ant1" value="t"/>
</ant>
ant2:
<target name="hideme" unless="called-from-ant1">
...
</target>
<target name="don't-hide-me">
...
</target>
Stefan
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org