ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Fintan Hynes" <Fintan.Hy...@traventec.com>
Subject RE: Looping in Ant
Date Tue, 06 Dec 2005 16:44:09 GMT

You don't need to use an <if> task in this case.  It is known how many times the loop
should run.
You could use a property to store the list of DDB Suffixes

And base the <for> loop on this property using {mdb.suffix} to store the list:

<foreach list="${mdb.suffix}" target="run_xdoclet" param="suffix" delimiter=" "/>


-----Original Message-----
From: Clifton Craig [mailto:ccraig@gbg.com]
Sent: 06 December 2005 16:28
To: Ant Users List
Subject: Re: Looping in Ant


I wouldn't suggest antcontrib. Instead I'd look at setting up the properties 
specific to each generation run and then use a task like subant or something 
with a fileset to execute the build against each individual property setup. 
For example, using antcontrib <for/> task would implied the use of the 
ant-contrib <if/> task to condition each iteration if I understand correctly. 
Ant is just not meant to be coded this way. It makes much more sense to use 
something like <subant/> to iterate a bunch of subbuilds which could all 
inherit from the parent build and override or add the specifics for each 
developer queue.

-- 
Clifton C. Craig, Software Engineer
ccraig@gbg.com

On Monday 05 December 2005 10:07 am, Fintan Hynes wrote:
> You can use the ant-contrib <for> task...
>
> http://ant-contrib.sourceforge.net/tasks/tasks/index.html
>
> Fintan
>
> -----Original Message-----
> From: Mark Eramo [mailto:MEramo@lightbridge.com]
> Sent: Monday, December 05, 2005 2:59 PM
> To: Ant Users List
> Subject: Looping in Ant
>
>
> Hello,
>    Does anyone have experience running loops with Ant or if it is even
> possible?
>
> What I need to do is run an xdoclet task 10 times to produce 10 different
> MDB's to support some Queue work the developers are doing. Each MDB will
> have a different suffix Q_0 - Q_9.
>
> I know I could simply run the xdoclet task 10 times but I am looking for
> the most efficient way to do this and incorporate it into the existing
> build process.
>
> Just looking for some ideas.
>
>
> Regards,
>
> Mark
>
>
> This e-mail and any files transmitted with it are confidential and may be
> privileged and are intended solely for the individual named/ for the use of
> the individual or entity to whom they are addressed.If you are not the
> intended addressee, you should not disseminate, distribute or copy this
> e-mail.Please notify the sender immediately if you have received this
> e-mail by mistake and delete this e-mail from your system.If you are not
> the intended recipient, you are notified that reviewing, disclosing,
> copying, distributing or taking any action in reliance on the contents of
> this e-mail is strictly prohibited.Please note that any views or opinions
> expressed in this e-mail are solely those of the author and do not
> necessarily represent those of Traventec Limited. This e-mail has been
> swept for computer viruses however Traventec Limited accepts no liability
> for any damage caused by any virus transmitted by this e-mail.


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



This e-mail and any files transmitted with it are confidential and may be privileged and are
intended solely for the individual named/ for the use of the individual or entity to whom
they are addressed.If you are not the intended addressee, you should not disseminate, distribute
or copy this e-mail.Please notify the sender immediately if you have received this e-mail
by mistake and delete this e-mail from your system.If you are not the intended recipient,
you are notified that reviewing, disclosing, copying, distributing or taking any action in
reliance on the contents of this e-mail is strictly prohibited.Please note that any views
or opinions expressed in this e-mail are solely those of the author and do not necessarily
represent those of Traventec Limited. This e-mail has been swept for computer viruses however
Traventec Limited accepts no liability for any damage caused by any virus transmitted by this
e-mail.
Mime
View raw message