"mvn dependency:tree" - "verbose" 输出是否有等效项?

"mvn dependency:tree" - is there an equivalent available for "verbose" output?

我有一个用例,我们想知道 Maven 项目每个依赖树获得的所有版本,即使它们被省略了。

根据 maven-dependency-plugin 文档,"verbose" 选项自 Maven 3 以来已停用,"tree" Mojo 的依赖目标不再能够显示省略的依赖项。

我正在使用 Maven 3.5.0 并尝试使用额外安装的 Maven 2.x,但这会产生与 Java 8 个应用程序的兼容性问题。

有没有办法在 Maven 3 中获得详细的依赖树输出?

你可以使用

mvn dependency:tree -X

其中 produces the debug output.

另外在documentation中说明verbose-

Notice this feature actually uses Maven 2 algorithm and may give wrong results when used with Maven 3.

编辑:正如 Brad 在 , the verbose flag has been reintroduced for the 3.2.0 发布和进一步发布中指出的那样。