You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Z W <mp...@gmail.com> on 2008/01/24 08:47:28 UTC

scp files from Unix to Windows question

Hi

I have trouble getting scp to copy from a unix host to a windows folder.


re_dir=/home/or/files

REPOSITORY=\\\\fil\\Rep\\PC


<scp localTodir="${REPOSITORY}"

verbose="true"

trust="true"

sftp="true">

<fileset dir="${name}:${word}@${host}:${re_dir}"/>

</scp>



And I'm getting errors like this below.

==========================

C:\ppl\ape.xml:203: 'todir' and 'file' attributes must have syntax li
ke the following: user:password@host:/path
        at org.apache.tools.ant.taskdefs.optional.ssh.Scp.execute(Scp.java
:215)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java
:288)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(
DispatchUtils.jav
a:105)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:357)
        at org.apache.tools.ant.Target.performTasks(Target.java:385)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java
:1329)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
        at org.apache.tools.ant.helper.DefaultExecutor.executeTargets
(DefaultExe
cutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
        at org.apache.tools.ant.Main.runBuild(Main.java:698)
        at org.apache.tools.ant.Main.startAnt(Main.java:199)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
Caused by: 'todir' and 'file' attributes must have syntax like the
following: us
er:password@host:/path
        at org.apache.tools.ant.taskdefs.optional.ssh.Scp.execute(Scp.java
:209)
        ... 17 more
--- Nested Exception ---
'todir' and 'file' attributes must have syntax like the following:
user:password
@host:/path
        at org.apache.tools.ant.taskdefs.optional.ssh.Scp.execute(Scp.java
:209)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java
:288)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(
DispatchUtils.jav
a:105)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:357)
        at org.apache.tools.ant.Target.performTasks(Target.java:385)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java
:1329)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
        at org.apache.tools.ant.helper.DefaultExecutor.executeTargets
(DefaultExe
cutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
        at org.apache.tools.ant.Main.runBuild(Main.java:698)
        at org.apache.tools.ant.Main.startAnt(Main.java:199)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)

Total time: 0 seconds

What am I doing wrong ?