maven - 可视化所有 Maven 阶段、目标、配置文件和插件

标签 maven

有没有办法打印在给定的 Maven 运行期间运行的所有阶段、目标、配置文件和插件的图形或简单图表?似乎这有助于全面了解正在发生的事情。我知道您可以通过 -X 打开 Debug模式,但我正在寻找更简洁的东西。专门显示哪些插件在哪些阶段运行,但显示所有目标、阶段和配置文件也很有用。

最佳答案

您可以使用 buildplan-maven-plugin ,其目标是 list-phase 用于在生命周期阶段显示插件执行。

mvn fr.jcgay.maven.plugins:buildplan-maven-plugin:list-phase

您可以为特定配置文件运行此命令:只需 tack on -P profile-name .

空 Maven 项目的示例输出:
process-resources ---------------------------------------------------
    + maven-resources-plugin | default-resources     | resources
compile -------------------------------------------------------------
    + maven-compiler-plugin  | default-compile       | compile
process-test-resources ----------------------------------------------
    + maven-resources-plugin | default-testResources | testResources
test-compile --------------------------------------------------------
    + maven-compiler-plugin  | default-testCompile   | testCompile
test ----------------------------------------------------------------
    + maven-surefire-plugin  | default-test          | test
package -------------------------------------------------------------
    + maven-jar-plugin       | default-jar           | jar
install -------------------------------------------------------------
    + maven-install-plugin   | default-install       | install
deploy --------------------------------------------------------------
    + maven-deploy-plugin    | default-deploy        | deploy

关于maven - 可视化所有 Maven 阶段、目标、配置文件和插件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41493359/

相关文章:

java - 为什么 DL4J NLP 示例没有使用 Maven 获取 jar?

java - 与资源一起部署war文件

java - 使用命令行添加 Maven 依赖

java - IntelliJ - IntelliJ 运行配置忽略 maven.config 和 jvm.config 文件

maven - maven 如何在构建 GWT 模块的依赖项构建时强制使用受支持的 GWT 源代码?

java - Travis CI 不使用 pom.xml 中提供的额外 Maven 存储库

Maven 从远程父级继承

java - IBM Watson Java SDK - 4.0.0 - com.ibm.watson.developer_cloud.util.RetryRunner 丢失

多个项目的 Maven 依赖项与依赖项管理

java - 在pom.xml 和settings.xml 中覆盖Maven 属性的顺序是什么?