Maven
  1. Maven
  2. MNG-1412

dependency sorting in classpath

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0.9
    • Component/s: Dependencies
    • Labels:
      None
    • Complexity:
      Intermediate
    • Number of attachments :
      5

      Description

      The .classpath file entries should be ordered by nearest transitiveness (if that's a word).

      For example, I have project A that depends on B that depends on C. The classpath for A is generated in the order C, B. Ideally the classpath should be in order of how near they are to the project, i.e. B, C.

      1. artifact-order_maven-artifact.txt
        9 kB
        Martin Zeltner
      2. artifact-order_maven-artifact-manager.txt
        7 kB
        Martin Zeltner
      3. artifact-order_maven-project.txt
        10 kB
        Martin Zeltner
      4. MNG-1412_dependency_sorting.tgz
        1 kB
        Herve Boutemy
      5. MNG-1412-maven-2.0.x-r507746.patch
        18 kB
        Eric Brown

        Issue Links

          Activity

          Hide
          Robert Weissmann added a comment -

          Hi,

          many votes on changes on this one, but sine 2005 there is no response from the Asignee "fabrizio giustina". Is he still around ? And if not, how does this work that someone else takes over in case he left ?

          Maybe this is a dead thread.

          Anyone knows how this works ?

          Cheers, Robert.

          Show
          Robert Weissmann added a comment - Hi, many votes on changes on this one, but sine 2005 there is no response from the Asignee "fabrizio giustina". Is he still around ? And if not, how does this work that someone else takes over in case he left ? Maybe this is a dead thread. Anyone knows how this works ? Cheers, Robert.
          Hide
          Herve Boutemy added a comment -

          I just wrote a JUnit test that proves the defect.

          And it shows that the sorting problem was still here in 2.0.8, but it is not here any more in 2.0.9-SNAPSHOT (I didn't check 2.1-SNAPSHOT).
          I fixed it on 2007/12/07 in r601095 (r601096 in trunk) while working on such a dependencies sorting issue in MANTTASKS-91: one HashSet to LinkedHashSet transformation had been forgotten...

          Now I need to transform this JUnit test in an integration test to ensure that no regression will happen in the future.

          Can somebody check that it is ok for him with 2.0.9-SNAPSHOT? I'm pretty sure it is ok given my JUnit test, but having someone confirm this would be even better.

          Show
          Herve Boutemy added a comment - I just wrote a JUnit test that proves the defect. And it shows that the sorting problem was still here in 2.0.8, but it is not here any more in 2.0.9-SNAPSHOT (I didn't check 2.1-SNAPSHOT). I fixed it on 2007/12/07 in r601095 (r601096 in trunk) while working on such a dependencies sorting issue in MANTTASKS-91 : one HashSet to LinkedHashSet transformation had been forgotten... Now I need to transform this JUnit test in an integration test to ensure that no regression will happen in the future. Can somebody check that it is ok for him with 2.0.9-SNAPSHOT? I'm pretty sure it is ok given my JUnit test, but having someone confirm this would be even better.
          Hide
          Herve Boutemy added a comment -

          fixed on 2007/12/07 in r601095 (r601096 in trunk)
          Integration test just added in r617974

          Show
          Herve Boutemy added a comment - fixed on 2007/12/07 in r601095 (r601096 in trunk) Integration test just added in r617974
          Hide
          Martin Zeltner added a comment -

          Hurray!
          Have a nice day!
          Martin

          Show
          Martin Zeltner added a comment - Hurray! Have a nice day! Martin
          Hide
          John Casey added a comment -

          this would have an effect on the ordering of dependencies from a plugin's POM that are used in the plugin's classpath...not sure whether it would affect transitive-dependency selection when two deps are at the same level in the transitive hierarchy, but it seems plausible.

          I need to examine the commits related to this fix to see.

          Show
          John Casey added a comment - this would have an effect on the ordering of dependencies from a plugin's POM that are used in the plugin's classpath...not sure whether it would affect transitive-dependency selection when two deps are at the same level in the transitive hierarchy, but it seems plausible. I need to examine the commits related to this fix to see.

            People

            • Assignee:
              Herve Boutemy
              Reporter:
              Mark Hobson
            • Votes:
              44 Vote for this issue
              Watchers:
              38 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: