Ivy
  1. Ivy
  2. IVY-1087

ivy:resolve ignores branch in "dynamic" resolve mode

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.1.0-RC1
    • Fix Version/s: 2.1.0-RC2
    • Component/s: Core
    • Labels:
      None
    • Environment:

      Linux 2.6.18-92.1.22.el5 #1 SMP Tue Dec 16 12:03:43 EST 2008 i686 athlon i386 GNU/Linux

      Description

      When I call ivy:resolve as following
      <ivy:resolve file="$

      {deps.file}" showProgress="false" conf="compile" resolveMode="dynamic"/>
      and having
      <ivy pattern="${ivy.local.default.root}/[organisation]/[branch]/[module]ivys/ivy[revision].xml"/>
      <artifact pattern="${ivy.local.default.root}/[organisation]/[branch]/[artifact]-[revision].[ext]"/>
      set in my defaultResolver
      ivy:resolver ignores [branch] and looks for ivy.xml in "${ivy.local.default.root}/[organisation]//[module]ivys/ivy[revision].xml"
      and artifact in "${ivy.local.default.root}/[organisation]//[artifact]-[revision].[ext]".

      However if I call <ivy:resolve file="${deps.file}

      " showProgress="false" conf="compile"/> without resolveMode set, everything is fine and resolve follows [organisation]/[branch] path.

        Activity

        Hide
        aleksey zhukov added a comment -

        Thanks, it works.

        Show
        aleksey zhukov added a comment - Thanks, it works.
        Hide
        Maarten Coene added a comment -

        ok, I've committed another change which I hope will fix the problem.
        Please give it a try and post your feedback here.

        Maarten

        Show
        Maarten Coene added a comment - ok, I've committed another change which I hope will fix the problem. Please give it a try and post your feedback here. Maarten
        Hide
        Maarten Coene added a comment -

        Now that I think of it a bit further, I'm not sure that my commit will change anything...
        Please feel free to give it a try, but I'm reopening it for further investigation.

        Show
        Maarten Coene added a comment - Now that I think of it a bit further, I'm not sure that my commit will change anything... Please feel free to give it a try, but I'm reopening it for further investigation.
        Hide
        Maarten Coene added a comment -

        Thanks for the patch,
        I've committed a slightly modified version of it, could you please give it a try and post your feedback here?

        thanks,
        Maarten

        Show
        Maarten Coene added a comment - Thanks for the patch, I've committed a slightly modified version of it, could you please give it a try and post your feedback here? thanks, Maarten
        Hide
        aleksey zhukov added a comment -

        OK, I have fixed that. Please review the patch.

        diff -up ./XmlModuleDescriptorParser.java.orig ./XmlModuleDescriptorParser.java
        — ./XmlModuleDescriptorParser.java.orig 2009-06-24 13:15:54.000000000 -0500
        +++ ./XmlModuleDescriptorParser.java 2009-06-24 12:12:58.000000000 -0500
        @@ -521,6 +521,8 @@ public class XmlModuleDescriptorParser e
        String name = settings.substitute(attributes.getValue("name"));
        String branch = settings.substitute(attributes.getValue("branch"));
        String branchConstraint = settings.substitute(attributes.getValue("branchConstraint"));
        + branchConstraint = branchConstraint == null ? branch : branchConstraint;
        +
        String rev = settings.substitute(attributes.getValue("rev"));
        String revConstraint = settings.substitute(attributes.getValue("revConstraint"));
        revConstraint = revConstraint == null ? rev : revConstraint;

        If this is ok, please add it to the trunk.

        Show
        aleksey zhukov added a comment - OK, I have fixed that. Please review the patch. diff -up ./XmlModuleDescriptorParser.java.orig ./XmlModuleDescriptorParser.java — ./XmlModuleDescriptorParser.java.orig 2009-06-24 13:15:54.000000000 -0500 +++ ./XmlModuleDescriptorParser.java 2009-06-24 12:12:58.000000000 -0500 @@ -521,6 +521,8 @@ public class XmlModuleDescriptorParser e String name = settings.substitute(attributes.getValue("name")); String branch = settings.substitute(attributes.getValue("branch")); String branchConstraint = settings.substitute(attributes.getValue("branchConstraint")); + branchConstraint = branchConstraint == null ? branch : branchConstraint; + String rev = settings.substitute(attributes.getValue("rev")); String revConstraint = settings.substitute(attributes.getValue("revConstraint")); revConstraint = revConstraint == null ? rev : revConstraint; If this is ok, please add it to the trunk.
        Hide
        aleksey zhukov added a comment -

        Can someone look at this, please?
        It is a truly blocker for me.

        Show
        aleksey zhukov added a comment - Can someone look at this, please? It is a truly blocker for me.

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development