ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Rich" <billr...@attglobal.net>
Subject RE: how to run a target multiple times from another target
Date Mon, 01 Mar 2004 22:16:41 GMT
Hi Shailesh, it looks like you have too many " in the list spec.  Try this instead
<for list="${cm1Application.source},${cm2Application.source},${cm3Application.source}"
param="archive">

HTH

Bill Rich
Wilandra Consulting LLC
1325 Addiewell Place
San Jose, CA  95120-3905
phone:      +1 408 268-2452
mobile:     +1 408 410-9713
Santa Cruz: +1 831 464-9007
fax:        +1 413 669-9716
billrich@wilandra.com or billrich@attglobal.net
http://www.wilandra.com

-----Original Message-----
From: Shailesh Sharma [mailto:shailesh_scea@yahoo.com]
Sent: Monday, March 01, 2004 1:45 PM
To: Ant Users List
Subject: RE: how to run a target multiple times from another target


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


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


Mime
View raw message