You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by er...@accenture.com on 2004/01/20 18:53:42 UTC

how implement an iteration of tasks

 

Hi all,

I need to execute an ANT task  N times where N is the length of elements
that I have to load up from a file.

Each element is a parameter for the task ANT.

Is there a way to implement that using the core ant tasks? 

Or I need to implement a new custom task class which load the list file,
and for each item read execute the target task ANT?

 

Thanks

E

 



This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information.  If you have received it in error, please notify the sender immediately and delete the original.  Any other use of the email by you is prohibited.

Re: how implement an iteration of tasks

Posted by Peter Reilly <pe...@corvil.com>.
ant-contrib has two interator tasks, <for> and <foreach>. <Foreach> 
calls a target
for each iteration and <for> iterates over an in-line list of tasks.  
<for> only
works in ant 1.6.

Peter
Bill Rich wrote:

>Hi Ernesto,  I just discovered <foreach... this past weekend.  It should do what you need.
>You can get it from SourceForge.  It is part of the ant-contrib package.
>
>Bill Rich, Wilandra Consulting LLC
>
>-----Original Message-----
>From: ernesto.di.blasio@accenture.com
>[mailto:ernesto.di.blasio@accenture.com]
>Sent: Tuesday, January 20, 2004 9:54 AM
>To: user@ant.apache.org
>Subject: how implement an iteration of tasks
>
>
>
>
>Hi all,
>
>I need to execute an ANT task  N times where N is the length of elements
>that I have to load up from a file.
>
>Each element is a parameter for the task ANT.
>
>Is there a way to implement that using the core ant tasks?
>
>Or I need to implement a new custom task class which load the list file,
>and for each item read execute the target task ANT?
>
>
>
>Thanks
>
>E
>
>
>
>
>
>This message is for the designated recipient only and may contain privileged, proprietary,
>or otherwise private information.  If you have received it in error, please notify the
>sender immediately and delete the original.  Any other use of the email by you is
>prohibited.
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>For additional commands, e-mail: user-help@ant.apache.org
>
>
>
>  
>


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


RE: how implement an iteration of tasks

Posted by Bill Rich <bi...@attglobal.net>.
Hi Ernesto,  I just discovered <foreach... this past weekend.  It should do what you need.
You can get it from SourceForge.  It is part of the ant-contrib package.

Bill Rich, Wilandra Consulting LLC

-----Original Message-----
From: ernesto.di.blasio@accenture.com
[mailto:ernesto.di.blasio@accenture.com]
Sent: Tuesday, January 20, 2004 9:54 AM
To: user@ant.apache.org
Subject: how implement an iteration of tasks




Hi all,

I need to execute an ANT task  N times where N is the length of elements
that I have to load up from a file.

Each element is a parameter for the task ANT.

Is there a way to implement that using the core ant tasks?

Or I need to implement a new custom task class which load the list file,
and for each item read execute the target task ANT?



Thanks

E





This message is for the designated recipient only and may contain privileged, proprietary,
or otherwise private information.  If you have received it in error, please notify the
sender immediately and delete the original.  Any other use of the email by you is
prohibited.


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


Re: how implement an iteration of tasks

Posted by Matt Benson <gu...@yahoo.com>.
--- ernesto.di.blasio@accenture.com wrote:
> Each element is a parameter for the task ANT.
> 

you mean you want to run the Ant tool against lots of
buildfiles?  In addition to the other suggestions made
you should look at Ant 1.6's <subant> task as well.

-Matt

__________________________________
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus

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