Looping through a text file in ANT
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   c_schaffer
Posted On:   Friday, May 7, 2004 11:30 AM

I would like to loop through a text file and use the contents of each line as a parameter to another ant task.

Think of the text file as a property file EXCEPT it has duplicate entries in it. Because of the duplicates, I can't use the tag.

I like to do this for many each of the files in a fileset, and I plan on parsing each line using something like the following:


			




Thanks,
Chris

Re: Looping through a text file in ANT

Posted By:   Anonymous  
Posted On:   Monday, May 10, 2004 12:09 AM



delimiter="${line.separator}"
>
New Line

- @{value}



Ensure that the file has the same line separation as the current system. Maybe use a before loading.

Re: Looping through a text file in ANT

Posted By:   Eugene_Kuleshov  
Posted On:   Saturday, May 8, 2004 01:27 PM

You can develop a custom task or use XSLT task to parse your coma-delimited format (not that difficult afterall) and generate temporary Ant file with will call processing task.
About | Sitemap | Contact