You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Jean Bresse <je...@classwave.com> on 2001/05/01 21:51:32 UTC

Parameters and Ant

Hello all:
 
I browsed the archives but didn't find a complete answer of the following:
 
1) Can Ant receive parameters from its caller?
 
For example, suppose I have a list of names and I want to invoke the same
set of tasks for each name.  I would want to ave one Ant process call
another one, I would want to call it n times (where n is the number of
names) and pass in as a parameter the name in question.
 
Any suggestions / thoughts / feedbacks on this?
 
Thank you!
 
Jean
 
 

Re: Parameters and Ant

Posted by Diane Holt <ho...@yahoo.com>.
--- Jean Bresse <je...@classwave.com> wrote:
> 1) Can Ant receive parameters from its caller?

Yes. The <antcall> task allows for nested <param> tags (see the user
manual for details). 

> For example, suppose I have a list of names and I want to invoke the
> same set of tasks for each name. I would want to ave one Ant process
call
> another one, I would want to call it n times (where n is the number of
> names) and pass in as a parameter the name in question.

A <foreach> task was recently submitted to the list (search the ant-dev
archive for "foreach"), but it works with filesets -- so if your "names"
aren't files (or directories), you'll probably need to use the <script>
task.

Diane

=====
(holtdl@yahoo.com)



__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/