mohan72 (1) [Avatar] Offline
#1
Hi,

Here is what I want to do.
I have a file with values ( no keys, just a simple text not a properties file). Each value is seperated by a newLine.

For each value in the file, I would like to run a task, with the vaule as argument.

any Ideas? Can a simple ant do the job or do I have to write a custom task?

thanks for the help

MG
ErikHatcher (211) [Avatar] Offline
#2
Re: ant iterating a task
A custom task is the best way to do this sort of thing, but there are many options. You could use the script task, and now the scriptdef task, and perhaps the for[each?] task from the ant-contrib library (at sourceforge).

Your best bet is to ask this question on the Ant user e-mail list rather than this forum. This forum is dedicated to our book, Java Development with Ant, and not for general Ant questions. No problem asking here, but you'll get a much better set of ideas from the very active user list. Cheers! Erik