aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes Custom ANT Task not working in <for> loop Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Custom ANT Task not working in <for> loop" Watch "Custom ANT Task not working in <for> loop" New topic
Author

Custom ANT Task not working in <for> loop

Andrew Leer
Ranch Hand

Joined: Nov 11, 2003
Posts: 44
I've written a custom ANT task for purposes of returning an associated value from a file (that works almost like a hash map):


The left hand column above contains what the file is currently named. The right hand column above contains what I would like to rename the file to.

It's part of a web-app deployment for a very non-standard ecomm system (read: not Java, and not .NET etc..)

It's my Custom ANT task's job to take an argument of the file name, and return the corresponding file name for ANT to rename it to. In my ANT build.xml file I have

Note that ${csvDownloadList} looks like this:



However for some reason my <for> loop craps out after renaming one file. It seems to have something to do with my Custom ANT Task not being able to work within a <for> loop. Why is this? Is there some other class besides Task I need to extend to make this work?

Stranger still, the build succeeds, it doesn't throw an error or anything.

P.S. I'm using ANT 1.7.1 and ant-contrib-1.0b1.jar
 
Consider Paul's rocket mass heater.
 
subject: Custom ANT Task not working in <for> loop