DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=31939>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=31939

scp failes when copying fileset to remote directory

           Summary: scp failes when copying fileset to remote directory
           Product: Ant
           Version: 1.6.2
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Optional Tasks
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


When copying a file structure to a remote host, the scp task give the following
error:

Server indicated an error: scp: protocol error: receiving a directory without 
-r.

The test was done with the following build.xml:
<?xml version="1.0"?>
<project name="probeersels" default="build" basedir=".">
        
        <target name="probeer-scp">
                <scp todir="user:[EMAIL PROTECTED]:/some/dir" trust="true">
                        <fileset dir="${basedir}/src">
                            <include name="**/*.*"/>
                        </fileset>
                </scp>
        </target>
        
        <target name="build">
        </target>
</project>

Ant version 1.6.2. Jsch version 0.1.17. OpenSSH 3.9 in Cygwin on the server
(Win2003).

The solution is to change the line 116 in
org.apache.tools.ant.taskdefs.optional.ssh.ScpToMessage (method
doMultipleTransfer()) to

        Channel channel = openExecChannel("scp -d -t -r " + remotePath);

(Added the -r to the String starting with "scp".

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to