I am trying to perform a task that is supposed to iterate over a set of files. For that I am using the foreach
task from ant-contrib-0.3.jar. The problem is that I am trying to pass (as param) to the target not the file path, but the file directory path.
Here is the project:
<project basedir="../../../" name="do-report" default="copy-all-unzipped">
<xmlproperty keeproot="false" file="implementation/xml/ant/text-odt-properties.xml"/>
<!-- -->
<taskdef resource="net/sf/antcontrib/antcontrib.properties">
<classpath>
<pathelement location="${path.infrastructure}/apache-ant-1.9.6/lib/ant-contrib-0.3.jar"/>
</classpath>
</taskdef>
<!-- -->
<target name="copy-all-unzipped">
<foreach target="copy-unzipped">
<param name="file-path">
<fileset dir="${path.unzipped}">
<include name="**/content.xml"/>
</fileset>
</param>
</foreach>
</target>
<!-- -->
<target name="copy-unzipped">
<echo>${file-path}</echo>
</target>
</project>
Running the script I am getting the following message:
BUILD FAILED
C:\Users\rmrd001\git\xslt-framework\implementation\xml\ant\text-odt-build.xml:13: param doesn't support the nested "fileset" element.
I can read in several places on the internet (such as axis.apache.org) that param
can have a nested fileset
element.