ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexey N. Solofnenko" <A.Solofne...@mdl.com>
Subject Re: how to run a target multiple times from another target
Date Thu, 05 Feb 2004 18:09:03 GMT
Please use <macrodef> instead. <antcall> and <ant> work around 
dependency checking.

- Alexey.

Shailesh Sharma wrote:

>Hi, I have a build.xml file that contains a target called "deploy" that
>i need to execute 5 times depending upon the source specified in another
>target called "deploy-cm-testnet". So on my command line i will just
>type >ant deploy-cm-testnet
> 
>and it will execute the "deploy" target 5 times .....all i want to know
>is if it will work OR if it is the correct approach .....???  
> 
>Well what i mean to say is ......i probably want to write a target that
>does the deploy, and then call the target many times. 
>
>ie. something like this 
><target name="deploy"> <wldeploy source="${source}" /> 
></target> 
> 
> 
> 
><target name="deploy-cm-testnet"> 
>
><antcall target="deploy"> <param name="source" value="foo1.war"/>
></antcall> 
>
><antcall target="deploy"> <param name="source" value="foo2.war"/>
></antcall> 
>
><antcall target="deploy"> <param name="source" value="foo3.war"/>
></antcall> 
>
><antcall target="deploy"> <param name="source" value="foo4.war"/>
></antcall> 
>
><antcall target="deploy"> <param name="source" value="foo5.war"/>
></antcall> 
>
></target> 
> 
>Please suggest.
>
> 
> 
>
>
>---------------------------------
>Do you Yahoo!?
>Yahoo! Finance: Get your refund fast by filing online
>
>  
>

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


Mime
View raw message