I think that the compile scope commons-collections dependency is coming from
somewhere else. (Mainly because I don't think that this type of bug wouldn't
have been found already.)

What I would do is trying to recreate this in a small test case. If you can
do that, it will be easy for someone else to reproduce and you can file a
ticket attaching this case. If you cannot recreate, it's something in your
project(s) that's "wrong". That would at least rule out the bug possibility,
but wouldn't solve your main problem.

I'm not sure if m2e uses the same logic for showing the dependency tree, or
if it uses aether directly. If it uses Aether, it could be a good tool to
see where commons-collections is coming from. I would try this regardless as
it's my main tool for investigating these types of dependency tree things.

/Anders

On Tue, May 24, 2011 at 10:47, Yann Albou <[email protected]>wrote:

> maven 3.0.3
>
> I have a parent company pom that defines a dependency as provided.
>
> This provided dependency has a number of dependencies itself, among which
> commons-collections:commons-collections.
>
> My understanding is that all dependencies on which the provided dependency
> depends on should also be provided.
>
> But that's not what's happening in my case.
>
> What I end up with is commons-collections:commons-collections being pulled
> as compile instead of provided in a ear project (I'm running mvn clean
> install -X to check the dependencies).
>
> Have tried to defined the provided dependency directly in the ear project
> itself instead of the company pom, but no luck either.
>
> I see the provided dependency twice.
> One time with all its dependencies as provided and another time the
> provided
> dependency with only commons-collections:commons-collections as compile
> dependency.
>
> I have also seen in another project that the -X didn't show the correct
> list
> of dependencies.
> Instead I had to search through the poms to find out which one was pulling
> a
> compile dependency that should have been provided instead.
>
> Anybody an idea?
>
> --
> View this message in context:
> http://maven.40175.n5.nabble.com/maven-3-provided-dependency-pulls-a-compile-dependency-tp4421451p4421451.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to