You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Holger Hoffstätte (JIRA)" <ji...@codehaus.org> on 2006/08/30 14:15:49 UTC
[jira] Created: (MECLIPSE-152) Write .classpath with ordered
dependencies [incl. Patch]
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
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
[jira] Updated: (MECLIPSE-152) Write .classpath with ordered
dependencies [incl. Patch]
Posted by "Arnaud Heritier (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MECLIPSE-152?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Arnaud Heritier updated MECLIPSE-152:
-------------------------------------
Fix Version/s: (was: 2.5)
> 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
> Assignee: Kenney Westerhof
> 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
[jira] Commented: (MECLIPSE-152) Write .classpath with ordered
dependencies [incl. Patch]
Posted by "Philip Maher (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MECLIPSE-152?page=comments#action_74270 ]
Philip Maher commented on MECLIPSE-152:
---------------------------------------
I'd like to throw my support behind this idea and request that a transitive nearness ordering be added as well.
> 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
[jira] Updated: (MECLIPSE-152) Write .classpath with ordered
dependencies [incl. Patch]
Posted by "fabrizio giustina (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MECLIPSE-152?page=all ]
fabrizio giustina updated MECLIPSE-152:
---------------------------------------
Fix Version/s: 2.3
scheduling for 2.3: at this moment only osgi dependencies in manifest are sorted
> 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
> Assigned To: Kenney Westerhof
> Fix For: 2.3
>
> 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
[jira] Commented: (MECLIPSE-152) Write .classpath with ordered
dependencies [incl. Patch]
Posted by "Brian Fox (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MECLIPSE-152?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_101536 ]
Brian Fox commented on MECLIPSE-152:
------------------------------------
Note that in MECLIPSE-294, it is noted that this particular randomness causes problems in the unit tests.
> 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
> Assignee: Kenney Westerhof
> Fix For: 2.5
>
> 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
[jira] Updated: (MECLIPSE-152) Write .classpath with ordered
dependencies [incl. Patch]
Posted by "Brian Fox (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MECLIPSE-152?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Brian Fox updated MECLIPSE-152:
-------------------------------
Fix Version/s: (was: 2.4)
2.5
> 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
> Assignee: Kenney Westerhof
> Fix For: 2.5
>
> 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
[jira] Commented: (MECLIPSE-152) Write .classpath with ordered
dependencies [incl. Patch]
Posted by "Joerg Buchberger (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MECLIPSE-152?page=comments#action_85342 ]
Joerg Buchberger commented on MECLIPSE-152:
-------------------------------------------
As for the convenience of finding particular dependencies in eclipse build path more quickly, I'd suggest the following
SORT OPTIONS:
- by artifactId
- by groupId
However, I consider it more important to have the option to control CLASSPATH ORDER by sorting classpath entries
according to the order of dependencies as written in the POM. At least for runtime dependencies.
This would make it unnecessary to manually adjust classpath order in eclipse and reduce time for supporting
developers who are unexperienced or new to the project...
> 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
> Assigned To: Kenney Westerhof
> Fix For: 2.4
>
> 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
[jira] Commented: (MECLIPSE-152) Write .classpath with ordered
dependencies [incl. Patch]
Posted by "Max Bowsher (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MECLIPSE-152?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_115537 ]
Max Bowsher commented on MECLIPSE-152:
--------------------------------------
Ah, I admit I had not actually read this issue, I was going to comment on MECLIPSE-294, but then noticed that it had been closed as duplicate of this issue, so I followed the "duplicates" link and put my comment here instead.
Right. Having read this issue, I can see that whilst the committed fix solves the concerns of this issue, it does *not* fix the MECLIPSE-294 - so I'm going to unduplicate the two issues.
> 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
> Assignee: Arnaud Heritier
> Fix For: 2.5
>
> 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
[jira] Commented: (MECLIPSE-152) Write .classpath with ordered
dependencies [incl. Patch]
Posted by "Kenney Westerhof (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MECLIPSE-152?page=comments#action_77352 ]
Kenney Westerhof commented on MECLIPSE-152:
-------------------------------------------
You're right. I created a separate issue (MECLIPSE-170) to address the erroneous classpath issue.
As for the sorting on names, that's a really good idea since I'm always searching huge lists of dependencies to see if a jar is in there.
> 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
> Assigned To: Kenney Westerhof
> 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
[jira] Commented: (MECLIPSE-152) Write .classpath with ordered
dependencies [incl. Patch]
Posted by "Kenney Westerhof (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MECLIPSE-152?page=comments#action_76917 ]
Kenney Westerhof commented on MECLIPSE-152:
-------------------------------------------
Hm, actually, when I just disable the 'exported' flag on dependencies, the problem above goes away.
I tested reordering the dependencies but this doesn't work in eclipse 3.2. Even though the correct dep
is listed first, it still resolves to the second one. Weird.
> 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
[jira] Closed: (MECLIPSE-152) Write .classpath with ordered
dependencies [incl. Patch]
Posted by "Arnaud Heritier (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MECLIPSE-152?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Arnaud Heritier closed MECLIPSE-152.
------------------------------------
Resolution: Fixed
Fix Version/s: 2.5
Patch applied.
Dependencies are now sorted by artifactId instead to have a random sort.
It's only a wordaround, which could disappear in the feature if maven's core has a policy for dependencies order.
> 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
> Assignee: Arnaud Heritier
> Fix For: 2.5
>
> 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
[jira] Commented: (MECLIPSE-152) Write .classpath with ordered
dependencies [incl. Patch]
Posted by "Max Bowsher (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MECLIPSE-152?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_115515 ]
Max Bowsher commented on MECLIPSE-152:
--------------------------------------
Please re-open this issue. A sort by artifactId is not sufficient. Part of the reason for desiring sorting is so that the generated classpaths in the plugins own tests are consistent - some of these contain entries which differ only in classifier, so the classifier it is necessary that the classifier be included in the sort criteria.
For a full solution, the sort key should probably include groupId+artifactId+type+classifier - i.e. the criteria applied by Maven in DefaultArtifact.getDependencyConflictId().
> 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
> Assignee: Arnaud Heritier
> Fix For: 2.5
>
> 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
[jira] Updated: (MECLIPSE-152) Write .classpath with ordered
dependencies [incl. Patch]
Posted by "Holger Hoffstätte (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MECLIPSE-152?page=all ]
Holger Hoffstätte updated MECLIPSE-152:
---------------------------------------
Attachment: orderDependencies.patch
update to correctly sort upper/lowercase dependencies
> 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
[jira] Commented: (MECLIPSE-152) Write .classpath with ordered
dependencies [incl. Patch]
Posted by "Kenney Westerhof (JIRA)" <ji...@codehaus.org>.
[ 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