Maven Help插件
来源:互联网 发布:数据库架构师 北京 编辑:程序博客网 时间:2024/06/05 20:36
Maven Help插件能让你列出活动的Maven Profile,显示一个实际POM(effective POM),打印实际settings(effective settings),或者列出Maven插件的属性。
Maven Help 插件有四个目标。前三个目标描述一个特定的项目,它们必须在项目的目录下运行。最后一个目标describe比较复杂,用于展示某个插件或者插件目标的相关信息。
help:active-profiles
列出当前构建中活动的Profile(项目的,用户的,全局的)。
help:effective-pom
显示当前构建的实际POM,包含活动的Profile。
help:effective-settings
打印出项目的实际settings, 包括从全局的settings和用户级别settings继承的配置。
help:describe
描述插件的属性。它不需要在项目目录下运行。但是你必须提供你想要描述插件的 groupId 和 artifactId.
通常使用help:describe目标来获取Maven插件如何工作?配置参数是什么?目标是什么? 等这些信息。它通过plugin参数指定你想要研究哪个插件,你可以传入插件的前缀,或者可以是坐标值groupId:artifactId:[version],这里 version 是可选的。
例如,下面的命令使用 help 插件的describe目标来输出 Maven Help 插件的信息:
view plaincopy to clipboardprint?
C:/>mvn help:describe -Dplugin=help
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'help'.
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Default Project
[INFO] task-segment: [help:describe] (aggregator-style)
[INFO] ------------------------------------------------------------------------
[INFO] [help:describe]
[INFO] org.apache.maven.plugins:maven-help-plugin:2.1
Name: Maven Help Plugin
Description: The Maven Help plugin provides goals aimed at helping to make
sense out of the build environment. It includes the ability to view the
effective POM and settings files, after inheritance and active profiles have
been applied, as well as a describe a particular plugin goal to give usage
information.
Group Id: org.apache.maven.plugins
Artifact Id: maven-help-plugin
Version: 2.1
Goal Prefix: help
This plugin has 9 goals:
help:active-profiles
Description: Displays a list of the profiles which are currently active for
this build.
Deprecated. No reason given
help:all-profiles
Description: Displays a list of available profiles under the current
project.
Note: it will list all profiles for a project. If a profile comes up with a
status inactive then there might be a need to set profile activation
switches/property.
Deprecated. No reason given
help:describe
Description: Displays a list of the attributes for a Maven Plugin and/or
goals (aka Mojo - Maven plain Old Java Object).
Deprecated. No reason given
help:effective-pom
Description: Displays the effective POM as an XML for this build, with the
active profiles factored in.
Deprecated. No reason given
help:effective-settings
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.
Deprecated. No reason given
help:evaluate
Description: Evaluates Maven expressions given by the user in an
interactive mode.
Deprecated. No reason given
help:expressions
Description: Displays the supported Plugin expressions used by Maven.
Deprecated. No reason given
help:help
Description: Display help information on maven-help-plugin.
Call
mvn help:help -Ddetail=true -Dgoal=<goal-name>
to display parameter details.
Deprecated. No reason given
help:system
Description: Displays a list of the platform details like system properties
and environment variables.
Deprecated. No reason given
For more information, run 'mvn help:describe [...] -Ddetail'
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2 seconds
[INFO] Finished at: Mon Apr 20 14:02:21 CST 2009
[INFO] Final Memory: 5M/10M
[INFO] ------------------------------------------------------------------------
C:/>mvn help:describe -Dplugin=help
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'help'.
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Default Project
[INFO] task-segment: [help:describe] (aggregator-style)
[INFO] ------------------------------------------------------------------------
[INFO] [help:describe]
[INFO] org.apache.maven.plugins:maven-help-plugin:2.1
Name: Maven Help Plugin
Description: The Maven Help plugin provides goals aimed at helping to make
sense out of the build environment. It includes the ability to view the
effective POM and settings files, after inheritance and active profiles have
been applied, as well as a describe a particular plugin goal to give usage
information.
Group Id: org.apache.maven.plugins
Artifact Id: maven-help-plugin
Version: 2.1
Goal Prefix: help
This plugin has 9 goals:
help:active-profiles
Description: Displays a list of the profiles which are currently active for
this build.
Deprecated. No reason given
help:all-profiles
Description: Displays a list of available profiles under the current
project.
Note: it will list all profiles for a project. If a profile comes up with a
status inactive then there might be a need to set profile activation
switches/property.
Deprecated. No reason given
help:describe
Description: Displays a list of the attributes for a Maven Plugin and/or
goals (aka Mojo - Maven plain Old Java Object).
Deprecated. No reason given
help:effective-pom
Description: Displays the effective POM as an XML for this build, with the
active profiles factored in.
Deprecated. No reason given
help:effective-settings
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.
Deprecated. No reason given
help:evaluate
Description: Evaluates Maven expressions given by the user in an
interactive mode.
Deprecated. No reason given
help:expressions
Description: Displays the supported Plugin expressions used by Maven.
Deprecated. No reason given
help:help
Description: Display help information on maven-help-plugin.
Call
mvn help:help -Ddetail=true -Dgoal=<goal-name>
to display parameter details.
Deprecated. No reason given
help:system
Description: Displays a list of the platform details like system properties
and environment variables.
Deprecated. No reason given
For more information, run 'mvn help:describe [...] -Ddetail'
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2 seconds
[INFO] Finished at: Mon Apr 20 14:02:21 CST 2009
[INFO] Final Memory: 5M/10M
[INFO] ------------------------------------------------------------------------
如果还想得到更详细的信息,可以使用full参数,即:
view plaincopy to clipboardprint?
C:/>mvn help:describe -Dplugin=help -Dfull
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'help'.
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Default Project
[INFO] task-segment: [help:describe] (aggregator-style)
[INFO] ------------------------------------------------------------------------
[INFO] [help:describe]
[INFO] org.apache.maven.plugins:maven-help-plugin:2.1
Name: Maven Help Plugin
Description: The Maven Help plugin provides goals aimed at helping to make
sense out of the build environment. It includes the ability to view the
effective POM and settings files, after inheritance and active profiles have
been applied, as well as a describe a particular plugin goal to give usage
information.
Group Id: org.apache.maven.plugins
Artifact Id: maven-help-plugin
Version: 2.1
Goal Prefix: help
This plugin has 9 goals:
help:active-profiles
Description: Displays a list of the profiles which are currently active for
this build.
Deprecated. No reason given
Implementation: org.apache.maven.plugins.help.ActiveProfilesMojo
Language: java
Available parameters:
output
Optional parameter to write the output of this help in a given file,
instead of writing to the console.
Note: Could be a relative path.
Deprecated. No reason given
help:all-profiles
Description: Displays a list of available profiles under the current
project.
Note: it will list all profiles for a project. If a profile comes up with a
status inactive then there might be a need to set profile activation
switches/property.
Deprecated. No reason given
Implementation: org.apache.maven.plugins.help.AllProfilesMojo
Language: java
Available parameters:
output
Optional parameter to write the output of this help in a given file,
instead of writing to the console.
Note: Could be a relative path.
Deprecated. No reason given
help:describe
Description: Displays a list of the attributes for a Maven Plugin and/or
goals (aka Mojo - Maven plain Old Java Object).
Deprecated. No reason given
Implementation: org.apache.maven.plugins.help.DescribeMojo
Language: java
Available parameters:
artifactId
The Maven Plugin artifactId to describe.
Note: Should be used with groupId parameter.
Deprecated. No reason given
cmd
A Maven command like a single goal or a single phase following the Maven
command line:
mvn [options] [<goal(s)>] [<phase(s)>]
Deprecated. No reason given
detail (Default: false)
This flag specifies that a detailed (verbose) list of goal (Mojo)
information should be given.
Deprecated. No reason given
goal
The goal name of a Mojo to describe within the specified Maven Plugin. If
this parameter is specified, only the corresponding goal (Mojo) will be
described, rather than the whole Plugin.
Deprecated. No reason given
groupId
The Maven Plugin groupId to describe.
Note: Should be used with artifactId parameter.
Deprecated. No reason given
medium (Default: true)
This flag specifies that a medium list of goal (Mojo) information should
be given.
Deprecated. No reason given
minimal (Default: false)
This flag specifies that a minimal list of goal (Mojo) information should
be given.
Deprecated. No reason given
output
Optional parameter to write the output of this help in a given file,
instead of writing to the console.
Note: Could be a relative path.
Deprecated. No reason given
plugin
The Maven Plugin to describe. This must be specified in one of three
ways:
1. plugin-prefix, i.e. 'help'
2. groupId:artifactId, i.e. 'org.apache.maven.plugins:maven-help-plugin'
3. groupId:artifactId:version, i.e.
'org.apache.maven.plugins:maven-help-plugin:2.0'
Deprecated. No reason given
version
The Maven Plugin version to describe.
Note: Should be used with groupId/artifactId parameters.
Deprecated. No reason given
help:effective-pom
Description: Displays the effective POM as an XML for this build, with the
active profiles factored in.
Deprecated. No reason given
Implementation: org.apache.maven.plugins.help.EffectivePomMojo
Language: java
Available parameters:
output
Optional parameter to write the output of this help in a given file,
instead of writing to the console.
Note: Could be a relative path.
Deprecated. No reason given
help:effective-settings
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.
Deprecated. No reason given
Implementation: org.apache.maven.plugins.help.EffectiveSettingsMojo
Language: java
Available parameters:
output
Optional parameter to write the output of this help in a given file,
instead of writing to the console.
Note: Could be a relative path.
Deprecated. No reason given
showPasswords (Default: false)
For security reasons, all passwords are hidden by default. Set this to
true to show all passwords.
Deprecated. No reason given
help:evaluate
Description: Evaluates Maven expressions given by the user in an
interactive mode.
Deprecated. No reason given
Implementation: org.apache.maven.plugins.help.EvaluateMojo
Language: java
Available parameters:
artifact
An artifact for evaluating Maven expressions.
Note: Should respect the Maven format, i.e.
groupId:artifactId[:version][:classifier].
Deprecated. No reason given
help:expressions
Description: Displays the supported Plugin expressions used by Maven.
Deprecated. No reason given
Implementation: org.apache.maven.plugins.help.ExpressionsMojo
Language: java
Available parameters:
output
Optional parameter to write the output of this help in a given file,
instead of writing to the console.
Note: Could be a relative path.
Deprecated. No reason given
help:help
Description: Display help information on maven-help-plugin.
Call
mvn help:help -Ddetail=true -Dgoal=<goal-name>
to display parameter details.
Deprecated. No reason given
Implementation: org.apache.maven.plugins.help.HelpMojo
Language: java
Available parameters:
detail (Default: false)
If true, display all settable properties for each goal.
Deprecated. No reason given
goal
The name of the goal for which to show help. If unspecified, all goals
will be displayed.
Deprecated. No reason given
indentSize (Default: 2)
The number of spaces per indentation level, should be positive.
Deprecated. No reason given
lineLength (Default: 80)
The maximum length of a display line, should be positive.
Deprecated. No reason given
help:system
Description: Displays a list of the platform details like system properties
and environment variables.
Deprecated. No reason given
Implementation: org.apache.maven.plugins.help.SystemMojo
Language: java
Available parameters:
output
Optional parameter to write the output of this help in a given file,
instead of writing to the console.
Note: Could be a relative path.
Deprecated. No reason given
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2 seconds
[INFO] Finished at: Mon Apr 20 14:04:13 CST 2009
[INFO] Final Memory: 5M/10M
[INFO] ------------------------------------------------------------------------
C:/>mvn help:describe -Dplugin=help -Dfull
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'help'.
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Default Project
[INFO] task-segment: [help:describe] (aggregator-style)
[INFO] ------------------------------------------------------------------------
[INFO] [help:describe]
[INFO] org.apache.maven.plugins:maven-help-plugin:2.1
Name: Maven Help Plugin
Description: The Maven Help plugin provides goals aimed at helping to make
sense out of the build environment. It includes the ability to view the
effective POM and settings files, after inheritance and active profiles have
been applied, as well as a describe a particular plugin goal to give usage
information.
Group Id: org.apache.maven.plugins
Artifact Id: maven-help-plugin
Version: 2.1
Goal Prefix: help
This plugin has 9 goals:
help:active-profiles
Description: Displays a list of the profiles which are currently active for
this build.
Deprecated. No reason given
Implementation: org.apache.maven.plugins.help.ActiveProfilesMojo
Language: java
Available parameters:
output
Optional parameter to write the output of this help in a given file,
instead of writing to the console.
Note: Could be a relative path.
Deprecated. No reason given
help:all-profiles
Description: Displays a list of available profiles under the current
project.
Note: it will list all profiles for a project. If a profile comes up with a
status inactive then there might be a need to set profile activation
switches/property.
Deprecated. No reason given
Implementation: org.apache.maven.plugins.help.AllProfilesMojo
Language: java
Available parameters:
output
Optional parameter to write the output of this help in a given file,
instead of writing to the console.
Note: Could be a relative path.
Deprecated. No reason given
help:describe
Description: Displays a list of the attributes for a Maven Plugin and/or
goals (aka Mojo - Maven plain Old Java Object).
Deprecated. No reason given
Implementation: org.apache.maven.plugins.help.DescribeMojo
Language: java
Available parameters:
artifactId
The Maven Plugin artifactId to describe.
Note: Should be used with groupId parameter.
Deprecated. No reason given
cmd
A Maven command like a single goal or a single phase following the Maven
command line:
mvn [options] [<goal(s)>] [<phase(s)>]
Deprecated. No reason given
detail (Default: false)
This flag specifies that a detailed (verbose) list of goal (Mojo)
information should be given.
Deprecated. No reason given
goal
The goal name of a Mojo to describe within the specified Maven Plugin. If
this parameter is specified, only the corresponding goal (Mojo) will be
described, rather than the whole Plugin.
Deprecated. No reason given
groupId
The Maven Plugin groupId to describe.
Note: Should be used with artifactId parameter.
Deprecated. No reason given
medium (Default: true)
This flag specifies that a medium list of goal (Mojo) information should
be given.
Deprecated. No reason given
minimal (Default: false)
This flag specifies that a minimal list of goal (Mojo) information should
be given.
Deprecated. No reason given
output
Optional parameter to write the output of this help in a given file,
instead of writing to the console.
Note: Could be a relative path.
Deprecated. No reason given
plugin
The Maven Plugin to describe. This must be specified in one of three
ways:
1. plugin-prefix, i.e. 'help'
2. groupId:artifactId, i.e. 'org.apache.maven.plugins:maven-help-plugin'
3. groupId:artifactId:version, i.e.
'org.apache.maven.plugins:maven-help-plugin:2.0'
Deprecated. No reason given
version
The Maven Plugin version to describe.
Note: Should be used with groupId/artifactId parameters.
Deprecated. No reason given
help:effective-pom
Description: Displays the effective POM as an XML for this build, with the
active profiles factored in.
Deprecated. No reason given
Implementation: org.apache.maven.plugins.help.EffectivePomMojo
Language: java
Available parameters:
output
Optional parameter to write the output of this help in a given file,
instead of writing to the console.
Note: Could be a relative path.
Deprecated. No reason given
help:effective-settings
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.
Deprecated. No reason given
Implementation: org.apache.maven.plugins.help.EffectiveSettingsMojo
Language: java
Available parameters:
output
Optional parameter to write the output of this help in a given file,
instead of writing to the console.
Note: Could be a relative path.
Deprecated. No reason given
showPasswords (Default: false)
For security reasons, all passwords are hidden by default. Set this to
true to show all passwords.
Deprecated. No reason given
help:evaluate
Description: Evaluates Maven expressions given by the user in an
interactive mode.
Deprecated. No reason given
Implementation: org.apache.maven.plugins.help.EvaluateMojo
Language: java
Available parameters:
artifact
An artifact for evaluating Maven expressions.
Note: Should respect the Maven format, i.e.
groupId:artifactId[:version][:classifier].
Deprecated. No reason given
help:expressions
Description: Displays the supported Plugin expressions used by Maven.
Deprecated. No reason given
Implementation: org.apache.maven.plugins.help.ExpressionsMojo
Language: java
Available parameters:
output
Optional parameter to write the output of this help in a given file,
instead of writing to the console.
Note: Could be a relative path.
Deprecated. No reason given
help:help
Description: Display help information on maven-help-plugin.
Call
mvn help:help -Ddetail=true -Dgoal=<goal-name>
to display parameter details.
Deprecated. No reason given
Implementation: org.apache.maven.plugins.help.HelpMojo
Language: java
Available parameters:
detail (Default: false)
If true, display all settable properties for each goal.
Deprecated. No reason given
goal
The name of the goal for which to show help. If unspecified, all goals
will be displayed.
Deprecated. No reason given
indentSize (Default: 2)
The number of spaces per indentation level, should be positive.
Deprecated. No reason given
lineLength (Default: 80)
The maximum length of a display line, should be positive.
Deprecated. No reason given
help:system
Description: Displays a list of the platform details like system properties
and environment variables.
Deprecated. No reason given
Implementation: org.apache.maven.plugins.help.SystemMojo
Language: java
Available parameters:
output
Optional parameter to write the output of this help in a given file,
instead of writing to the console.
Note: Could be a relative path.
Deprecated. No reason given
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2 seconds
[INFO] Finished at: Mon Apr 20 14:04:13 CST 2009
[INFO] Final Memory: 5M/10M
[INFO] ------------------------------------------------------------------------
该选项能让你查看插件所有的目标及相关参数。但是有时候这些信息显得太多了。这时候你可以获取单个目标的信息,设置mojo参数和plugin参数。下面的命令列出了Compiler 插件的testCompile目标的所有信息:
mvn help:describe -Dplugin=compiler -Dmojo=testCompile -Dfull
view plaincopy to clipboardprint?
C:/>mvn help:describe -Dplugin=compiler -Dmojo=testCompile -Dfull
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'help'.
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Default Project
[INFO] task-segment: [help:describe] (aggregator-style)
[INFO] ------------------------------------------------------------------------
[INFO] [help:describe]
[INFO] Mojo: 'compiler:testCompile'
compiler:testCompile
Description: Compiles application test sources
Deprecated. No reason given
Implementation: org.apache.maven.plugin.TestCompilerMojo
Language: java
Bound to phase: test-compile
Available parameters:
compilerArgument
Sets the unformatted argument string to be passed to the compiler if fork
is set to true.
This is because the list of valid arguments passed to a Java compiler
varies based on the compiler version.
Deprecated. No reason given
compilerArguments
Sets the arguments to be passed to the compiler (prepending a dash) if
fork is set to true.
This is because the list of valid arguments passed to a Java compiler
varies based on the compiler version.
Deprecated. No reason given
compilerId (Default: javac)
The compiler id of the compiler to use. See this guide for more
information.
Deprecated. No reason given
compilerVersion
Version of the compiler to use, ex. '1.3', '1.5', if fork is set to true.
Deprecated. No reason given
debug (Default: true)
Set to true to include debugging information in the compiled class files.
Deprecated. No reason given
encoding
The -encoding argument for the Java compiler.
Deprecated. No reason given
executable
Sets the executable of the compiler to use when fork is true.
Deprecated. No reason given
failOnError (Default: true)
Indicates whether the build will continue even if there are compilation
errors; defaults to true.
Deprecated. No reason given
fork (Default: false)
Allows running the compiler in a separate process. If 'false' it uses the
built in compiler, while if 'true' it will use an executable.
Deprecated. No reason given
maxmem
Sets the maximum size, in megabytes, of the memory allocation pool, ex.
'128', '128m' if fork is set to true.
Deprecated. No reason given
meminitial
Initial size, in megabytes, of the memory allocation pool, ex. '64',
'64m' if fork is set to true.
Deprecated. No reason given
optimize (Default: false)
Set to true to optimize the compiled code using the compiler's
optimization methods.
Deprecated. No reason given
outputFileName
Sets the name of the output file when compiling a set of sources to a
single file.
Deprecated. No reason given
showDeprecation (Default: false)
Sets whether to show source locations where deprecated APIs are used.
Deprecated. No reason given
showWarnings (Default: false)
Set to true to show compilation warnings.
Deprecated. No reason given
skip
Set this to 'true' to bypass unit tests entirely. Its use is NOT
RECOMMENDED, but quite convenient on occasion.
Deprecated. No reason given
source
The -source argument for the Java compiler.
Deprecated. No reason given
staleMillis (Default: 0)
Sets the granularity in milliseconds of the last modification date for
testing whether a source needs recompilation.
Deprecated. No reason given
target
The -target argument for the Java compiler.
Deprecated. No reason given
testExcludes
A list of exclusion filters for the compiler.
Deprecated. No reason given
testIncludes
A list of inclusion filters for the compiler.
Deprecated. No reason given
verbose (Default: false)
Set to true to show messages about what the compiler is doing.
Deprecated. No reason given
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2 seconds
[INFO] Finished at: Mon Apr 20 14:10:06 CST 2009
[INFO] Final Memory: 5M/10M
[INFO] ------------------------------------------------------------------------
本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/dangdanglili/archive/2009/04/20/4094228.aspx
- Maven Help插件
- Maven help 插件
- 【maven】help插件
- Maven Help插件的使用
- Maven Help插件的使用
- Eclipse Help插件开发
- maven插件
- maven插件
- Maven 插件
- Maven插件
- maven 插件
- Maven插件
- Maven插件
- maven插件
- maven 插件
- Maven插件
- Maven - 插件
- maven 插件
- 默认只能上传2M附件, 如何放开限制? (asp.net C#)
- flash+php多文件上传 (内含源文件)
- HDFS写文件解析
- java.lang.OutOfMemoryError: Java heap space 解决方法
- 相忘于江湖:《监控》
- Maven Help插件
- 一个简单的ajax请求例子
- 2009年11月17日,宝贝女儿8个月了,我的最爱!
- 总是在一个人的时候
- 检查telnet服务是否开启
- OGR库读写mif/tab文件lonefox使用经验小结
- ubuntu9.10 编译freetype
- [译]星际争霸人工智能比赛——通告
- 使用SET NOCOUNT优化存储过程