ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diane Holt <>
Subject Re: Looping in ANT
Date Mon, 12 Nov 2001 15:40:26 GMT
--- Manik Surtani <> wrote:
> Also, it is not possible to use the <script> tags to envelope a set of 
> tasks to loop through, such as:
> <script language="javascript">
> for (i=0; i<10; i++)
> {
> </script> 
> <echo message="This is my task to be repeated" /> 
> <script language="javascript">
> }
> </script>
> Instead, I have to create and execute the task in Javascript, which 
> really takes away from the whole ANT XML build script thing.  
> Is there an alternate way to do this?

If you just need a "do-while" type loop (such as your above for-loop), you
can do it with "regular" tasks if you're running Ant 1.4 -- but if you
need to loop through a set of items in a list, you'll need to go with
either the <script> task or the (forever unofficial) <foreach> task
(available in the archives, or I can send you a compiled version of one of



Do You Yahoo!?
Find a job, post your resume.

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message