Gradle等同于maven依赖项:list [英] Gradle equivalent to maven dependency:list

查看:6
本文介绍了Gradle等同于maven依赖项:list的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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的依赖关系报告为树形结构,因此很难清楚地看到最终使用的版本。

是否有命令或其他东西可以提供此已解析依赖项列表,但不包含树结构?

推荐答案

如果您在命令行(在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

这篇关于Gradle等同于maven依赖项:list的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆