下载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>