« Return to Thread: [Proposal] Pom Code Style (WAS svn commit: r670264 - /maven/plugins/trunk/maven-site-plugin/pom.xml)

RE: [Proposal] Pom Code Style (WAS svn commit: r670264 - /maven/plugins/trunk/maven-site-plugin/pom.xml)

by Brian E Fox :: Rate this Message:

Reply to Author | View in Thread

Sorting the dependencies purely for aesthetic reasons is a bad idea given the current first-wins scenario.

-----Original Message-----
From: John Casey [mailto:jdcasey@...]
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: dev-unsubscribe@...
> For additional commands, e-mail: dev-help@...
>

--
John Casey
Developer, PMC Member - Apache Maven (http://maven.apache.org)
Blog: http://www.ejlife.net/blogs/buildchimp/


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...

 « Return to Thread: [Proposal] Pom Code Style (WAS svn commit: r670264 - /maven/plugins/trunk/maven-site-plugin/pom.xml)