[英]How to find a dependency in maven, dependency:tree doesn't work
在一个有效的 pom 中,我看到
<plugin>
<artifactId>maven-site-plugin</artifactId>
<version>3.3</version>
<executions>
<execution>
<id>default-site</id>
<phase>site</phase>
<goals>
<goal>site</goal>
</goals>
<configuration>
<outputDirectory>/home/tatiana/repos/selenium-tests/masbuilder-tests/target/site</outputDirectory>
<reportPlugins>
<reportPlugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
</reportPlugin>
</reportPlugins>
</configuration>
</execution>
<execution>
<id>default-deploy</id>
<phase>site-deploy</phase>
<goals>
<goal>deploy</goal>
</goals>
<configuration>
<outputDirectory>/home/tatiana/repos/selenium-tests/masbuilder-tests/target/site</outputDirectory>
<reportPlugins>
<reportPlugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
</reportPlugin>
</reportPlugins>
</configuration>
</execution>
</executions>
<configuration>
<outputDirectory>/home/tatiana/repos/selenium-tests/masbuilder-tests/target/site</outputDirectory>
<reportPlugins>
<reportPlugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
</reportPlugin>
</reportPlugins>
</configuration>
</plugin>
但是我不使用 maven-site-plugin 并且当我执行 mvn dependency:tree
然后我在输出中没有看到任何提及 maven-site-plugin 或“site”关键字或 maven-project-info-reports-plugin 的内容。
mvn 依赖项相同:tree -Dverbose
问题是我想删除的有效 POM 中的错误:此处不允许使用元素报告插件
也许它与我使用的maven-surefire-plugin有关?
如果树中的较高版本已经存在依赖关系,则所有jruby-complete的依赖关系都在树中以较浅的深度列出,因为依赖关系树mojo会修剪较低级别的依赖关系。
您可以使用mvn dependency:tree -Dverbose=true
来显示被忽略的依赖关系。
详细可能不适用于 Maven 3。还有另一个来自不同问题的解决方案,使用depgraph-maven-plugin :
mvn com.github.ferstl:depgraph-maven-plugin:3.3.0:graph -DrepeatTransitiveDependenciesInTextGraph -DshowVersions -DgraphFormat=text -DshowGroupIds -DshowConflicts -DshowDuplicates
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.