To fix this Ant error message that confuses users into thinking that the cause of the error is somewhere in the foreach tag, do the following steps:
- Go to the download page of ant-contrib at http://sourceforge.net/projects/ant-contrib/files/
- Download ant-contrib-0.3 and copy ant-contrib-0.3.jar to the lib folder where your Apache Ant is installed.
- In your build.xml file, make sure you declare this XML
That is all!