I've got a strange problem with ant. It's version is 1.7.1.
I'm trying to do next thing and get the error.
<target name="execute-all-buildfiles">
<foreach param="buildfile-path" target="execute-buildfile">
<path>
<dirset dir="${path.to.server}/share/source"/>
</path>
</foreach>
</target>
<target name="execute-buildfile">
<echo message="" />
<echo message="" />
<echo message="" />
<echo message="__________ Building cartridge ${buildfile-path} ___________" />
<echo message="" />
<echo message="" />
<echo message="" />
<java
jvm="${path.to.server}/engine/jdk/bin/java"
classname="org.apache.tools.ant.launch.Launcher"
fork="true"
failonerror="true">
<classpath>
<pathelement location="${ant.home}/lib/ant-launcher.jar"/>
</classpath>
<arg value="-f" />
<arg value="${buildfile-path}/build/build.xml" />
<arg value="-Dis.home=${path.to.server}" />
</java>
</target>
I've tried less complicated version of foreach, but it doesn't work as well. Please, help me.
<target name="run">
<foreach target="loop" param="loop.param">
<path>
<dirset dir="${path.to.server}/share/source"/>
</path>
</foreach>
</target>
<target name="loop">
<echo message="${loop.param}"/>
<basename property="dir.name" file="${loop.param}"/>
<echo message="${dir.name}"/>
</target>
P.S. Sorry for mistakes. Take a look at a simple one.