Maven
  1. Maven
  2. MNG-612

implement conflict resolution techniques

    Details

      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

          Brett Porter created issue -
          Brett Porter made changes -
          Field Original Value New Value
          Priority Major [ 3 ] Critical [ 2 ]
          Vincent Massol made changes -
          Workflow jira [ 35970 ] Maven [ 36968 ]
          Brett Porter made changes -
          Remaining Estimate 24h [ 86400 ]
          Assignee Brett Porter [ brettporter ]
          Original Estimate 24h [ 86400 ]
          Brett Porter made changes -
          Remaining Estimate 24h [ 86400 ] 8h [ 28800 ]
          Original Estimate 24h [ 86400 ] 8h [ 28800 ]
          Brett Porter made changes -
          Fix Version/s 2.0-beta-1 [ 11040 ]
          Fix Version/s 2.0-beta-2 [ 11861 ]
          Brett Porter made changes -
          Fix Version/s 2.0-beta-3 [ 12015 ]
          Fix Version/s 2.0-beta-2 [ 11861 ]
          Brett Porter made changes -
          Fix Version/s 2.1 [ 11704 ]
          Fix Version/s 2.0-beta-3 [ 12015 ]
          Jason van Zyl made changes -
          Component/s Design, Patterns & Best Practices [ 11341 ]
          Vincent Massol made changes -
          Workflow Maven [ 36968 ] Maven New [ 47116 ]
          Jason van Zyl made changes -
          Fix Version/s 2.1 [ 11704 ]
          Fix Version/s 2.1.x [ 13142 ]
          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.
          Mark Hobson made changes -
          Attachment MNG-612.patch [ 26964 ]
          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
          Mark Hobson made changes -
          Attachment MNG-612-2.patch [ 26991 ]
          Jason van Zyl made changes -
          Patch Submitted [Yes]
          Jason van Zyl made changes -
          Assignee Brett Porter [ brettporter ] Jason van Zyl [ jason ]
          Jason van Zyl made changes -
          Patch Submitted [Yes]
          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.
          Mark Hobson made changes -
          Attachment MNG-612-3.patch [ 28196 ]
          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.
          Jason van Zyl made changes -
          Assignee Jason van Zyl [ jason ] Mark Hobson [ mihobson ]
          Brett Porter made changes -
          Link This issue is duplicated by MNG-3248 [ MNG-3248 ]
          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.
          Mark Hobson made changes -
          Link This issue depends upon MNG-3205 [ MNG-3205 ]
          Jason van Zyl made changes -
          Fix Version/s 3.0 [ 13142 ]
          Fix Version/s 3.x [ 13145 ]
          Brett Porter made changes -
          Link This issue is duplicated by MNG-4175 [ MNG-4175 ]
          Brett Porter made changes -
          Fix Version/s 3.x (to be reviewed) [ 13145 ]
          Fix Version/s Backlog [ 16138 ]
          Jason van Zyl made changes -
          Resolution Incomplete [ 4 ]
          Status Open [ 1 ] Closed [ 6 ]
          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
          Ben 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
          Ben 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...
          Michael Osipov made changes -
          Fix Version/s 3.x / Backlog [ 16138 ]
          Mark Thomas made changes -
          Project Import Sun Apr 05 08:49:45 UTC 2015 [ 1428223785911 ]
          Mark Thomas made changes -
          Workflow jira [ 12711927 ] Default workflow, editable Closed status [ 12751896 ]
          Mark Thomas made changes -
          Project Import Sun Apr 05 21:45:26 UTC 2015 [ 1428270326204 ]
          Mark Thomas made changes -
          Workflow jira [ 12949243 ] Default workflow, editable Closed status [ 12988559 ]
          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open Closed Closed
          3105d 13h 34m 1 Jason van Zyl 19/Jan/14 15:10

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

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

                  Development