[ http://jira.codehaus.org/browse/WAGONSSH-15?page=all ]
     
Brett Porter closed WAGONSSH-15:
--------------------------------

     Assign To: Brett Porter
    Resolution: Fixed

> verbose exception can improve debugging user problem
> ----------------------------------------------------
>
>          Key: WAGONSSH-15
>          URL: http://jira.codehaus.org/browse/WAGONSSH-15
>      Project: wagon-ssh
>         Type: Wish
>     Reporter: Juan F. Codagnone
>     Assignee: Brett Porter
>     Priority: Trivial
>      Fix For: 1.0-alpha-5
>  Attachments: WAGONSSH-15.diff
>
>
> An example of an actual get exception:
> Caused by: org.apache.maven.wagon.TransferFailedException: Error occured 
> while downloading from the remote repository:[test-private-repo] -> 
> sftp://localhost/tmp/m2
> ...
> Caused by: No such file
>         at com.jcraft.jsch.ChannelSftp.throwStatusError(ChannelSftp.java:1541)
>         at com.jcraft.jsch.ChannelSftp.stat(ChannelSftp.java:1207)
>         at com.jcraft.jsch.ChannelSftp.get(ChannelSftp.java:587)
> It doesnt give you much information unless you know to read the whole 
> stacktrace (in this case you can spot  that is a metadata problem because it 
> apears DefaultRepositoryMetadataManager.java:2309). I propose something like:
> Caused by: org.apache.maven.wagon.TransferFailedException: Error occured 
> while downloading `ar/com/test/maven/poms/bare/maven-metadata.xml' from the 
> remote repository:[test-private-repo] -> sftp://localhost/tmp/m2
> it can be accomplish  with something like: (but you already know that! ;-)
> --- src/main/java/org/apache/maven/wagon/providers/ssh/ScpWagon.java    
> (revision 290590)
> +++ src/main/java/org/apache/maven/wagon/providers/ssh/ScpWagon.java    
> (working copy)
> @@ -565,12 +588,14 @@
>              }
>          }
> -        String msg = "Error occured while downloading from the remote 
> repository:" + getRepository();
> +        String msg = "Error occured while downloading `" + resource.getName()
> +                + "' from the remote repository:" + getRepository();
>          throw new TransferFailedException( msg, e );
>      }
>      public boolean getIfNewer( String resourceName, File destination, long 
> timestamp )

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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

Reply via email to