maven-wagon-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r477078 - /maven/wagon/trunk/wagon-providers/wagon-ssh/src/main/java/org/apache/maven/wagon/providers/ssh/SftpWagon.java
Date Mon, 20 Nov 2006 06:54:44 GMT
Author: brett
Date: Sun Nov 19 22:54:43 2006
New Revision: 477078

URL: http://svn.apache.org/viewvc?view=rev&rev=477078
Log:
factor out JSCH specifics

Modified:
    maven/wagon/trunk/wagon-providers/wagon-ssh/src/main/java/org/apache/maven/wagon/providers/ssh/SftpWagon.java

Modified: maven/wagon/trunk/wagon-providers/wagon-ssh/src/main/java/org/apache/maven/wagon/providers/ssh/SftpWagon.java
URL: http://svn.apache.org/viewvc/maven/wagon/trunk/wagon-providers/wagon-ssh/src/main/java/org/apache/maven/wagon/providers/ssh/SftpWagon.java?view=diff&rev=477078&r1=477077&r2=477078
==============================================================================
--- maven/wagon/trunk/wagon-providers/wagon-ssh/src/main/java/org/apache/maven/wagon/providers/ssh/SftpWagon.java
(original)
+++ maven/wagon/trunk/wagon-providers/wagon-ssh/src/main/java/org/apache/maven/wagon/providers/ssh/SftpWagon.java
Sun Nov 19 22:54:43 2006
@@ -67,8 +67,12 @@
 
         firePutInitiated( resource, source );
 
-        ChannelSftp channel;
+        putJsch( basedir, resourceName, resource, source, dir );
+    }
 
+    private void putJsch( String basedir, String resourceName, Resource resource, File source,
String dir )
+        throws TransferFailedException
+    {
         String filename;
 
         if ( resourceName.lastIndexOf( PATH_SEPARATOR ) > 0 )
@@ -80,6 +84,8 @@
             filename = resourceName;
         }
 
+        ChannelSftp channel;
+
         try
         {
             channel = (ChannelSftp) session.openChannel( SFTP_CHANNEL );
@@ -89,11 +95,11 @@
             RepositoryPermissions permissions = getRepository().getPermissions();
 
             int directoryMode = getDirectoryMode( permissions );
-            
+
             mkdirs( channel, basedir, directoryMode );
 
             channel.cd( basedir );
-            
+
             mkdirs( channel, resourceName, directoryMode );
 
             firePutStarted( resource, source );



---------------------------------------------------------------------
To unsubscribe, e-mail: wagon-commits-unsubscribe@maven.apache.org
For additional commands, e-mail: wagon-commits-help@maven.apache.org


Mime
View raw message