[ http://jira.codehaus.org/browse/MECLIPSE-152?page=comments#action_76875 ] 
            
Kenney Westerhof commented on MECLIPSE-152:
-------------------------------------------

Crap. I wrote a few Kb and accidently closed the window. I hate web-guis.

Short story:

continuum-release depends on:
* maven-project 2.0.4
* maven-release-plugin, which depends on maven-project 2.0

In eclipse, maven-release-plugin is listed before maven-project-2.0.4.jar.

Due to an API change (ProjectSorter added another exception in 2.0.4), I get an 
error in eclipse,
because the code catches the exception defined in 2.0.4 but eclipse sees the 
implementation
from 2.0 which doesn't throw that.

So I suggest we ONLY support ordering for transitive dependencies. However, 
there are a few options:

* sort projects by transitive dependencies, so that the correct version is 
resolved. This is impossible, because two projects could be considered to be 
listed before eachoter:

MAIN depends on A and B.
A depends on C 1.0 and D 1.1
B depends on C 1.1 and D 1.0.
MAIN depends on C 1.0 and D 1.0.

No way to order this properly, A needs to come before B because of C, and B 
needs to come before A because of D.

* Simplest solution: do NOT export any dependencies, and list all transitive 
dependencies explicitly. This is done already for
  non-workspace dependencies, but should also be done for workspace project 
references.

I had some hybrid solutions but the above cover the extremes.

> Write .classpath with ordered dependencies [incl. Patch]
> --------------------------------------------------------
>
>                 Key: MECLIPSE-152
>                 URL: http://jira.codehaus.org/browse/MECLIPSE-152
>             Project: Maven 2.x Eclipse Plugin
>          Issue Type: Improvement
>    Affects Versions: 2.2
>         Environment: Windowz XP, eclipse 3.2
>            Reporter: Holger Hoffstätte
>         Attachments: orderDependencies.patch, orderDependencies.patch
>
>
> Related to my comment in MNG-1412 - I decided to take a quick stab at the 
> eclipse plugin and voilá! Ordered dependencies in the written .classpath. 
> This is only a prototype (my first attempt at maven development) and could 
> serve as basis for other orderings like groupId, transitive nearness etc.
> Initially I wanted to make IdeDependency comparable (similar to MECLIPSE-150 
> which added proper equals) but having multiple Comparators seemed better for 
> extensibility.
> It worked right away, does exactly what I want (ordering by artifactId) and 
> has minimal impact. I am not familiar with the maven codebase so I hope this 
> is the right place to do the actual ordering before writing; obviously it 
> should observe a property like -DorderDependencies=artifactId or something 
> similar. The patch is against svn r425750 (2006-08-30). Currently no testcase 
> but if someone tells me how to add/read an orderDependencies property I might 
> add one.
> Comments welcome.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira


Reply via email to