[ 
https://issues.apache.org/jira/browse/IVY-661?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Maarten Coene resolved IVY-661.
-------------------------------

    Resolution: Fixed

I've applied your patch, thanks!

However, I did change the addition of a "." before the path.
The path of the SFTP URI should be an absolute path, if you need a relative 
path, you should use "sftp://user:[EMAIL PROTECTED]:port/~/path/to/repository"

Could you give it a try and provide your feedback?
Please reopen if it is not working for you.

> Incorrect parsing artifactPattern attribute in a sftp resolver
> --------------------------------------------------------------
>
>                 Key: IVY-661
>                 URL: https://issues.apache.org/jira/browse/IVY-661
>             Project: Ivy
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.0.0-beta-2
>         Environment: Developer: Windows XP, jdk1.6.0_02, ant-1.7.0, 
> jsch-0.1.36
> SFTP Server: FreeBSD-6.2-RELEASE.
>            Reporter: Alexey Kiselev
>            Assignee: Maarten Coene
>            Priority: Minor
>             Fix For: 2.0-RC1
>
>         Attachments: SFTPRepository.java.patch
>
>
> PROBLEM:
> Ivy settings file contains description of resolver:
>       <resolvers>
>               <sftp name="remote">
>                       <ivy pattern="sftp://user:[EMAIL 
> PROTECTED]:12345/repository/[module]/[module]-[revision].xml"/>
>                       <artifact pattern="sftp://user:[EMAIL 
> PROTECTED]:12345/repository/[module]/[artifact]-[revision].[ext]"/>
>               </sftp>
>       </resolvers>
> Then we try to publish to a repository for the first time on empty server we 
> get a java.io.IOException and a following directory structure created on the 
> server ~user/sftp:/.
> Afterwards when we publish for the second time we get following directory 
> structure ~user/sftp:/user:[EMAIL PROTECTED]:12435/repository/module/ and 
> successfully published artifact.
> During the first run the java.io.IOException caused by creation of a 
> directory with empty name. Creation of the directory with empty name caused 
> by double slash (//) following "sftp:".
> Then if we try to retrieve a file from the repository we get an exception 
> with message "reolving resource error: No such file". This problem appears 
> because after establishing connection to the sftp server we are automatically 
> moved to the user home directory. 
> Thats why we must use a relative path in put, get and list commands when we 
> work with a repository.
> SOLUTION:
> Solution of this problem is in the attached patch.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to