• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Custom ANT Task not working in <for> loop

 
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Once upon a time there were three bears. And they were visted by a golden haired tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic