ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: ant problem
Date Fri, 18 Feb 2011 15:24:19 GMT
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


Mime
View raw message