Return-Path: Delivered-To: apmail-ant-notifications-archive@minotaur.apache.org Received: (qmail 56758 invoked from network); 3 Feb 2011 23:12:50 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 3 Feb 2011 23:12:50 -0000 Received: (qmail 29340 invoked by uid 500); 3 Feb 2011 23:12:50 -0000 Delivered-To: apmail-ant-notifications-archive@ant.apache.org Received: (qmail 29281 invoked by uid 500); 3 Feb 2011 23:12:49 -0000 Mailing-List: contact notifications-help@ant.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ant.apache.org Delivered-To: mailing list notifications@ant.apache.org Received: (qmail 29274 invoked by uid 99); 3 Feb 2011 23:12:49 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Feb 2011 23:12:49 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Feb 2011 23:12:49 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id E43CB18C912 for ; Thu, 3 Feb 2011 23:12:28 +0000 (UTC) Date: Thu, 3 Feb 2011 23:12:28 +0000 (UTC) From: "Maarten Coene (JIRA)" To: notifications@ant.apache.org Message-ID: <1983700436.8798.1296774748915.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1375846168.7227.1296739528959.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] Resolved: (IVY-1267) Improve diagnostics in ssh resolver MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/IVY-1267?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Maarten Coene resolved IVY-1267. -------------------------------- Resolution: Fixed Assignee: Maarten Coene I've updated trunk based on your patch. Could you give it a try to check if diagnostics have been improved? thanks! Maarten > Improve diagnostics in ssh resolver > ----------------------------------- > > Key: IVY-1267 > URL: https://issues.apache.org/jira/browse/IVY-1267 > Project: Ivy > Issue Type: Improvement > Affects Versions: 2.2.0 > Reporter: Stepan Koltsov > Assignee: Maarten Coene > Priority: Minor > > Currently I get messages when using SSH resolve: > ERROR: The uri is in the wrong format > and > java.lang.NullPointerException > This does not help a lot. > {code} > Index: src/java/org/apache/ivy/plugins/repository/ssh/AbstractSshBasedRepository.java > =================================================================== > --- src/java/org/apache/ivy/plugins/repository/ssh/AbstractSshBasedRepository.java (revision 1066801) > +++ src/java/org/apache/ivy/plugins/repository/ssh/AbstractSshBasedRepository.java (working copy) > @@ -136,7 +136,7 @@ > return uri; > } catch (URISyntaxException e) { > Message.error(e.getMessage()); > - Message.error("The uri is in the wrong format."); > + Message.error("The uri is in the wrong format: '" + source + "'"); > Message.error("Please use scheme://user:pass@hostname/path/to/repository"); > return null; > } > Index: src/java/org/apache/ivy/plugins/repository/ssh/SshRepository.java > =================================================================== > --- src/java/org/apache/ivy/plugins/repository/ssh/SshRepository.java (revision 1066801) > +++ src/java/org/apache/ivy/plugins/repository/ssh/SshRepository.java (working copy) > @@ -167,11 +167,12 @@ > ChannelExec channel = null; > session = getSession(parent); > channel = getExecChannel(session); > - URI parentUri = null; > + URI parentUri; > try { > parentUri = new URI(parent); > } catch (URISyntaxException e1) { > // failed earlier > + throw new RuntimeException(e1); > } > String fullCmd = replaceArgument(listCommand, parentUri.getPath()); > channel.setCommand(fullCmd); > @@ -235,11 +236,12 @@ > Message.debug("SShRepository:put called: " + destination); > Session session = getSession(destination); > try { > - URI destinationUri = null; > + URI destinationUri; > try { > destinationUri = new URI(destination); > } catch (URISyntaxException e) { > // failed earlier in getSession() > + throw new RuntimeException(e); > } > String filePath = destinationUri.getPath(); > int lastSep = filePath.lastIndexOf(fileSeparator); > {code} -- This message is automatically generated by JIRA. - For more information on JIRA, see: http://www.atlassian.com/software/jira