I understand your concerns, but the same issue can happen when adding or removing a dependency, not just reordering. I would rather recommend that people rely on dependency management to control transitive versions than rely on the order in the pom. Then you should be able to organize deps in your pom anyway you want.

Brian E. Fox wrote:
Sorting the dependencies purely for aesthetic reasons is a bad idea given the 
current first-wins scenario.

-----Original Message-----
From: John Casey [mailto:[EMAIL PROTECTED] Sent: Monday, June 30, 2008 9:56 AM
To: Maven Developers List
Subject: Re: [Proposal] Pom Code Style (WAS svn commit: r670264 - 
/maven/plugins/trunk/maven-site-plugin/pom.xml)

Please keep in mind that the ordering of dependencies can (in some cases) change which version of a particular transitive dependency is used. If two direct dependencies both reference a third dependency - but using different versions - then the current resolution technique keeps the first one encountered, iff the two references happen at the same "level" of transitivity (distance from the current POM). Therefore, simply alphabetizing the dependencies list could change the transitive dependency list used for your build.

-john

Benjamin Bentmann wrote:
Paul Gier wrote:

Anyway, I definitely like the idea of a pom plugin to do "pom:reformat" or "pom:reorder" and maybe I can add a parameter about sorting the dependencies.
Instead of a parameter, I believe sorting the dependencies should be a distinct mojo. Otherwise, how to handle the use case of only sorting dependencies, i.e. neither reformat nor reorder all the rest?


Benjamin

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to