[英]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.