maven-wagon-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r661173 - in /maven/wagon/trunk/wagon-providers/wagon-ssh/src/main/java/org/apache/maven/wagon/providers/ssh/jsch: ScpWagon.java SftpWagon.java
Date Thu, 29 May 2008 01:24:18 GMT
Author: brett
Date: Wed May 28 18:24:18 2008
New Revision: 661173

URL: http://svn.apache.org/viewvc?rev=661173&view=rev
Log:
[WAGON-171] ignore failures to set the file mode which might be caused by the file already
existing and having being created by another owner

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

Modified: maven/wagon/trunk/wagon-providers/wagon-ssh/src/main/java/org/apache/maven/wagon/providers/ssh/jsch/ScpWagon.java
URL: http://svn.apache.org/viewvc/maven/wagon/trunk/wagon-providers/wagon-ssh/src/main/java/org/apache/maven/wagon/providers/ssh/jsch/ScpWagon.java?rev=661173&r1=661172&r2=661173&view=diff
==============================================================================
--- maven/wagon/trunk/wagon-providers/wagon-ssh/src/main/java/org/apache/maven/wagon/providers/ssh/jsch/ScpWagon.java
(original)
+++ maven/wagon/trunk/wagon-providers/wagon-ssh/src/main/java/org/apache/maven/wagon/providers/ssh/jsch/ScpWagon.java
Wed May 28 18:24:18 2008
@@ -191,12 +191,19 @@
         }
         catch ( IOException e )
         {
-            fireTransferError( resource, e, TransferEvent.REQUEST_PUT );            
-            
-            String msg = "Error occured while deploying '" + resourceName + "' to remote
repository: " +
-                getRepository().getUrl() + ": " + e.getMessage();
-
-            throw new TransferFailedException( msg, e );
+            if ( e.getMessage().indexOf( "set mode: Operation not permitted" ) >= 0 )
+            {
+                fireTransferDebug( e.getMessage() );                
+            }
+            else
+            {
+                fireTransferError( resource, e, TransferEvent.REQUEST_PUT );            
+                
+                String msg = "Error occured while deploying '" + resourceName + "' to remote
repository: " +
+                    getRepository().getUrl() + ": " + e.getMessage();
+    
+                throw new TransferFailedException( msg, e );
+            }
         }
         catch ( JSchException e )
         {

Modified: maven/wagon/trunk/wagon-providers/wagon-ssh/src/main/java/org/apache/maven/wagon/providers/ssh/jsch/SftpWagon.java
URL: http://svn.apache.org/viewvc/maven/wagon/trunk/wagon-providers/wagon-ssh/src/main/java/org/apache/maven/wagon/providers/ssh/jsch/SftpWagon.java?rev=661173&r1=661172&r2=661173&view=diff
==============================================================================
--- maven/wagon/trunk/wagon-providers/wagon-ssh/src/main/java/org/apache/maven/wagon/providers/ssh/jsch/SftpWagon.java
(original)
+++ maven/wagon/trunk/wagon-providers/wagon-ssh/src/main/java/org/apache/maven/wagon/providers/ssh/jsch/SftpWagon.java
Wed May 28 18:24:18 2008
@@ -170,7 +170,6 @@
     }
 
     private void setFileMode( ChannelSftp channel, String filename, RepositoryPermissions
permissions )
-        throws SftpException
     {
         try
         {
@@ -182,6 +181,10 @@
             // TODO: warning level
             fireTransferDebug( "Not setting mode: must be a numerical mode for SFTP" );
         }
+        catch ( SftpException e )
+        {
+            fireTransferDebug( "Not setting mode: " + e.getMessage() );            
+        }
     }
 
     private void mkdirs( ChannelSftp channel, String resourceName, int mode )



---------------------------------------------------------------------
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