about <exec> tag in ant



I am trying to use <exec> tag in ant to call an native executable. When
I use the command:
"ant dir", I got following errors: (I just want to learn how to use
exec task ). can anyone tell me what happened?

<project>
<target name="dir">
<exec executable ="copy">
<arg value="build.xml"/>
<arg value="build.xml.bbb"/>
</exec>
</target>

</project>

------------errors----------

Complete build sequence is [dir, ]

dir:
[exec] Current OS is Windows XP
[exec] Executing 'copy' with arguments:
[exec] 'build.xml'
[exec] 'build.xml.bbb'
[exec]
[exec] The ' characters around the executable and arguments are
[exec] not part of the command.

BUILD FAILED
C:\jtest\build.xml:3: Execute failed: java.io.IOException:
CreateProcess: copy b
uild.xml build.xml.bbb error=2
at
org.apache.tools.ant.taskdefs.ExecTask.runExec(ExecTask.java:620)
at
org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:452)
at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:341)
at org.apache.tools.ant.Target.performTasks(Target.java:369)
at
org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
at
org.apache.tools.ant.Project.executeTarget(Project.java:1185)
at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExe

.



Relevant Pages

  • Re: need your helpppp
    ... Also it works fine if I use command "p1.cgi" in unix shell. ... them get printed in <html> section of try.cgi. ... It seems to me that the first thing is to figure out why the exec fails. ... There are differences between executing a Perl script from the command line and executing it as a CGI script, which include the setting of the PATH variable, and the accessability of files in general. ...
    (comp.lang.perl.modules)
  • Re: exec "echo $PATH"
    ... I have a problem with executing commands with "$" or other spacial ... exec command does not use a shell, ... The first word in each command is taken as the ... exec echo ...
    (comp.lang.tcl)
  • Re: First-time forking
    ... Calling exec() within a pseudo-process actually spawns the requested ... running the bedrock command. ... Actually, most of the time when you're executing system commands, ...
    (perl.beginners)
  • Re: system or exec
    ... overall in the ammount of time it takes for external ... > command to be executed, ... exec is faster. ... A *lot* faster when the time spent executing the rest ...
    (comp.lang.perl.misc)
  • Re: code to determine 64-bit vs 32-bit binaries?
    ... >>Can anyone post sample code showing how to determine, within a Solaris ... This works fine *if* the program you're executing is in the same ELF ... You can't even catch the exec failure and try ...
    (comp.unix.solaris)