Maven常用命令

下载sources和javadoc

mvn dependency:sources -DdownloadSources=true -DdownloadJavadocs=true 

使用maven-help-plugin描述插件

在命令行执行如下命令:

mvn help:describe -Dplugin=org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M2

省去版本信息,让Maven自动获取最新插件来进行表述

mvn help:describe –Dplugin= org.apache.maven.plugins:maven-surefire-plugin

进一步简化,使用插件前缀来替换坐标

mvn help:describe –Dplugin=compiler

如果要输出更详细的信息,可以加上detail参数

mvn help:describe-Dplugin=compiler –Ddetail

执行第一条命令,输出结果如下:
在这里插入图片描述
从输出结果可以看到maven-surefire-plugin在3.0.0-M2的插件前缀为surefire,并且有两个插件目标,分别为help和test。
另外,也可以查看到插件目标的对应参数,使用如下的命令

mvn surefire:help –Ddetail=true –Dgoal=test
C:\Users\lenovo\Desktop>mvn surefire:help -Ddetail=true -Dgoal=help
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------< org.apache.maven:standalone-pom >-------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] --------------------------------[ pom ]---------------------------------
[INFO]
[INFO] --- maven-surefire-plugin:3.0.0-M3:help (default-cli) @ standalone-pom ---
[INFO] Maven Surefire Plugin 3.0.0-M3
  Maven Surefire MOJO in maven-surefire-plugin.

surefire:help
  Display help information on maven-surefire-plugin.
  Call mvn surefire:help -Ddetail=true -Dgoal=<goal-name> to display parameter
  details.

  Available parameters:

    detail (Default: false)
      If true, display all settable properties for each goal.
      User property: detail

    goal
      The name of the goal for which to show help. If unspecified, all goals
      will be displayed.
      User property: goal

    indentSize (Default: 2)
      The number of spaces per indentation level, should be positive.
      User property: indentSize

    lineLength (Default: 80)
      The maximum length of a display line, should be positive.
      User property: lineLength


[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.891 s
[INFO] Finished at: 2019-06-22T16:16:01+08:00
[INFO] ------------------------------------------------------------------------

C:\Users\lenovo\Desktop>
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值