Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-6357

Dependency order should be nearest first

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Reopened
    • Major
    • Resolution: Unresolved
    • None
    • 4.0.x-candidate
    • None
    • None

    Description

      In case of version conflicts, the nearest wins. However, the dependency order is simply based on tree walking. In the rare that a transitive dependency of the first direct dependency contains the same class as a latter direct dependency, the code is compiled against the first one, which is odd.

      It would make more sense if direct dependencies are the first ones on the classpath, followed by the first level transitive dependencies, etc. This will make the explanation equal to version conflict resolution: nearest wins.

      I don't expect real issues due to this change, otherwise we would have had this issue much earlier. This should become the new default order, however there should be a system property to get the original order, just in case somebody needs it.

       

      Current workaround: make the critical dependency the first direct dependency.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              rfscholte Robert Scholte
              Votes:
              2 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m