前言

  • Apache Maven 3.5.0
  • OS: Windows 7, v.6.1, x86_64 / win32
  • org.apache.maven.plugins:maven-help-plugin:3.2.0
  • http://maven.apache.org/plugins/maven-help-plugin/index.html

Goals Overview

The Help Plugin has 7 goals:

  • help:active-profiles lists the profiles which are currently active for the build.
  • help:all-profiles lists the available profiles under the current project.
  • help:describe describes the attributes of a Plugin and/or a Mojo (Maven plain Old Java Object).
  • help:effective-pom displays the effective POM as an XML for the current build, with the active profiles factored in. If verbose, a
    comment is added to each XML element describing the origin of the
    line.
  • help:effective-settings displays the calculated settings as an XML for the project, given any profile enhancement and the inheritance of
    the global settings into the user-level settings.
  • help:evaluate evaluates Maven expressions given by the user in an interactive mode.
  • help:system displays a list of the platform details like system properties and environment variables.

help:effective-pom

cmd> mvn help:effective-pom
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building module1 1.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-help-plugin:3.2.0:effective-pom (default-cli) @ module1 ---
[INFO]
Effective POMs, after inheritance, interpolation, and profiles are applied:<?xml version="1.0" encoding="GBK"?>
<!-- ====================================================================== -->
<!--                                                                        -->
<!-- Generated by Maven Help Plugin on 2019-12-05T13:55:15+08:00            -->
<!-- See: http://maven.apache.org/plugins/maven-help-plugin/                -->
<!--                                                                        -->
<!-- ====================================================================== -->
<!-- ====================================================================== -->
<!--                                                                        -->
<!-- Effective POM for project 'demo:module1:jar:1.0'                       -->
<!--                                                                        -->
<!-- ====================================================================== -->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/
2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 h
ttp://maven.apache.org/xsd/maven-4.0.0.xsd"><modelVersion>4.0.0</modelVersion><parent><groupId>demo</groupId><artifactId>demo</artifactId><version>1.0</version></parent><groupId>demo</groupId><artifactId>module1</artifactId><version>1.0</version><properties><revision>1.0</revision></properties><repositories><repository><snapshots><enabled>false</enabled></snapshots><id>central</id><name>Central Repository</name><url>https://repo.maven.apache.org/maven2</url></repository></repositories><pluginRepositories><pluginRepository><releases><updatePolicy>never</updatePolicy></releases><snapshots><enabled>false</enabled></snapshots><id>central</id><name>Central Repository</name><url>https://repo.maven.apache.org/maven2</url></pluginRepository></pluginRepositories><build><sourceDirectory>D:\sde\eclipse_workspace\demo\module1\src\main\java</source
Directory><scriptSourceDirectory>D:\sde\eclipse_workspace\demo\module1\src\main\script
s</scriptSourceDirectory><testSourceDirectory>D:\sde\eclipse_workspace\demo\module1\src\test\java</te
stSourceDirectory><outputDirectory>D:\sde\eclipse_workspace\demo\module1\target\classes</outpu
tDirectory><testOutputDirectory>D:\sde\eclipse_workspace\demo\module1\target\test-class
es</testOutputDirectory><resources><resource><directory>D:\sde\eclipse_workspace\demo\module1\src\main\resources</dir
ectory></resource></resources><testResources><testResource><directory>D:\sde\eclipse_workspace\demo\module1\src\test\resources</dir
ectory></testResource></testResources><directory>D:\sde\eclipse_workspace\demo\module1\target</directory><finalName>module1-1.0</finalName><pluginManagement><plugins><plugin><artifactId>maven-antrun-plugin</artifactId><version>1.3</version></plugin><plugin><artifactId>maven-assembly-plugin</artifactId><version>2.2-beta-5</version></plugin><plugin><artifactId>maven-dependency-plugin</artifactId><version>2.8</version></plugin><plugin><artifactId>maven-release-plugin</artifactId><version>2.3.2</version></plugin></plugins></pluginManagement><plugins><plugin><artifactId>maven-clean-plugin</artifactId><version>2.5</version><executions><execution><id>default-clean</id><phase>clean</phase><goals><goal>clean</goal></goals></execution></executions></plugin><plugin><artifactId>maven-resources-plugin</artifactId><version>2.6</version><executions><execution><id>default-testResources</id><phase>process-test-resources</phase><goals><goal>testResources</goal></goals></execution><execution><id>default-resources</id><phase>process-resources</phase><goals><goal>resources</goal></goals></execution></executions></plugin><plugin><artifactId>maven-jar-plugin</artifactId><version>2.4</version><executions><execution><id>default-jar</id><phase>package</phase><goals><goal>jar</goal></goals></execution></executions></plugin><plugin><artifactId>maven-compiler-plugin</artifactId><version>3.1</version><executions><execution><id>default-compile</id><phase>compile</phase><goals><goal>compile</goal></goals></execution><execution><id>default-testCompile</id><phase>test-compile</phase><goals><goal>testCompile</goal></goals></execution></executions></plugin><plugin><artifactId>maven-surefire-plugin</artifactId><version>2.12.4</version><executions><execution><id>default-test</id><phase>test</phase><goals><goal>test</goal></goals></execution></executions></plugin><plugin><artifactId>maven-install-plugin</artifactId><version>2.4</version><executions><execution><id>default-install</id><phase>install</phase><goals><goal>install</goal></goals></execution></executions></plugin><plugin><artifactId>maven-deploy-plugin</artifactId><version>2.7</version><executions><execution><id>default-deploy</id><phase>deploy</phase><goals><goal>deploy</goal></goals></execution></executions></plugin><plugin><artifactId>maven-site-plugin</artifactId><version>3.3</version><executions><execution><id>default-site</id><phase>site</phase><goals><goal>site</goal></goals><configuration><outputDirectory>D:\sde\eclipse_workspace\demo\module1\target\site
</outputDirectory><reportPlugins><reportPlugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-project-info-reports-plugin</artifactId></reportPlugin></reportPlugins></configuration></execution><execution><id>default-deploy</id><phase>site-deploy</phase><goals><goal>deploy</goal></goals><configuration><outputDirectory>D:\sde\eclipse_workspace\demo\module1\target\site
</outputDirectory><reportPlugins><reportPlugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-project-info-reports-plugin</artifactId></reportPlugin></reportPlugins></configuration></execution></executions><configuration><outputDirectory>D:\sde\eclipse_workspace\demo\module1\target\site</ou
tputDirectory><reportPlugins><reportPlugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-project-info-reports-plugin</artifactId></reportPlugin></reportPlugins></configuration></plugin></plugins></build><reporting><outputDirectory>D:\sde\eclipse_workspace\demo\module1\target\site</outputDi
rectory></reporting>
</project>[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.002 s
[INFO] Finished at: 2019-12-05T13:55:15+08:00
[INFO] Final Memory: 14M/155M
[INFO] ------------------------------------------------------------------------

help:effective-settings

cmd> mvn help:effective-settings
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building module1 1.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-help-plugin:3.2.0:effective-settings (default-cli) @ module1 --
-
[INFO]
Effective user-specific configuration settings:<?xml version="1.0" encoding="GBK"?>
<!-- ====================================================================== -->
<!--                                                                        -->
<!-- Generated by Maven Help Plugin on 2019-12-05T13:56:19+08:00            -->
<!-- See: http://maven.apache.org/plugins/maven-help-plugin/                -->
<!--                                                                        -->
<!-- ====================================================================== -->
<!-- ====================================================================== -->
<!--                                                                        -->
<!-- Effective Settings for 'Administrator' on 'SKY-20181119ZPD'            -->
<!--                                                                        -->
<!-- ====================================================================== -->
<settings xmlns="http://maven.apache.org/SETTINGS/1.1.0" xmlns:xsi="http://www.w
3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTI
NGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd"><localRepository>D:\sde\maven_repo</localRepository><mirrors><mirror><mirrorOf>central</mirrorOf><name>aliyun maven</name><url>http://maven.aliyun.com/nexus/content/groups/public/</url><id>alimaven</id></mirror></mirrors><pluginGroups><pluginGroup>org.apache.maven.plugins</pluginGroup><pluginGroup>org.codehaus.mojo</pluginGroup></pluginGroups>
</settings>[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.805 s
[INFO] Finished at: 2019-12-05T13:56:19+08:00
[INFO] Final Memory: 13M/155M
[INFO] ------------------------------------------------------------------------

help:evaluate

打印变量

cmd> mvn help:evaluate -Dexpression=project.version -q -DforceStdout
1.0

打印自定义变量

pom.xml

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"><modelVersion>4.0.0</modelVersion><groupId>demo</groupId><artifactId>demo</artifactId><version>${revision}</version><packaging>pom</packaging><properties><revision>1.0</revision></properties><modules><module>module1</module></modules>
</project>

打印变量revision:

cmd> mvn help:evaluate -Dexpression=revision -q -DforceStdout
1.0

【maven插件】maven-help-plugin相关推荐

  1. linux中安装maven插件,Maven插件wagon

    8种机械键盘轴体对比 本人程序员,要买一个写代码的键盘,请问红轴和茶轴怎么选? 通常情况下,进程开发完成后部署到线上Linux服务器,可能需要经历打包.将包文档传到服务器.SSH连上服务器.敲命令启动 ...

  2. Spring Boot的Maven插件Spring Boot Maven plugin详解

    pring Boot的Maven插件(Spring Boot Maven plugin)能够以Maven的方式为应用提供Spring Boot的支持,即为Spring Boot应用提供了执行Maven ...

  3. Maven 的 Maven Compiler Plugin 插件

    当前 Maven Compiler Plugin 这个插件的版本为 3.10.1 你可以使用最新的版本. 我们今天主要说一下这个插件中 --release 参数 这个插件的配置方法如下: <?x ...

  4. Maven版本管理-Maven Release Plugin插件

    一.什么是版本管理 首先,这里说的版本管理(version management)不是指版本控制(version control),但是本文假设你拥有基本的版本控制的知识,了解subversion的基 ...

  5. Maven(插件配置和生命周期的绑定)

    1.这篇文章很好,介绍的maven插件的. 2.maven的source插件为例,可以把源代码打成包. Goals Overview就可以查看该插件下面所有的目标. 这里我们要使用的是source:j ...

  6. 使用Maven插件构建SpringBoot项目,生成Docker镜像push到DockerHub上

    一个用于构建和推送Docker镜像的Maven插件. 使用Maven插件构建Docker镜像,将Docker镜像push到DockerHub上,或者私有仓库,上一篇文章是手写Dockerfile,这篇 ...

  7. [置顶]使用 maven 插件 maven-shade-plugin 对可执行 java 工程及其全部依赖 jar 进行打包...

    作者:chenzhou123520 出处:http://chenzhou123520.iteye.com/blog/1706242 使用 maven 插件 maven-shade-plugin 对 j ...

  8. 【Spring boot 实战】使用Maven插件构建Docker镜像

    本文主要介绍如何使用Maven插件将SpringBoot应用打包为Docker镜像,并上传到私有镜像仓库Docker Registry的过程. 使用Maven构建本地Docker镜像 我们以项目spr ...

  9. maven 插件之 AutoConfig 工具使用笔记

    AutoConfig 是一款 maven 插件,主要用于 Maven 项目打包使用.在我们的工作中,会将自己写的代码打成 jar 包或者 war 包发布到各种环境上.一般地,不用的环境所使用的数据库. ...

  10. 初探maven插件机制

    初探maven插件机制 第一部分 Plexus 本质上说,Maven是一个plugin的框架,所以需要有一个管理者来管理这些plugin.Maven选择了Plexus作为plugin的管理者.作为初探 ...

最新文章

  1. 死锁产生原因-竞争不可剥夺资源
  2. Scrapy从理论到爬图
  3. 如何初始化一个vue项目
  4. redis系列:redis介绍与安装
  5. 简述负载均衡CDN技术
  6. BatchNormalization 优点
  7. 自已做的框架RJ 第三篇----------------修改数据
  8. Linux 脚本获取当前路径父路径及常用命令
  9. AD库转allegro步骤
  10. AUTOCAD2020入门学习笔记(三)
  11. HTML基础开头代码
  12. Java实现pdf打印文件
  13. 简约前端工程师简历PPT模板
  14. 京东在线客服话术汇总!
  15. B站热榜 RSS 订阅 - 基于 RSSHub
  16. 【Python】通过 Python 设置电脑代理端口
  17. 流程表结构设计第二版
  18. 申报不能忘,2022年湖北省各地专精特新小巨人企业奖励补贴政策汇编(附申报条件)
  19. Ubuntu下安装Nvidia和Intel双显卡驱动
  20. CodeForces 786A Berzerk 博弈?BFS瞎搞

热门文章

  1. React 中使用sass
  2. 记录:通过SSH远程连接Ubuntu
  3. FMDB/SQLCipher数据库管理
  4. 通过测试想到的一些问题
  5. vim一些挺方便的功能
  6. ThinkPHP笔记——完全配置参考手册
  7. C# WebBrowser 取 window.open 新窗口 url的方法
  8. 无线网sdn服务器,什么是SDN,SDN网络与传统网络对比
  9. PHP多进程之pcntl扩展的使用详解
  10. Linux之grep:过滤器按照字符进行过滤  选项规定内容样式 模式规定内容