Maven 2 & 3
  1. Maven 2 & 3
  2. MNG-612

implement conflict resolution techniques

    Details

    • Number of attachments :
      3

      Description

      currently, the collector only:

      • selects nearest "suggested" version in a valid range
      • latest version from the valid ranges if none suggested
      • fails if ranges are over-constrained

      This needs to be configurable:

      • select newest, even if there is a nearer suggestion
      • select oldest, even if there is a nearer suggestion
      • fail if all suggestions don't equate or a range results instead of a single version
      • ignore over constrained ranges and fallback to some other algorithm
      • select snapshots even if they weren't explicitly specified
      1. MNG-612.patch
        45 kB
        Mark Hobson
      2. MNG-612-2.patch
        43 kB
        Mark Hobson
      3. MNG-612-3.patch
        46 kB
        Mark Hobson

        Issue Links

          Activity

          Hide
          Mark Hobson added a comment -

          Attached an initial stab at this - patch is against 2.0.x. Will send an email to dev to discuss it further without clogging up JIRA.

          Show
          Mark Hobson added a comment - Attached an initial stab at this - patch is against 2.0.x. Will send an email to dev to discuss it further without clogging up JIRA.
          Hide
          Mark Hobson added a comment -

          Attaching slightly improved version of the patch:

          • better ConflictResolver API
          • made ArtifactCollector API change backwards-compatible
          Show
          Mark Hobson added a comment - Attaching slightly improved version of the patch: better ConflictResolver API made ArtifactCollector API change backwards-compatible
          Hide
          Mark Hobson added a comment -

          This issue should be targeted for 2.0.x since the new dependency graph API will make this patch obsolete in 2.1.

          Show
          Mark Hobson added a comment - This issue should be targeted for 2.0.x since the new dependency graph API will make this patch obsolete in 2.1.
          Show
          Mark Hobson added a comment - Wiki: http://docs.codehaus.org/display/MAVEN/Conflict+Resolvers Branch: http://svn.apache.org/repos/asf/maven/components/branches/MNG-612/
          Hide
          Mark Hobson added a comment -
          Show
          Mark Hobson added a comment - Branch update: 2.0.x: https://svn.apache.org/repos/asf/maven/components/branches/MNG-612-2.0.x/ 2.1.x: https://svn.apache.org/repos/asf/maven/components/branches/MNG-612-2.1.x/ https://svn.apache.org/repos/asf/maven/artifact/branches/MNG-612/ Note that 2.1.x needs FIXME fixed in DefaultExtensionManager.addExtension before it can be functional.
          Hide
          Mark Hobson added a comment -

          The maven-artifact changes from this patch have been committed to maven-artifact 3.x. Only Maven 2.1 is using this version, see MNG-3205 for switching Maven 2.0.x over. The rest of the patch outside of maven-artifact still needs to be applied to 2.0.x and 2.1.

          Show
          Mark Hobson added a comment - The maven-artifact changes from this patch have been committed to maven-artifact 3.x. Only Maven 2.1 is using this version, see MNG-3205 for switching Maven 2.0.x over. The rest of the patch outside of maven-artifact still needs to be applied to 2.0.x and 2.1.
          Hide
          Jason van Zyl added a comment -

          All done with Aether now.

          Show
          Jason van Zyl added a comment - All done with Aether now.
          Hide
          Benjamin Podgursky added a comment -

          Sorry to jump on an ancient ticket, but could you point me to how to modify this behavior via Aether?

          For context, I'm moving a bunch of projects from ivy to maven dependency declarations, and it would be really helpful to at least temporarily emulate ivy's "always choose newest" behavior so I don't have to manually hunt through the dependency lists to make sure nothing is getting a different version than it used to...

          Show
          Benjamin Podgursky added a comment - Sorry to jump on an ancient ticket, but could you point me to how to modify this behavior via Aether? For context, I'm moving a bunch of projects from ivy to maven dependency declarations, and it would be really helpful to at least temporarily emulate ivy's "always choose newest" behavior so I don't have to manually hunt through the dependency lists to make sure nothing is getting a different version than it used to...

            People

            • Assignee:
              Mark Hobson
              Reporter:
              Brett Porter
            • Votes:
              21 Vote for this issue
              Watchers:
              22 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 8 hours
                8h
                Remaining:
                Remaining Estimate - 8 hours
                8h
                Logged:
                Time Spent - Not Specified
                Not Specified