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]

Reply via email to