简体   繁体   中英

Find which dependency in pom.xml include the specified jar

There are multiple modules in one web project and the project uses maven to manage the jars. I am curious that how to find which dependency in pom.xml the jar belongs to ? for example. in ROOT.war/WEB-INF/lib/xxx.jar

I want to find the dependency A in pom.xml which includes the jar. dependency A -> denpendency B -> denpendency xxx (xxx.jar)

mvn dependency:tree will print out a tree of how your dependencies are being resolved.

You can search that output for the jar you are interested in.

There's probably other ways to work it out, but I tend to just pick a small set of generally useful commands and rely on them for most tasks

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM