You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Ben Pracht <bp...@zcloud.net> on 2003/08/28 19:03:51 UTC
exec cp won't work -- cannot stat existing file
Because the copy task won't copy symlinks on Linux, I'm using an exec
task. Unfortunately, it keeps giving me this message:
[exec] Current OS is Linux
[exec] Executing 'cp' with arguments:
[exec]
'/home/bpracht/xks/current/internal/debug/Linux/2.4.18-14debug/i386/xml4c/lib/*'
[exec]
'/home/bpracht/xks/current/install/debug/Linux/2.4.18-14debug/i386'
[exec]
[exec] The ' characters around the executable and arguments are
[exec] not part of the command.
[exec] /bin/cp: cannot stat
`/home/bpracht/xks/current/internal/debug/Linux/2.4.18-14debug/i386/xml4c/lib/*':
No such file or directory
Both the source and target exist.
Here's my exec statement:
<switch value="${OSFamily}">
<case value="windows">
<property name="CopyCommand" value="copy"/>
</case>
<case value="unix">
<property name="CopyCommand" value="cp"/>
</case>
</switch>
<exec executable="${CopyCommand}"
dir="${internal}"
vmlauncher="true"
failonerror="true">
<arg path="${internal}/xml4c/lib/*"/>
<arg path="${install}/."/>
</exec>
<exec executable="${CopyCommand}"
dir="${internal}"
vmlauncher="true"
failonerror="true">
<arg path="${internal}/xml4c/msg/*"/>
<arg path="${install}/."/>
</exec>
I've tried vmlauncher=true and false, and both give me the same
results. However, when I
change the value of ${CopyCommand} to a shell script called bcp, the
script runs, and
successfully copies the file.
How can I fix this problem?
Thanks in advance,
Ben P
This email scanned for Viruses and Spam by ZCloud.net
For more information on our $99 per year dial-up internet with filtered email please visit us at: http://www.zcloud.net
Re: exec cp won't work -- cannot stat existing file
Posted by Steve Loughran <st...@iseran.com>.
Ben Pracht wrote:
> Because the copy task won't copy symlinks on Linux, I'm using an exec
> task. Unfortunately, it keeps giving me this message:
>
> [exec] Current OS is Linux
> [exec] Executing 'cp' with arguments:
> [exec]
> '/home/bpracht/xks/current/internal/debug/Linux/2.4.18-14debug/i386/xml4c/lib/*'
>
> [exec]
> '/home/bpracht/xks/current/install/debug/Linux/2.4.18-14debug/i386'
> [exec]
> [exec] The ' characters around the executable and arguments are
> [exec] not part of the command.
> [exec] /bin/cp: cannot stat
> `/home/bpracht/xks/current/internal/debug/Linux/2.4.18-14debug/i386/xml4c/lib/*':
> No such file or directory
>
> Both the source and target exist.
um, unless you have a source file of the name '*', it doesnt exist
-there is no shell under exec to do the expansion unless you exec sh or
similar
> <exec executable="${CopyCommand}"
> dir="${internal}"
> vmlauncher="true"
> failonerror="true">
> <arg path="${internal}/xml4c/lib/*"/>
> <arg path="${install}/."/>
> </exec>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org