Toby,
On Wed, 22 Aug 2001, Toby Poulter <[EMAIL PROTECTED]> wrote:
> I am having problems using a nested <srcfile /> element in an apply
> task like this:
What you are trying to do is how it is supposed to work, nothing wrong
on your side. I don't have a Windows box around, so I've run the
following test on Linux:
<project default="apply">
<target name="apply">
<apply executable="echo" parallel="false">
<arg value="1" />
<fileset dir="." includes="*.xml" />
<srcfile />
<arg value="2" />
</apply>
</target>
</project>
and it works as expected:
bodewig@bodewig ~/jakarta/jakarta-ant >ant -f /tmp/apply.xml
Buildfile: /tmp/apply.xml
apply:
[apply] 1 /tmp/apply.xml 2
[apply] 1 /tmp/meins.xml 2
[apply] 1 /tmp/deldummy.xml 2
BUILD SUCCESSFUL
Total time: 2 seconds
*after* I fixed ExecuteOn to not lose the arguments after the
<srcfile/>. Before my commit of a few minutes ago, the example above
would die with a NullPointerException. So I'm more than a little bit
puzzled by your result, you should have gotten the NPE as well.
Could you please pick up the source release of 1.4beta2, replace
ExecuteOn.java with this one
<http://cvs.apache.org/viewcvs/~checkout~/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/ExecuteOn.java?rev=1.14.2.1&content-type=text/plain>,
bootstrap a new version of Ant with bootstrap.bat and rerun your build
file to see whether the problem persists?
Thanks
Stefan