You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by ML <ma...@t-online.de> on 2011/04/02 19:12:31 UTC

Re: Commented: (MECLIPSE-388) Correct classpath ordering in .classpath

Hi,

> The classpath order is the reason why we're still using version 2.4 of the
> eclipse plugin. 
> It's important that the pom order of the dependencies is reflected in
> Eclipse. 

with version 2.6 the order of the .classpath entries does not match the
order the M2Eclipse plugin creates nor the behaviour of the mvn command line
(because the Maven Eclipse Plugin version 2.8 has filter issues I use
version 2.6 to generate Eclipse .classpath and .project files).

The order of the .classpath entries is affected at the following code
locations:

1. org.apache.maven.plugin.eclipse.writers.EclipseWriterConfig.setDeps(
IdeDependency[] deps) where the array is sorted.
I deleted the line
         Arrays.sort( orderedDeps, depsByArtifactId );

2. org.apache.maven.plugin.ide.AbstractIdeSupportMojo.getProjectArtifacts()
returns a TreeSet. The TreeSet mixes up the order of classpath entries.
I interchanged the TreeSet with a LinkedHashSet.

3. the classpath containers are added at the bottom of the .classpath file.
I want them to stay at the top so JDK classes dominate over older classes in
implicit dependencies. So I created a new parameter for the EclipsePlugin
which specifies where to put the classpath containers: top or bottom of the
.classpath file.
This new parameter is evaluated in Method
org.apache.maven.plugin.eclipse.writers.EclipseClasspathWriter.write().

Whith this description you should be able to fix this issue on your own.
Otherwise where do I post the patch to? I am new to this stuff.

At least 1 and 2 are still issues in version 2.8 of the Maven Eclipse
Plugin. 3 would be a very nice feature.

Regards,
Markus


--
View this message in context: http://maven.40175.n5.nabble.com/jira-Created-MECLIPSE-388-Correct-classpath-ordering-in-classpath-tp254884p4277888.html
Sent from the Maven - Issues mailing list archive at Nabble.com.