How to get maven dependency of a maven project in command line.

Steps-

In windows, Go inside of the folder that pom.xml exists

Then type

mvn dependency:tree --log-file log.txt

Generated log.txt file contains all the dependency information.

[INFO] +- org.testng:testng:jar:7.3.0:compile
[INFO] | +- com.beust:jcommander:jar:1.78:compile
[INFO] | +- org.apache.ant:ant:jar:1.10.3:compile
[INFO] | | \- org.apache.ant:ant-launcher:jar:1.10.3:compile
[INFO] | +- junit:junit:jar:4.12:compile
[INFO] | | \- org.hamcrest:hamcrest-core:jar:1.3:compile
[INFO] | +- com.google.inject:guice:jar:no_aop:4.2.2:compile
[INFO] | | +- javax.inject:javax.inject:jar:1:compile
[INFO] | | \- aopalliance:aopalliance:jar:1.0:compile
[INFO] | \- org.yaml:snakeyaml:jar:1.21:compile
[INFO] +- org.projectlombok:lombok:jar:1.18.20:compile

Image-

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store