You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Christian Mouttet <ch...@it2media.de> on 2006/03/06 15:32:02 UTC

dependencies - equals artifacts & diff versions

Hi,

how does the dependency management handle equals artifacts with different 
versions? I thought that the newer version wins but following part of my 
'maven -X'-log shows:

[DEBUG]       commons-collections:commons-collections:jar:2.1 (removed - 
nearer found: 2.1.1)

Maybe the sorting of version numbers with different lengths doesn't work 
properly.


Regards

-chris


**********************************************************************
Diese E-Mail wurde auf Viren ueberprueft.
mailsweeper@it2media.de
**********************************************************************

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: dependencies - equals artifacts & diff versions

Posted by Christian Mouttet <ch...@it2media.de>.
Thank's Brett. I read over these passage.

Using the newer library versions can be forced by defining it in the projects' 
pom.

-chris

Am Montag, 6. März 2006 15:53 schrieb Brett Porter:
> nearer != newer.
>
> It resolves the one closest to your pom in the dependency graph.
>
> http://maven.apache.org/guides/introduction/introduction-to-dependency-mech
>anism.html
>
> Maven 2.1 will provide a newer resolver. It can be achieved in Maven
> 2.0 by using ranges.
>
> - Brett
>
> On 3/7/06, Christian Mouttet <ch...@it2media.de> wrote:
> > sorry I forgot something
> >
> > > Hi,
> > >
> > > how does the dependency management handle equals artifacts with
> > > different versions? I thought that the newer version wins but following
> > > part of my 'maven -X'-log shows:
> > >
> > > [DEBUG]       commons-collections:commons-collections:jar:2.1 (removed
> > > - nearer found: 2.1.1)
> > >
> > > Maybe the sorting of version numbers with different lengths doesn't
> > > work properly.
> >
> > I'm bundling a web application and I can find commons-collections-2.1.jar
> > in WEB-INF/lib. That's what I don't understand.
> >
> > > Regards
> > >
> > > -chris


**********************************************************************
Diese E-Mail wurde auf Viren ueberprueft.
mailsweeper@it2media.de
**********************************************************************

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: dependencies - equals artifacts & diff versions

Posted by Brett Porter <br...@gmail.com>.
nearer != newer.

It resolves the one closest to your pom in the dependency graph.

http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html

Maven 2.1 will provide a newer resolver. It can be achieved in Maven
2.0 by using ranges.

- Brett

On 3/7/06, Christian Mouttet <ch...@it2media.de> wrote:
> sorry I forgot something
>
> > Hi,
> >
> > how does the dependency management handle equals artifacts with different
> > versions? I thought that the newer version wins but following part of my
> > 'maven -X'-log shows:
> >
> > [DEBUG]       commons-collections:commons-collections:jar:2.1 (removed -
> > nearer found: 2.1.1)
> >
> > Maybe the sorting of version numbers with different lengths doesn't work
> > properly.
>
> I'm bundling a web application and I can find commons-collections-2.1.jar in
> WEB-INF/lib. That's what I don't understand.
>
> >
> >
> > Regards
> >
> > -chris
>
>
> **********************************************************************
> Diese E-Mail wurde auf Viren ueberprueft.
> mailsweeper@it2media.de
> **********************************************************************
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: dependencies - equals artifacts & diff versions

Posted by Christian Mouttet <ch...@it2media.de>.
sorry I forgot something

> Hi,
>
> how does the dependency management handle equals artifacts with different
> versions? I thought that the newer version wins but following part of my
> 'maven -X'-log shows:
>
> [DEBUG]       commons-collections:commons-collections:jar:2.1 (removed -
> nearer found: 2.1.1)
>
> Maybe the sorting of version numbers with different lengths doesn't work
> properly.

I'm bundling a web application and I can find commons-collections-2.1.jar in 
WEB-INF/lib. That's what I don't understand.

>
>
> Regards
>
> -chris


**********************************************************************
Diese E-Mail wurde auf Viren ueberprueft.
mailsweeper@it2media.de
**********************************************************************

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org