You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wagon-dev@maven.apache.org by "Brett Porter (JIRA)" <ji...@codehaus.org> on 2005/10/10 04:04:12 UTC

[jira] Updated: (WAGONSSH-15) verbose exception can improve debugging user problem

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

Brett Porter updated WAGONSSH-15:
---------------------------------

    Description: 
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 )


  was:

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 )


    Fix Version: 1.0-alpha-5

> 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
>     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: wagon-dev-unsubscribe@maven.apache.org
For additional commands, e-mail: wagon-dev-help@maven.apache.org