ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 31939] New: - scp failes when copying fileset to remote directory
Date Thu, 28 Oct 2004 14:35:05 GMT
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: dev@ant.apache.org
        ReportedBy: cgroenen@xebia.com


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:psw@host:/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: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message