zhanpeng@GE70:~$ mvn help:describe -Dplugin=compiler -Dgoal=compile -Ddetail=true
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-help-plugin:2.2:describe (default-cli) @ standalone-pom ---
[INFO] Mojo: 'compiler:compile'
compiler:compile
Description: Compiles application sources
Implementation: org.apache.maven.plugin.compiler.CompilerMojo
Language: java
Bound to phase: compile
Available parameters:
annotationProcessorPaths
Classpath elements to supply as annotation processor path. If specified,
the compiler will detect annotation processors only in those classpath
elements. If omitted, the default classpath is used to detect annotation
processors. The detection itself depends on the configuration of
annotationProcessors.
Each classpath element is specified using their Maven coordinates
(groupId, artifactId, version, classifier, type). Transitive dependencies
are added automatically. Example:
<configuration>
<annotationProcessorPaths>
<path>
<groupId>org.sample</groupId>
<artifactId>sample-annotation-processor</artifactId>
<version>1.2.3</version>
</path>
<!-- ... more ... -->
</annotationProcessorPaths>
</configuration>
annotationProcessors
Names of annotation processors to run. Only applies to JDK 1.6+ If not
set, the default annotation processors discovery process applies.
compilerArgs
Sets the arguments to be passed to the compiler if fork is set to true.
Example:
<compilerArgs>
<arg>-Xmaxerrs=1000</arg>
<arg>-Xlint</arg>
<arg>-J-Duser.language=en_us</arg>
</compilerArgs>
compilerArgument
Sets the unformatted single argument string to be passed to the compiler
if fork is set to true. To pass multiple arguments such as -Xmaxerrs 1000
(which are actually two arguments) you have to use compilerArguments.
This is because the list of valid arguments passed to a Java compiler
varies based on the compiler version.
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.
To pass -Xmaxerrs 1000 -Xlint -Xlint:-path -Averbose=true you should
include the following:
<compilerArguments>
<Xmaxerrs>1000</Xmaxerrs>
<Xlint/>
<Xlint:-path/>
<Averbose>true</Averbose>
</compilerArguments>
Deprecated. use {@link #compilerArgs} instead.
compilerId (Default: javac)
User property: maven.compiler.compilerId
The compiler id of the compiler to use. See this guide for more
information.
compilerReuseStrategy (Default: ${reuseCreated})
User property: maven.compiler.compilerReuseStrategy
Strategy to re use javacc class created:
- reuseCreated (default): will reuse already created but in case of
multi-threaded builds, each thread will have its own instance
- reuseSame: the same Javacc class will be used for each compilation even
for multi-threaded build
- alwaysNew: a new Javacc class will be created for each compilation
Note this parameter value depends on the os/jdk you are using, but the
default value should work on most of env.
compilerVersion
User property: maven.compiler.compilerVersion
Version of the compiler to use, ex. '1.3', '1.5', if fork is set to true.
debug (Default: true)
User property: maven.compiler.debug
Set to true to include debugging information in the compiled class files.
debuglevel
User property: maven.compiler.debuglevel
Keyword list to be appended to the -g command-line switch. Legal values
are none or a comma-separated list of the following keywords: lines,
vars, and source. If debug level is not specified, by default, nothing
will be appended to -g. If debug is not turned on, this attribute will be
ignored.
encoding (Default: ${project.build.sourceEncoding})
User property: encoding
The -encoding argument for the Java compiler.
excludes
A list of exclusion filters for the compiler.
executable
User property: maven.compiler.executable
Sets the executable of the compiler to use when fork is true.
failOnError (Default: true)
User property: maven.compiler.failOnError
Indicates whether the build will continue even if there are compilation
errors.
fileExtensions
file extensions to check timestamp for incremental build default contains
only .class
forceJavacCompilerUse (Default: false)
User property: maven.compiler.forceJavacCompilerUse
compiler can now use javax.tools if available in your current jdk, you
can disable this feature using
-Dmaven.compiler.forceJavacCompilerUse=true or in the plugin
configuration
fork (Default: false)
User property: maven.compiler.fork
Allows running the compiler in a separate process. If false it uses the
built in compiler, while if true it will use an executable.
generatedSourcesDirectory (Default:
${project.build.directory}/generated-sources/annotations)
Specify where to place generated source files created by annotation
processing. Only applies to JDK 1.6+
includes
A list of inclusion filters for the compiler.
maxmem
User property: maven.compiler.maxmem
Sets the maximum size, in megabytes, of the memory allocation pool, ex.
'128', '128m' if fork is set to true.
meminitial
User property: maven.compiler.meminitial
Initial size, in megabytes, of the memory allocation pool, ex. '64',
'64m' if fork is set to true.
optimize (Default: false)
User property: maven.compiler.optimize
Set to true to optimize the compiled code using the compiler's
optimization methods.
outputFileName
Sets the name of the output file when compiling a set of sources to a
single file.
expression='${project.build.finalName}'
proc
Sets whether annotation processing is performed or not. Only applies to
JDK 1.6+ If not set, both compilation and annotation processing are
performed at the same time.
Allowed values are:
- none - no annotation processing is performed.
- only - only annotation processing is done, no compilation.
showDeprecation (Default: false)
User property: maven.compiler.showDeprecation
Sets whether to show source locations where deprecated APIs are used.
showWarnings (Default: false)
User property: maven.compiler.showWarnings
Set to true to show compilation warnings.
skipMain
User property: maven.main.skip
Set this to 'true' to bypass compilation of main sources. Its use is NOT
RECOMMENDED, but quite convenient on occasion.
skipMultiThreadWarning (Default: false)
User property: maven.compiler.skipMultiThreadWarning
(no description available)
source (Default: 1.5)
User property: maven.compiler.source
The -source argument for the Java compiler.
staleMillis (Default: 0)
User property: lastModGranularityMs
Sets the granularity in milliseconds of the last modification date for
testing whether a source needs recompilation.
target (Default: 1.5)
User property: maven.compiler.target
The -target argument for the Java compiler.
useIncrementalCompilation (Default: true)
User property: maven.compiler.useIncrementalCompilation
to enable/disable incrementation compilation feature
verbose (Default: false)
User property: maven.compiler.verbose
Set to true to show messages about what the compiler is doing.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.768s
[INFO] Finished at: Fri Aug 26 22:25:55 CST 2016
[INFO] Final Memory: 9M/180M
[INFO] ------------------------------------------------------------------------
##mvn help:help -Ddetail=true
zhanpeng@GE70:~$ mvn help:help -Ddetail=true
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-help-plugin:2.2:help (default-cli) @ standalone-pom ---
[INFO] Maven Help Plugin 2.2
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.
This plugin has 9 goals:
help:active-profiles
Displays a list of the profiles which are currently active for this build.
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.
help:all-profiles
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.
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.
help:describe
Displays a list of the attributes for a Maven Plugin and/or goals (aka Mojo -
Maven plain Old Java Object).
Available parameters:
artifactId
The Maven Plugin artifactId to describe.
Note: Should be used with groupId parameter.
cmd
A Maven command like a single goal or a single phase following the Maven
command line:
mvn [options] [<goal(s)>] [<phase(s)>]
detail
This flag specifies that a detailed (verbose) list of goal (Mojo)
information should be 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.
groupId
The Maven Plugin groupId to describe.
Note: Should be used with artifactId parameter.
medium
This flag specifies that a medium list of goal (Mojo) information should
be given.
minimal
This flag specifies that a minimal list of goal (Mojo) information should
be 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.
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'
version
The Maven Plugin version to describe.
Note: Should be used with groupId/artifactId parameters.
help:effective-pom
Displays the effective POM as an XML for this build, with the active profiles
factored in.
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.
help:effective-settings
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.
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.
showPasswords
For security reasons, all passwords are hidden by default. Set this to
true to show all passwords.
help:evaluate
Evaluates Maven expressions given by the user in an interactive mode.
Available parameters:
artifact
An artifact for evaluating Maven expressions.
Note: Should respect the Maven format, i.e.
groupId:artifactId[:version][:classifier].
expression
An expression to evaluate instead of prompting. Note that this must not
include the surrounding ${...}.
help:expressions
Displays the supported Plugin expressions used by Maven.
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.
help:help
Display help information on maven-help-plugin.
Call mvn help:help -Ddetail=true -Dgoal=<goal-name> to display parameter
details.
Available parameters:
detail
If true, display all settable properties for each goal.
goal
The name of the goal for which to show help. If unspecified, all goals
will be displayed.
indentSize
The number of spaces per indentation level, should be positive.
lineLength
The maximum length of a display line, should be positive.
help:system
Displays a list of the platform details like system properties and environment
variables.
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.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.853s
[INFO] Finished at: Fri Aug 26 22:33:07 CST 2016
[INFO] Final Memory: 8M/180M
[INFO] ------------------------------------------------------------------------