ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shailesh Sharma <>
Subject how to run a target multiple times from another target
Date Thu, 05 Feb 2004 14:57:07 GMT
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 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>

Please suggest.


Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message