Maven Dependency Tree

Asked

Viewed 133 times

0

I’m having some version conflict issues in my project dependencies and command mvn dependency:tree is not enough, because I have many dependencies and it is difficult to identify which dependencies there is the dependency of the conflicting library. Is there a more objective command?

1 answer

1


According to the Maven documentation, there is the command:

mvn dependency:tree -Dverbose -Dincludes=<biblioteca>

They will specifically return dependencies that depend on the informed library.

An important detail for this situation is the attribute -Dverbose, that instructs the dependency tree to display conflicting dependencies. That is, you will have information like omitted for conflict with 2.0 that will help to find conflicts. However, this attribute is only usable in Maven 2.0, because in Maven version 3.0 the use of -Dverbose can result in some problems according to documentation:

verbose Whether to include omitted nodes in the Serialized dependency Tree. Notice this Feature Actually uses Maven 2 Algorithm and may Give Wrong Results when used with Maven 3.

That’s why when executing the full command above in Maven 2.0 you can notice the message:

Using Maven 2 dependency Tree to get verbose output, which may be inconsistent with actual Maven 3 Resolution

Browser other questions tagged

You are not signed in. Login or sign up in order to post.