Hi Guys... er, People Just brainstorming here. Perhaps it could be flagged as a build stopping error if a dependency on more than one 'major' version is found and just a warning if multiple version of the same 'major' versions are referenced.
Depends found on 3.11 and 4.2 => error. Depends found on 3.2, 3.1.6, 3.2.0.5 => use 3.2, warn (optional) This would reinforce the idea that 'breaking' revisions requires a 'major' version number change. <!-- Frank Gorham-Engard → "Be kinder than necessary. Everyone is fighting some kind of battle." -----Original Message----- From: Ron Wheeler [mailto:[email protected]] Sent: Sunday, August 15, 2010 4:13 PM To: Michael Chan Cc: [email protected] Subject: Re: how to resolve dependency version with newest? I am not sure that I agree with that method of operation. I like to be in control of the dependencies of an application. If we move to a new abc-1.3.jar, I want to know about it and I want to know why we are changing version and what level of testing needs to be done to specifically investigate the new release. Usually it is not a big deal but I want to change versions explicitly since B and C still have to work even tough it they only have been built and tested with the lower version.. The dependency hierarchy will show where conflicts arise so you can deal with it. Practically speaking, this is not too big an issue for us. We depend on 60 or so third party libraries. Ron On 15/08/2010 8:44 AM, Michael Chan wrote: > Hi Ron, > > Thanks for your reply. > > I know putting the required version in top level in pom > will work. But I don't want to "hard code" any specific > version in the top level pom. Let me illustrate by an > example what I want to achieve - > > Suppose my project A depends on project B and project C. > And project B and C depend on abc.jar, but different > versions > > B -> abc-1.1.jar > C -> abc-1.2.jar > > When I build project A, I want to get highest version of > abc.jar, in this case, it will be MAX(1,1, 1.2), so it is > 1.2. I can put the dependency abc-1.2.jar in my top level > pom. The problem is later my project A may depend on extra > projects, say project D, that in turns depend on > abc-1.3.jar. > > So I would like Maven to *dynamically* get the highest > version of abc.jar in the whole dependency tree (but not > necessary the latest one in the respository). > > How can I achieve this? > > Thanks. > > Michael > >> Newest measured how? >> >> Highest version? >> Are you trying to say "I don't care what version I get > as long as it is > the highest/latest available? > >> Just put the version that you want in your top level POM > and >> nearest-wins will get it. >> What exactly are you trying to achieve? >> Do you have a lot of different versions of an artifact > specified in your >> dependency tree? >> Ron >> On 12/08/2010 11:10 AM, Michael Chan wrote: >>> Hi, >> I am new to maven and currently using version 2.1. Seems >> it only supports the "nearest-wins" policy, how can I > use >> "newest-wins"? I googled and found this >> >> > http://docs.codehaus.org/display/MAVEN/Conflict+Resolvers >> is it already implemented? If no, any other solution? >> >> Thanks. >> >> Michael >> >> -------------------------------------- >> Get the new Internet Explorer 8 optimized for Yahoo! > JAPAN >> http://pr.mail.yahoo.co.jp/ie8/ >> >> > --------------------------------------------------------------------- >> To unsubscribe, e-mail: > [email protected] >> For additional commands, e-mail: > [email protected] >> > > -------------------------------------- > Get the new Internet Explorer 8 optimized for Yahoo! JAPAN > http://pr.mail.yahoo.co.jp/ie8/ > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
