Ivy
  1. Ivy
  2. IVY-1167

Using SFTP resolver with full pattern URL prevents use of dynamic versions

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.0
    • Fix Version/s: 2.2.0-RC1
    • Component/s: Core
    • Labels:
      None
    • Environment:

      Jsch 0.1.31 and 0.1.42.
      JDK 1.6+
      ant 1.8RC1
      Linux Gentoo

      Description

      Hello !

      I'm using a sftp repository. Let's say there is a module called foo, revsions 1.2.3 and 1.2.4 are present.

      I add : <dependency org="org.my" name="foo" rev="1.2.+"/>

      Resolve is unsucessful if I declare my repository as an full URL :

      <resolvers>
        <sftp name="public" user="rep.user" userPassword="rep.password" >
          <ivy pattern="sftp://rep.host/home/ivy/repository/[organisation]/[module]/[revision]/ivys/ivy.xml"/>
          <artifact pattern="sftp://rep.host/home/ivy/repository/[organisation]/[module]/[revision]/[type]s/[artifact].[ext]"/>
         </sftp>
      </resolvers>
      

      But everything works if I declare my repository using attributes :

      <resolvers>
        <sftp name="public" host="rep.host" user="rep.user" userPassword="rep.password" >
          <ivy pattern="/home/ivy/repository/[organisation]/[module]/[revision]/ivys/ivy.xml"/>
          <artifact pattern="/home/ivy/repository/[organisation]/[module]/[revision]/[type]s/[artifact].[ext]"/>
         </sftp>
      </resolvers>
      

      In fact, the list method use the pattern as a path, and don't remove the sftp://<host> .

      1. sftp.patch
        2 kB
        Gregory Fernandez

        Activity

        Hide
        Gregory Fernandez added a comment -

        Solution :
        Convering the variable parent into URI and extract the path.

        Show
        Gregory Fernandez added a comment - Solution : Convering the variable parent into URI and extract the path.
        Hide
        Maarten Coene added a comment -

        I've applied your patch into SVN trunk.
        Thanks a lot for the contribution!

        Show
        Maarten Coene added a comment - I've applied your patch into SVN trunk. Thanks a lot for the contribution!

          People

          • Assignee:
            Maarten Coene
            Reporter:
            Gregory Fernandez
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development