Ivy
  1. Ivy
  2. IVY-1238

Can not use a v[revision] in an artifact pattern of a filesystem resolver

    Details

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

      Description

      Hi in my ivy 1.4 ivyconf file, i'm using following filesystemresolver;

      <filesystem name="internal-artifacts" checkmodified="true">
      <ivy pattern="d:/projects/intellij-ivy-plugin/target/ivy/internal-artifacts/[organisation]/[module]/v[revision]/ivy.xml"/>
      <artifact pattern="d:/projects/intellij-ivy-plugin/target/ivy/internal-artifacts/[organisation]/[module]/v[revision]/[type]s/[artifact].[ext]"/>
      </filesystem>

      So i'm putting all artifacts of a certain version in a dedicated directory, prefix by 'v'.

      When resolving latest.integration dependencies using 2.0 (eg 2.2.0), i'm getting following error:

      [ivy:resolve] module not found: gui#foo;latest.integration
      [ivy:resolve] ==== internal-artifacts: tried
      [ivy:resolve] d:/projects/intellij-ivy-plugin/target/ivy/internal-artifacts/gui/foo/v[revision]/ivy.xml
      [ivy:resolve] [y-plugin (unreachable)]
      [ivy:resolve] – artifact gui#foo;latest.integration!foo.jar:
      [ivy:resolve] d:/projects/intellij-ivy-plugin/target/ivy/internal-artifacts/gui/foo/v[revision]/jars/foo.jar
      [ivy:resolve] [y-plugin (unreachable)]
      [ivy:resolve] ::::::::::::::::::::::::::::::::::::::::::::::
      [ivy:resolve] :: UNRESOLVED DEPENDENCIES ::

      Notice the strange 'y-plugin' name. After some debugging, i found out that the org.apache.ivy.plugins.resolver.util.ResolverHelper#listTokenValues has a bug. I looks for the v[revision] pattern in the complete path (eg d:/projects/intellij-ivy-plugin/target/ivy/internal-artifacts/gui/foo/v1.0/ivy.xml) and decides that the version is y-plugin instead of 1.0.

      Any of follow changes make the problem disappear:

      • Make sure that no v appears in the complete path, apart from the v[revision]
      • Replace v[revision] by [revision]

      However, i prefer that the bug get's fixed.

      PS: This used to work ok in 1.4

        Activity

        Hide
        Maarten Coene added a comment -

        Should be fixed in trunk now.
        Could you give it a try?

        Thanks for reporting!
        Maarten

        Show
        Maarten Coene added a comment - Should be fixed in trunk now. Could you give it a try? Thanks for reporting! Maarten

          People

          • Assignee:
            Maarten Coene
            Reporter:
            gui
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development