ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Benson <gudnabr...@yahoo.com>
Subject Re: Executing a task for a list of files
Date Fri, 03 Feb 2006 18:37:37 GMT
Use <for> from antcontrib.  Note: you don't truly want
an <antcall>; you want a macro.  Macros are far less
expensive in terms of memory and therefore, execution
time.  Pre Ant 1.6, antcontrib had a <foreach> task
that used antcalls.  Modern <for> uses macrodefs.

HTH,
Matt

--- ar <armaillist@free.fr> wrote:

> 
> Hi all,
> 
> I have a directory with a list of properties files.
> I'd like to execute an  
> ant target for each of these files :
> 
> 
>     file1.properties
>     file2.properties
>     file3.properties
> 
> I want to do an AntCall for *.properties files
> 
>     <antcall target="myTarget">
>        <param name="param1"
> value="file1.properties"/>
>     </antcall>
>     <antcall target="myTarget">
>        <param name="param1"
> value="file2.properties"/>
>     </antcall>
>     <antcall target="myTarget">
>        <param name="param1"
> value="file3.properties"/>
>     </antcall>
> 
> I don't know nor the exact name of the properties
> files neither their  
> number. I want to process all the properties files
> of the current  
> directory.
> Is this possible and how ?
> 
> Regards
> A. ROY
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> user-help@ant.apache.org
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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


Mime
View raw message