maven依赖:只列出第一级



依赖项:列表以平面格式打印整个树。

我能做些什么,让它只提供第一级?

只是用依赖关系来说明:树

[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

相关内容

  • 没有找到相关文章

最新更新