Maven提供了一种显示所有已解析依赖项列表的可能性:mvn dependency:list
[INFO] The following files have been resolved:
[INFO] org.apache.geronimo.specs:geronimo-jta_1.1_spec:jar:1.1.1:compile
[INFO] org.hibernate:hibernate-core:jar:5.2.3.Final:compile
[INFO] javax.inject:javax.inject:jar:1:compile
[INFO] javax.annotation:jsr250-api:jar:1.0:compile
[INFO] org.javassist:javassist:jar:3.20.0-GA:compile
[INFO] org.jboss:jandex:jar:2.0.0.Final:compile
[INFO] com.fasterxml:classmate:jar:1.3.0:compile
[INFO] org.hibernate.common:hibernate-commons-annotations:jar:5.0.1.Final:com:compile
[INFO] javax.el:el-api:jar:2.2:compile
[INFO] org.hibernate.javax.persistence:hibernate-jpa-2.1-api:jar:1.0.0.Final:compile
使用gradle我得到的所有报告都是依赖尝试,没有清楚地告诉我,最终使用了哪个版本。 是否有一个命令或某些内容为我提供了没有树结构的已解析依赖项的列表?
答案 0 :(得分:0)
如果您在命令行执行followin(在您的gradle项目目录中)
gradle tasks
您会在列表中看到以下内容
Help tasks
----------
dependencies - Displays all dependencies declared in root project 'xyz'.
dependencyInsight - Displays the insight into a specific dependency in root project 'xyz'
更多信息here