ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Reilly <peterrei...@apache.org>
Subject Re: HELP! ant 1.6.2
Date Thu, 10 Mar 2005 16:05:44 GMT
Ray Madigan wrote:

>Yep - meakin.jar had it.  It is an old ant task to perform ForEach!
>  
>
Found a reference to it:

http://sourceforge.net/mailarchive/forum.php?thread_id=1063039&forum_id=2912

<foreach2 param="foo">
   <fileset dir="c:\ant">
     <include name="**/*.*"/>
   </fileset>
   <do>
     <echo message="Found: ${foo}"/>
   </do>
 </foreach2>
 


The methods for doing for has changed from 1.5 to 1.6. You
probally should use the <for> task from ant-contrib.

     <ac:for param="foo" xmlns:ac="antlib:net.sf.antcontrib">
      <fileset dir="${ant.home}">
        <include name="**/*.*"/>
      </fileset>
      <sequential>
        <echo message="Found: @{foo}"/>
      </sequential>
    </ac:for>

- note the use of @{foo}, this is the ant macro attribute based form of 
<for>

Peter


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


Mime
View raw message