ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shailesh Sharma <shailesh_s...@yahoo.com>
Subject RE: how to run a target multiple times from another target
Date Mon, 01 Mar 2004 21:44:41 GMT
Hi Jan,
I was reading this email from you .....and as per your directions i have made this sample
build.xml file:
 
 
 
 

<target name="deploy-cm-testnet">
        <for list="${cm1Application.source}","${cm2Application.source}","${cm3Application.source}"
param="archive">
                <sequential>
                        <antcall target="deploy-now"> <param name="source" value="@{archive}"/>
                        </antcall>
                </sequential>
        </for>
</target>
 

    <target name="deploy-now">
        <echo message="...........This is the developmenet box...deploying......"/>
        <wldeploy action="${deploy.utility}" upload="true" source="${source}" user="system"
password="weblogic" nostage="true" verbo
se="true" adminurl="${espreso.admin.url}" debug="true" targets="${cmApplication.target}"/>
    </target>

 
 
 
 
 
But when iam running this as like this on my unix box, this is what it complains:
 
 
>ant deploy-cm-testnet
Buildfile: build.xml
BUILD FAILED
file:/export/home/beamon/bin/build.xml:91: Element type "for" must be followed by either attribute
specifications, ">" or "/>".
Total time: 3 seconds
 
 
 
what is the matter ???
 
-shailesh
 
 
 

Jan.Materne@rzf.fin-nrw.de wrote:
I would try AntContrib










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 
> 
> 
> 
> 
> 
> 
> 
> 
> value="foo1.war"/> 
> 
> 
> value="foo2.war"/> 
> 
> 
> value="foo3.war"/> 
> 
> 
> value="foo4.war"/> 
> 
> 
> value="foo5.war"/> 
> 
> 
> 
> Please suggest.
> 
> 
> 
> 
> ---------------------------------
> Do you Yahoo!?
> Yahoo! Finance: Get your refund fast by filing online
> 


---------------------------------
Do you Yahoo!?
Get better spam protection with Yahoo! Mail
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message