« 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 djencks :: Rate this Message:

Reply to Author | View in Thread


On Jun 30, 2008, at 9:21 AM, Brian E. Fox wrote:

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

I would rather have the dependency resolver throw an exception or emit  
a very obvious warning in the case where it has to use the order of  
dependencies in the top level pom to decide which version to use, and  
have the easy ability to sort the dependencies.  I've seen too many  
projects with duplicate dependencies because there are a hundred or so  
in random order.

thanks
david jencks

>
>
> -----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@...
>


---------------------------------------------------------------------
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)