Java 如何在不阅读源代码的情况下找到maven插件的默认目标?

Java 如何在不阅读源代码的情况下找到maven插件的默认目标?,java,maven,maven-plugin,Java,Maven,Maven Plugin,给定一个maven插件,是否有任何命令可用于查看其MOJO的默认阶段/目标绑定?我意识到,如果我查看源代码或生成的javadoc,我可以找到注释。然而,这似乎太间接了 我尝试了:help目标,但这也没有给我任何额外的信息 以美国为例。这个插件有14个不同的可访问目标。然而,我不需要为要生成的javadocs显式地分配阶段或目标 是否有任何工具可用于查看哪些目标默认分配给哪个阶段(对于任何插件,而不仅仅是javadoc插件)?如果您查看以下内容: 属性: Requires a Maven proj

给定一个maven插件,是否有任何命令可用于查看其MOJO的默认阶段/目标绑定?我意识到,如果我查看源代码或生成的javadoc,我可以找到注释。然而,这似乎太间接了

我尝试了
:help
目标,但这也没有给我任何额外的信息

以美国为例。这个插件有14个不同的可访问目标。然而,我不需要为要生成的javadocs显式地分配阶段或目标

是否有任何工具可用于查看哪些目标默认分配给哪个阶段(对于任何插件,而不仅仅是javadoc插件)?

如果您查看以下内容:

属性:

Requires a Maven project to be executed.
Requires dependency resolution of artifacts in scope: compile.
The goal is thread-safe and supports parallel builds.
Since version: 2.0.
Invokes the execution of the lifecycle phase generate-sources prior to executing itself.
Requires a Maven project to be executed.
Requires dependency resolution of artifacts in scope: runtime.
The goal is thread-safe and supports parallel builds.
Binds by default to the lifecycle phase: package.
最后一行将为您提供此信息

还是像这样

属性:

Requires a Maven project to be executed.
Requires dependency resolution of artifacts in scope: compile.
The goal is thread-safe and supports parallel builds.
Since version: 2.0.
Invokes the execution of the lifecycle phase generate-sources prior to executing itself.
Requires a Maven project to be executed.
Requires dependency resolution of artifacts in scope: runtime.
The goal is thread-safe and supports parallel builds.
Binds by default to the lifecycle phase: package.
最后一行显示了默认的生命周期阶段

除上述内容外,您还可以在生命周期中使用绑定文档,如下所示:

您还可以通过以下方式在命令行上获取这些信息:

mvn help:describe -DgroupId=org.apache.maven.plugins -DartifactId=maven-jar-plugin  -Ddetail
您将获得如下输出(以及更多输出):

在我看来,这就是你要找的