maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Ryan <sc...@theryansplace.com>
Subject Re: Transitive Dependency resolution is degrading the versions of my dependencies (i.e. commons-collections 3.2 down to 2.1)
Date Fri, 02 Mar 2007 13:40:31 GMT
When I did that I got all sorts of null pointer exceptions trying te  
resolve things like 1.6 to 1.7 .   I will try again today with  
various combinations and see what I can get to work.  It seems like a  
pain to have to double check the transitive dependencies of every  
artifact that I use plus every artifact that they use etc.  That was  
one of the pains of Maven 1 we had hoped to avoid.  I will try to use  
the [] notation and see how that works for me.

Thanks for all the suggestions.

Scott
On Mar 1, 2007, at 10:02 PM, Wayne Fay wrote:

> Did you use the [...] notation in your versions?
>
> Wayne
>
> On 3/1/07, Scott Ryan <scott@theryansplace.com> wrote:
>> Yes I did make entries in my master parent for all the versions of
>> software that we use but it is ignoring that as well.
>>
>> Scott
>> On Mar 1, 2007, at 9:36 PM, Wayne Fay wrote:
>>
>> > Have you tried using <dependencyManagement/> node in your parent  
>> pom
>> > to "lock down" the versions you will accept ie:
>> >
>> > <dependencyManagement>
>> >  <dependencies>
>> >    <dependency>
>> >      <groupId>net.sf.saxon</groupId>
>> >      <artifactId>saxon</artifactId>
>> >      <version>[8.7]</version>
>> >    </dependency>
>> >  </dependencies>
>> > </dependencyManagement>
>> >
>> > Of course, this requires that you list all your dependencies  
>> (even the
>> > transitive ones) in this node and update versions etc here, but at
>> > least it centralizes things a bit...
>> >
>> > Wayne
>> >
>> > On 3/1/07, Scott Ryan <scott@theryansplace.com> wrote:
>> >> I am working with Maven on some fairly complex projects and I now
>> >> understand that the dependency resolution is done via a "nearness"
>> >> process rather than based on the highest compatible version.  I  
>> have
>> >> recently upgraded from Maven 2.04. to 2.0.5 which did not fix my
>> >> issue but did change the behavior a little.  Here is my problem:
>> >>
>> >> I have a number of framework libraries I am using including  
>> Spring,
>> >> Hibernate, etc.  I have an artifact that uses Hibernate at the  
>> latest
>> >> version which in turn uses Commons-Collections 3.1.  In that same
>> >> project I use some new methods out of Commons-Collections 3.2 so I
>> >> have that referenced in my pom.xml as well.  The issue comes  
>> when i
>> >> try to use that artifact and another artifact that uses Hibernate.
>> >> Depending on the order that I include those dependencies I  
>> sometimes
>> >> get 3.1 and sometimes 3.2.  If I get 3.1 my code breaks at run  
>> time.
>> >> Now this evening I included another artifact that is using a
>> >> framework that apparently used Commons-Collections 2.1 and now  
>> my War
>> >> includes Commons-Collections 2.1 and that breaks everything.  I  
>> can
>> >> see the resolution of the libraries in the -X output of the mvn
>> >> command but no idea how to fix it or why it is happening.  I  
>> know I
>> >> can fix the issue by including every artifact that is used by  
>> every
>> >> other artifact in my pom.xml at the version I want but that  
>> seems to
>> >> defeat the whole purpose of transitive dependencies.  There are  
>> also
>> >> cases where a dependency may read 1.7) and 1.6 and I get null
>> >> pointers during my builds even though 1.7 should be upwardly
>> >> compatible with 1.6.
>> >>
>> >> So here are my questions:
>> >>
>> >> Why was the "nearness" process chosen and what does it buy me over
>> >> using the most current compatible version out of my entire  
>> dependency
>> >> list?
>> >> How can I insure that I don't get my dependencies randomly  
>> downgraded
>> >> so that I get runtime errors with no indication until I use the
>> >> application?
>> >> Is there a report or process I can use to locate these  
>> downgrades so
>> >> I can deal with them during build time and not runtime?
>> >>
>> >> Am I missing something or doing something wrong that is causing  
>> this
>> >> behavior?
>> >>
>> >> Thanks for all the support and a great open source offering.  I  
>> hope
>> >> you can educate me so I can deal with this issue and teach others.
>> >>
>> >>
>> >> Scott Ryan
>> >> CTO Soaring Eagle L.L.C.
>> >> Denver, Co. 80129
>> >> www.soaringeagleco.com
>> >> www.theryansplace.com
>> >> (303) 263-3044
>> >> scott@theryansplace.com
>> >>
>> >>
>> >>
>> >
>> >  
>> ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> > For additional commands, e-mail: users-help@maven.apache.org
>> >
>>
>> Scott Ryan
>> CTO Soaring Eagle L.L.C.
>> Denver, Co. 80129
>> www.soaringeagleco.com
>> www.theryansplace.com
>> (303) 263-3044
>> scott@theryansplace.com
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>

Scott Ryan
CTO Soaring Eagle L.L.C.
Denver, Co. 80129
www.soaringeagleco.com
www.theryansplace.com
(303) 263-3044
scott@theryansplace.com



Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message