You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Barrie Treloar (JIRA)" <ji...@codehaus.org> on 2011/09/19 10:02:17 UTC

[jira] Commented: (MECLIPSE-388) Correct classpath ordering in .classpath

    [ https://jira.codehaus.org/browse/MECLIPSE-388?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=279289#comment-279289 ] 

Barrie Treloar commented on MECLIPSE-388:
-----------------------------------------

I've had an attempt to apply the patch, and the code base has shifted since it was created, so it doesn't apply cleanly.
But it looks like the changes are already there.
* EclipsePlugin.buildDirectoryList() uses LinkedHashSet instead of TreeSet.
* Classpath will either have test classpath before main, or main before test based on the configuration element "testSourcesLast".

The it-test.patch doesn't have anything in the classpath that actually has dependencies.
So there is no way to tell if the classpath ordering is done correctly.
There should be at least two projects that have the same dependencies (but ordered differently in the pom) with correspondingly different .classpath's being generated.

I'll try to create such a test and see whether the latest code works as expected.



> Correct classpath ordering in .classpath
> ----------------------------------------
>
>                 Key: MECLIPSE-388
>                 URL: https://jira.codehaus.org/browse/MECLIPSE-388
>             Project: Maven 2.x Eclipse Plugin
>          Issue Type: Bug
>          Components: Core : Dependencies resolution and build path (.classpath)
>    Affects Versions: 2.4
>            Reporter: Siarhei Dudzin
>            Priority: Critical
>         Attachments: MECLIPSE-388-it-test.patch, MECLIPSE-388.patch, MECLIPSE-388.patch
>
>
> Currently plugin sorts artifacts on its own (alphabetic order???) because the order of dependencies that comes from maven is not reliable (random?). This breaks tests that use JBoss Embedded which works under maven surefire plugin because it still puts dependencies that came first at the beginning of the classpath). Apparently not all classpath elements are put in random order. At least I get the first ones listed in dependencies also first in the classpath (can be seen as ${surefire.test.class.path} and in target/surefire-reports/TEST-TestSuite.xml).
> While there is not much we can do for maven eclipse plugin a solution is on the way: MNG-1412. When maven 2.0.9 is released maven eclipse plugin can revert back to the default classpath order.
> Can we somehow schedule this?
> Another question: is there anyway to put certain dependencies in the first place except for renaming them so that alphabetic order does the job?

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira