maven dependency:list 只是第一级

maven dependency:list just first level

dependency:list 以平面格式打印整个树。

我该怎么做才能只给出第一级?

只是为了说明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

我只要

[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

根据我在文档中可以阅读的内容。

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

mvn dependency:list -DexcludeTransitive=true