Ant-Contrib's <for> accepts any type which exposes an iterator()
method I believe, so you'd have to write a Java task or <scriptdef> to
create such an <integer-range> type.

You could also try a recursive <macro> or <antcall> (with proper
stopping condition ;-) that writes the numbers to a file, and then
<loadfile> it.

Using a little <script> to generate the series in a property would
probably be easier though. --DD

On 6/7/06, Guru Balse <[EMAIL PROTECTED]> wrote:
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]

Reply via email to