Uploaded image for project: 'Maven Eclipse Plugin (RETIRED)'
  1. Maven Eclipse Plugin (RETIRED)
  2. MECLIPSE-294

Sort items in the generated .classpath

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.3
    • 2.5
    • None
    • None
    • Patch

    Description

      Currently, the ordering of items on the generated .classpath is controlled by the JVM's HashSet ordering.

      One effect of this is that the project-07 and project-33 tests are currently commented out, because it's impossible to write an expected/.classpath file that works everywhere.

      More generally, it's bad that the classpath ordering can vary between platforms and JVM orderings.

      Therefore, I think it would be a good idea to sort the classpath. This would be done by invoking Collections.sort in AbstractIdeSupportMojo.doDependencyResolution. IdeDependency already implements Comparable, on the basis of groupId+artifactId+type. Classifier should be added to the properties considered in compareTo.

      Patch attached as described above.

      Attachments

        1. eclipse-sort.patch
          6 kB
          Max Oliver Bowsher

        Issue Links

          Activity

            People

              aheritier Arnaud Heritier
              maxb Max Oliver Bowsher
              Votes:
              5 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: