ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Bennett/Toronto/IBM" <dbenn...@ca.ibm.com>
Subject Problem with the exec task
Date Fri, 15 Sep 2000 21:38:09 GMT

I'm having trouble using the exec task. I've tried testing it with very
simple targets, but it fails every time.
I've tried using the August 24 and the September 4 nightly builds of Ant.
I'm on NT with jdk1.2.2.

Has anyone else had trouble with this?



The buildfile:

<project name="exec_test" default="go">
     <target name="go">
          <exec executable="dir"/>
     </target>
</project>

The log output:

E:\vaj_nl_rtn\build\buildfiles\vaj_nl_rtn\1.0>ant -buildfile exec_test.xml
Buildfile: exec_test.xml
     [exec] The command attribute is deprecated. Please use the executable
attribute and nested arg elements.

go:

BUILD FAILED

exec_test.xml:3: Execute failed: java.io.IOException: CreateProcess: dir
error=2
java.io.IOException: CreateProcess: dir  error=2
        at java.lang.Win32Process.create(Native Method)
        at java.lang.Win32Process.<init>(Win32Process.java:64)
        at java.lang.Runtime.execInternal(Native Method)
        at java.lang.Runtime.exec(Runtime.java:272)
        at org.apache.tools.ant.taskdefs.Execute.exec(Execute.java:240)
        at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:218)
        at
org.apache.tools.ant.taskdefs.ExecTask.runExec(ExecTask.java:213)
        at
org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:154)
        at org.apache.tools.ant.Target.execute(Target.java, Compiled Code)
        at org.apache.tools.ant.Project.runTarget(Project.java:721)
        at org.apache.tools.ant.Project.executeTarget(Project.java,
Compiled Code)
        at org.apache.tools.ant.Project.executeTargets(Project.java,
Compiled Code)
        at org.apache.tools.ant.Main.runBuild(Main.java, Compiled Code)
        at org.apache.tools.ant.Main.main(Main.java:124)

Total time: 1 seconds





David Bennett
416.448.2630
IBM Toronto Lab - Visual Age for Java - ID
dbennett@ca.ibm.com


Mime
View raw message