Hello, I've written a custom ANT task for purposes of returning an associated value from a file (that works almost like a hash map):
"I11_home.htm", "1683" "I11_office_catalog.htm", "1546" "I11_mixed_catalog.htm", "1673" "I11_approve.htm", "527" "I11_reports.htm", "1547" "I11_history.htm", "1548" "I11_settings.htm", "1549" "I11_pricing.htm", "1550" "I11_edit_imprint.htm", "1551" "I11_review_imprint.htm", "1552" "I11_checkout.htm", "1671" "I11_payment.htm", "1567" "I11_confirm.htm", "1556"
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.

Now 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
<echo>DL List: ${csvDownloadList}</echo> <for list="${csvDownloadList}" param="letter"> <sequential> <!-- Figureout what the file needs to be renamed to --> <XebraCodeRelate fileText="${file.configs.txt}" forFile="@{letter}" property="renameTo" /> <echo> ------------------------------------- </echo> <echo> Renaming file @{letter} to ${renameTo}</echo> <echo> ------------------------------------- </echo> <move file="@{letter}" tofile="${renameTo}" /> <var name="renameTo" unset="true"/> </sequential> </for>
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?
Thank you,
   Andrew J. Leer - My Blog

View this message in context: Custom ANT Task not working in loop
Sent from the Ant Contrib mailing list archive at Nabble.com.