开发者

How to resolve the path to a jar in the dependency tree

I have a maven project which is running fine on my machine but not on another machine. Apparently in the other machine, mvn in unable to resolve the path to the jar, resulting in a 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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜