They do, but unfortunately not exactly what Guru needs. They support for-loops over lists or file sets. Really, he needs something like:

<for lower = "1" upper = "100">
...
</for>

I'm trying to figure out a way to do this using ant/ant-contrib but its not readily apparent to me (I though it'd be trivial) to make it happen.

What I really need is some form of while loop. I considered using recursion...but I could see some possible issues with arbitrarily large iterations (not sure why one would do so...but nonetheless).

Anyway, really I don't think he wants to pre-compute some large list with a delimiter and then use <for> over the list... At least I don't want to do that as a solution ;) Yes, I know one could possibly use a <script>. I am trying to not do that anyway (for reasons related to my open source project - long story)...

Scot

[EMAIL PROTECTED] wrote:
ant-contrib.sourceforge.net has some tasks to do this.




-----Original Message-----
From: "Guru Balse" <[EMAIL PROTECTED]>
Sent: Wed, June 7, 2006 2:17 pm
To: "Ant Users List" <user@ant.apache.org>
Subject: Implementing a loop in ANT

I am sure this question has been asked before, and I could not see any
reasonable answer in the archives.  How can I implement a loop in ANT
without using scripts?  For example, if I want to call a certain target
N times, how can I do it?

Using ant-contrib is OK.  Of course, something like <for
list="1,2,3,4,5,6,...,N"> would work but I want N to be a property that
can be specified in the command line.

Thanks in advance for your suggestions.

 - Guru Balse

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



--
Scot P. Floess
27 Lake Royale
Louisburg, NC  27549

252-478-8087 (Home)
919-754-4592 (Work)

Chief Architect JPlate  http://sourceforge.net/projects/jplate
Chief Architect JavaPIM http://sourceforge.net/projects/javapim


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to