ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan.Mate...@rzf.fin-nrw.de
Subject RE: how to run a target multiple times from another target
Date Thu, 05 Feb 2004 15:42:09 GMT
I would try AntContrib

<for list="foo1.war,foo2.war,foo3.war,foo4.war" param="archive">
    <sequential>
        <antcall target="deploy"> <param name="source" value="@{archive}"/>
</antcall>
    </sequential>
</for>


Jan



> -----Original Message-----
> From: Shailesh Sharma [mailto:shailesh_scea@yahoo.com]
> Sent: Thursday, February 05, 2004 3:57 PM
> To: Ant Users List
> Subject: how to run a target multiple times from another target
> 
> 
> 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
> 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message