How to resolve the path to a jar in the dependency tree
ClassNotFoundException
.
The missing class 开发者_开发技巧is part of a jar which is an indirect dependency (i.e. dependency of a dependency) and is not directly referred in my pom. Is there any way to determine the path to the jar in my dependency tree?Use mvn dependency:tree
: it will print a tree with all the dependencies. Once done, search the tree for the missing jar to see where it comes from.
Eclipse's POM editor has a useful dependency hierarchy view. Another way to test these things is to delete bits of your .m2/repository
directory (after backing it up) and seeing if it then also fails to build on your own machine.
精彩评论