6

dependency:list prints entire tree in flat format.

What can I do so it only gives first level only ?

Just to illustrate with dependency:tree

[INFO] 
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ abc-service ---
[INFO] xx.xyz.zbc:abc-service:jar:1.82-SNAPSHOT
[INFO] +- io.swagger.core.v3:swagger-annotations:jar:2.1.2:compile
[INFO] +- org.apache.commons:commons-compress:jar:1.14:test
[INFO] +- org.xmlmatchers:xml-matchers:jar:1.0-RC1:test
[INFO] |  +- xmlunit:xmlunit:jar:1.6:test
[INFO] |  \- net.sf.saxon:Saxon-HE:jar:9.4:test
[INFO] |     +- org.jdom:jdom:jar:1.1:test
[INFO] |     +- xom:xom:jar:1.2.5:test
[INFO] |     |  \- xerces:xercesImpl:jar:2.8.0:test
[INFO] |     \- xml-resolver:xml-resolver:jar:1.2:test

I just want

[INFO] +- io.swagger.core.v3:swagger-annotations:jar:2.1.2:compile
[INFO] +- org.apache.commons:commons-compress:jar:1.14:test
[INFO] +- org.xmlmatchers:xml-matchers:jar:1.0-RC1:test

1 Answer 1

10

From what I can read in the documentation.

https://maven.apache.org/plugins/maven-dependency-plugin/list-mojo.html

mvn dependency:list -DexcludeTransitive=true

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.