You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by ha...@yahoo.com on 2006/02/02 21:28:27 UTC

[m2] Bug in Dependency Resolution?

I'm encountering an error with log4j. I have a
transitive dependency on log4j-1.2.13 in my Maven 2
plugin. However, it seems that when I run Maven 2 that
Maven 2 resolves into log4j 1.2.6 (possibly because of
another transitive dependency). This results in a
runtime error with my plugin as it can't find
"org/apache/log4j/xml/Log4jEntityResolver" (that class
is not part of log4j 1.2.6). When running debug then I
see the following:

[DEBUG]       log4j:log4j:jar:1.2.13 (removed - nearer
found: 1.2.6)

This looks to me like a bug in the dependency
resolution of Maven 2. Seems to think that 1.2.6 is a
higher version than 1.2.13?

Any ideas?

Thanks,
Chris



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


Re: [m2] Bug in Dependency Resolution?

Posted by Carlos Sanchez <ca...@apache.org>.
nearest in the graph of dependencies

--a
   |--b
   |   `-- c 1.1
   `--c 1.0

The nearest c from a is 1.0 (depth = 1) while 1.1 has depth = 2

nearest != latest version

On 2/2/06, haginow2001-nabble@yahoo.com <ha...@yahoo.com> wrote:
> Thanks for the comment, but very unhelpful. I know
> about that document for a long time ...
>
> I would expect that the nearest dependency is 1.2.13
> and not 1.2.6 ... if not, then please explain.
>
> Chris
>
>
> --- Carlos Sanchez <ca...@apache.org> wrote:
>
> > It doesn't work like that
> > Check Dependency mediation in
> >
> http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html
> >
> > On 2/2/06, haginow2001-nabble@yahoo.com
> > <ha...@yahoo.com> wrote:
> > > I'm encountering an error with log4j. I have a
> > > transitive dependency on log4j-1.2.13 in my Maven
> > 2
> > > plugin. However, it seems that when I run Maven 2
> > that
> > > Maven 2 resolves into log4j 1.2.6 (possibly
> > because of
> > > another transitive dependency). This results in a
> > > runtime error with my plugin as it can't find
> > > "org/apache/log4j/xml/Log4jEntityResolver" (that
> > class
> > > is not part of log4j 1.2.6). When running debug
> > then I
> > > see the following:
> > >
> > > [DEBUG]       log4j:log4j:jar:1.2.13 (removed -
> > nearer
> > > found: 1.2.6)
> > >
> > > This looks to me like a bug in the dependency
> > > resolution of Maven 2. Seems to think that 1.2.6
> > is a
> > > higher version than 1.2.13?
> > >
> > > Any ideas?
> > >
> > > Thanks,
> > > Chris
> > >
> > >
> > >
> > >
> >
> ---------------------------------------------------------------------
> > > 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
>
>

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


Re: [m2] Bug in Dependency Resolution?

Posted by ha...@yahoo.com.
Thanks for the comment, but very unhelpful. I know
about that document for a long time ...

I would expect that the nearest dependency is 1.2.13
and not 1.2.6 ... if not, then please explain.

Chris


--- Carlos Sanchez <ca...@apache.org> wrote:

> It doesn't work like that
> Check Dependency mediation in
>
http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html
> 
> On 2/2/06, haginow2001-nabble@yahoo.com
> <ha...@yahoo.com> wrote:
> > I'm encountering an error with log4j. I have a
> > transitive dependency on log4j-1.2.13 in my Maven
> 2
> > plugin. However, it seems that when I run Maven 2
> that
> > Maven 2 resolves into log4j 1.2.6 (possibly
> because of
> > another transitive dependency). This results in a
> > runtime error with my plugin as it can't find
> > "org/apache/log4j/xml/Log4jEntityResolver" (that
> class
> > is not part of log4j 1.2.6). When running debug
> then I
> > see the following:
> >
> > [DEBUG]       log4j:log4j:jar:1.2.13 (removed -
> nearer
> > found: 1.2.6)
> >
> > This looks to me like a bug in the dependency
> > resolution of Maven 2. Seems to think that 1.2.6
> is a
> > higher version than 1.2.13?
> >
> > Any ideas?
> >
> > Thanks,
> > Chris
> >
> >
> >
> >
>
---------------------------------------------------------------------
> > 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: [m2] Bug in Dependency Resolution?

Posted by Carlos Sanchez <ca...@apache.org>.
It doesn't work like that
Check Dependency mediation in
http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html

On 2/2/06, haginow2001-nabble@yahoo.com <ha...@yahoo.com> wrote:
> I'm encountering an error with log4j. I have a
> transitive dependency on log4j-1.2.13 in my Maven 2
> plugin. However, it seems that when I run Maven 2 that
> Maven 2 resolves into log4j 1.2.6 (possibly because of
> another transitive dependency). This results in a
> runtime error with my plugin as it can't find
> "org/apache/log4j/xml/Log4jEntityResolver" (that class
> is not part of log4j 1.2.6). When running debug then I
> see the following:
>
> [DEBUG]       log4j:log4j:jar:1.2.13 (removed - nearer
> found: 1.2.6)
>
> This looks to me like a bug in the dependency
> resolution of Maven 2. Seems to think that 1.2.6 is a
> higher version than 1.2.13?
>
> Any ideas?
>
> Thanks,
> Chris
>
>
>
> ---------------------------------------------------------------------
> 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