maven当中的help插件可以给我们很多的关于当前项目配置的信息

1. help:effective-pom

这个goal主要目的让我们了解当前项目最终合并后的配置信息,比如,所有的maven项目都会继承super pom,这时候项目的配置都会继承super pom的配置以及覆盖某些配置.

jiangjian@DESKTOP-0IKNJOE MINGW64 /g/maven-practice/simple-weather
$ mvn help:effective-pom
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for com.jiangjian:simple-weather:jar:1.0-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 73, column 15
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-surefire-plugin is missing. @ line 80, column 15
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building simple-weather 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-help-plugin:2.2:effective-pom (default-cli) @ simple-weather ---
[INFO]
Effective POMs, after inheritance, interpolation, and profiles are applied:<!-- ====================================================================== -->
<!--                                                                        -->
<!-- Generated by Maven Help Plugin on 2017-07-02T12:00:37                  -->
<!-- See: http://maven.apache.org/plugins/maven-help-plugin/                -->
<!--                                                                        -->
<!-- ====================================================================== --><!-- ====================================================================== -->
<!--                                                                        -->
<!-- Effective POM for project                                              -->
<!-- 'com.jiangjian:simple-weather:jar:1.0-SNAPSHOT'                        -->
<!--                                                                        -->
<!-- ====================================================================== --><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>com.jiangjian</groupId><artifactId>simple-weather</artifactId><version>1.0-SNAPSHOT</version>...省略

2. help:active-profiles

该goal主要用来列举当前项目的所有profile以及它们定义的位置(pom.xml, profiles.xml, ~/m2.settings.xml, ${M2_HOME}/conf/settings.xml)

3. help:effective-settings

该goal显示当前pom.xml最终的配置信息,下面是对应的功能说明:
Description: Displays the calculated settings as XML for this project,
given any profile enhancement and the inheritance of the global settings
into the user-level settings.

4. help:describe

这个goal的目的主要是用来对maven 的插件功能进行查询,比如我们我们需要对help插件提供的功能进行查阅,可以执行如下命令:

mvn help:describe -Dplugin=help

运行结果如下:

Name: Apache Maven Help Plugin
Description: The Maven Help plugin provides goals aimed at helping to makesense out of the build environment. It includes the ability to view theeffective POM and settings files, after inheritance and active profiles havebeen applied, as well as a describe a particular plugin goal to give usageinformation.
Group Id: org.apache.maven.plugins
Artifact Id: maven-help-plugin
Version: 3.1.0
Goal Prefix: helpThis plugin has 8 goals:help:active-profilesDescription: Displays a list of the profiles which are currently active forthis build.help:all-profilesDescription: Displays a list of available profiles under the currentproject.Note: it will list all profiles for a project. If a profile comes up with astatus inactive then there might be a need to set profile activationswitches/property.help:describeDescription: Displays a list of the attributes for a Maven Plugin and/orgoals (aka Mojo - Maven plain Old Java Object).help:effective-pomDescription: Displays the effective POM as an XML for this build, with theactive profiles factored in, or a specified artifact.help:effective-settingsDescription: Displays the calculated settings as XML for this project,given any profile enhancement and the inheritance of the global settingsinto the user-level settings.help:evaluateDescription: Evaluates Maven expressions given by the user in aninteractive mode.help:helpDescription: Display help information on maven-help-plugin.Call mvn help:help -Ddetail=true -Dgoal=<goal-name> to display parameterdetails.help:systemDescription: Displays a list of the platform details like system propertiesand environment variables.For more information, run 'mvn help:describe [...] -Ddetail'

后面的提示大家还可以看到追加 -Ddetail显示的信息更加的完全,

5. help:system

该命令用来显示系统的配置信息(包括system properties 和 enviroment properties)

mvn help:system

output:

[INFO] --- maven-help-plugin:2.2:system (default-cli) @ welfare-platform ---
[INFO]
===============================================================================
========================= Platform Properties Details =========================
==============================================================================================================================================================
System Properties
===============================================================================java.runtime.name=Java(TM) SE Runtime Environment
sun.boot.library.path=D:\java\jdk8\jre\bin
java.vm.version=25.121-b13
...此处省略
===============================================================================
Environment Variables
===============================================================================CLASSWORLDS_JAR="D:\apache-maven-3.3.9\bin\..\boot\plexus-classworlds-2.5.2.jar"
PSMODULEPATH=C:\Windows\system32\WindowsPowerShell\v1.0\Modules\
PROGRAMW6432=C:\Program Files
COMMONPROGRAMW6432=C:\Program Files\Common Files
MOZ_PLUGIN_PATH=D:\Foxit Reader\plugins\
WINDOWS_TRACING_LOGFILE=C:\BVTBin\Tests\installpackage\csilogfile.log
...此处省略

【maven】help插件相关推荐

  1. 【转】Maven Jetty 插件的问题(css/js等目录死锁)的解决

    Maven Jetty 插件的问题(css/js等目录死锁,不能自动刷新)的解决: 1. 打开下面的目录:C:\Users\用户名\.m2\repository\org\eclipse\jetty\j ...

  2. maven 常用插件3

    maven 常用插件3 转载:http://www.cnblogs.com/dennyzhangdd/p/5831112.html 1.根据项目类型打包:jar/war打包插件. 首先看<pac ...

  3. maven 版本号插件_测试Maven版本插件自动递增版本号

    maven 版本号插件 抽象 Maven版本插件是一个非常强大的工具,我在很大程度上依赖于它来协调软件版本. 通常,软件发行版本号遵循简单的1.0.0.0-SNAPSHOT格式. 但是最近我需要在版本 ...

  4. 构建maven项目插件_如何构建一个Maven插件

    构建maven项目插件 使用Okta的身份管理平台轻松部署您的应用程序 使用Okta的API在几分钟之内即可对任何应用程序中的用户进行身份验证,管理和保护. 今天尝试Okta. 由于其插件生态系统的普 ...

  5. 测试Maven版本插件自动递增版本号

    抽象 Maven版本插件是一个非常强大的工具,我在很大程度上依赖于它来协调软件版本. 通常,软件发行版本号遵循简单的1.0.0.0-SNAPSHOT格式. 但是最近我需要在版本号中添加限定符-类似于1 ...

  6. maven插件依赖_当Maven依赖插件位于

    maven插件依赖 问题: 我们进行了一个集成测试,该测试创建了一个Spring ClassPathXmlApplicationContext ,同时这样做导致NoSuchMethodError爆炸. ...

  7. maven 版本号插件_Maven内部版本号插件–用法示例

    maven 版本号插件 假设我们需要向一些工件(jar,war等)添加内部版本号. 在这里,我想演示buildnumber-maven-plugin的用法. 这篇文章基于: http://mojo.c ...

  8. cargo maven_用于集成测试的Maven Cargo插件

    cargo maven 在项目生命周期中,非常普遍的需求是设置集成测试. 幸运的是,Maven在默认构建生命周期的以下阶段(来自Maven 文档 )具有对这一确切方案的内置支持: 集成前测试 : 执行 ...

  9. 当Maven依赖插件位于

    问题: 我们进行了一个集成测试,该测试创建了一个Spring ClassPathXmlApplicationContext ,同时这样做导致NoSuchMethodError爆炸. 事实证明,我们对S ...

  10. 使用Maven Jetty插件

    尽管很长一段时间以来我一直在使用Maven,但直到最近我才使用过Jetty插件. 为了能够测试REST客户端,我创建了一个Servlet,向我显示了所有传入的参数和带有传入请求的标头. 为了在容器中运 ...

最新文章

  1. 小程序实现瀑布流,获取图片高度分成两组数据的函数封装代码
  2. Single Page Application概览
  3. [c/c++] programming之路(28)、结构体存储和内存对齐+枚举类型+typedef+深拷贝和浅拷贝...
  4. Android中点击按钮获取星级评分条的评分
  5. Mysql翻转字符串reverse
  6. java中的动态代理----自己手动实现
  7. 从源码角度解析线程池中顶层接口和抽象类
  8. HOW2J 全套教程整理:Java、前端、数据库、中间件、第三方、项目、面试题
  9. ODBC连接oracle 10g 客户端
  10. 最大值_期末C语言特辑 计算一维数组中最大值
  11. LAMP架构(八)限定某个目录禁止解析、 限制user_agent、php相关配置
  12. 图像处理形态学椭圆形模板结构元素的设计与实现
  13. 智能优化算法:纵横交叉算法-附代码
  14. 大数据Hadoop之——数据仓库Hive
  15. java面试题:2018年6月
  16. 西米支付:支付宝/微信支付/银联支付通道的接入介绍
  17. 安卓开发实现获取扫码枪扫码二维码、条形码后的内容
  18. 运行老是跳转谷歌然后又加载不出来
  19. SAP CO组织结构及概念
  20. xfs(dm-3):please umount the filesystem and rectify the problem(s)

热门文章

  1. unity texturestreaming
  2. Netflix的全周期开发者—运行您构建的内容(中英双语)
  3. 英飞凌XMC4800 EtherCAT开发板 原理图 PCB
  4. CSS之自定义原生checkbox样式
  5. Could not find method ndk() for arguments XXXXXXXXXXXXXXXXX解决方法
  6. java document解析xml_[XML]在Java中用Document解析XML实例
  7. Content Aware ABR技术(七)
  8. webpack 的 HMR 原理
  9. 全球及中国电子式儿科呼吸机行业项目投资战略及规划动向预测报告2021-2027年版
  10. 测试app软件兼容性,App兼容测试,你中招了嘛