Iterate through a set of files
1 posts in topic
Flat View  Flat View

Posted By:   Alex_Keim
Posted On:   Monday, May 29, 2006 12:15 PM


I'm quite new to Ant and want to walk through a and invoke my app (using ) with each found file separately. I understand that it is possible to use , but it's part of Ant-Contrib which I am not allowed to use. Somewhere I found a hint regarding the use of , but I seem to be to dump to understand the mechanism.

Any help is truly appreciated.


Re: Iterate through a set of files

Posted By:   Robert_Lybarger  
Posted On:   Monday, May 29, 2006 01:24 PM

Rather curious why you can't use ant-contrib if you are allowed to use ant in the first place. Really, 'foreach' is the right way to do that. If you honestly can't use that for some (ideological?) reason, you might have to write your own custom task to accomplish the same means. (Custom Ant tasks are nothing more than Java code which extend a given Class and have a couple certain methods available. If you are already using ant and java, this shouldn't be a big deal.) The Ant manual has a couple examples for writing your own task. The write-up isn't terribly great, but should get you there.
About | Sitemap | Contact