Full name:
com.atlassian.maven.plugins:maven-clover2-plugin:3.0.0-m4r3:instrumentInternal
Description:
Instrument source roots.
Note 1: Do not call this MOJO directly. It is meant to be called in a custom forked lifecycle by the other Clover plugin MOJOs.
Note 2: We bind this mojo to the "validate" phase so that it executes prior to any other mojos
Attributes:
test
.validate
.Name | Type | Since | Description |
---|---|---|---|
cloverMergeDatabase | String |
- |
The location of the merged clover database to create when running a
report in a multimodule build. Default value is: ${project.build.directory}/clover/cloverMerge.db . |
cloverOutputDirectory | String |
- |
The directory where the Clover plugin will put all the files it
generates during the build process. For example the Clover plugin
will put instrumented sources somewhere inside this directory. Default value is: ${project.build.directory}/clover . |
localRepository | ArtifactRepository |
- |
Local maven repository. |
pluginArtifacts | List |
- |
List of all artifacts for this Clover plugin provided by Maven.
This is used internally to get a handle on the Clover JAR artifact.
Note: This is passed by Maven and must not be configured by the user. |
project | MavenProject |
- |
The Maven project instance for the executing project.
Note: This is passed by Maven and must not be configured by the user. |
Name | Type | Since | Description |
---|---|---|---|
cloverDatabase | String |
- |
The location of the Clover database. |
cloveredArtifactExpiryInMillis | long |
- |
The difference (in milliseconds) that a -clover classified artifact
can have to a non-clover classified artifact. If the -clover
classified artifact is more than cloveredArtifactExpiryInMillis
older than the non-clover classified artifact, then the
non-classified artifact will be used. This setting defaults to
2000. Default value is: 2000 . |
copyExcludedFiles | boolean |
- |
If set, then the maven-clover2-plugin will not copy files that were
excluded, across to the target/clover directory. This is useful if
the build is also using plugins such as the maven-gwt-plugin, that
scans for resources, and skips a step if none are found. Otherwise,
setting this to false could well cause build failures. Default value is: true . |
debug | boolean |
- |
If you wish to enable debug level logging in just the Clover
plugin, set this to true. This is useful for integrating Clover
into the build Default value is: false . |
distributedCoverage | DistributedCoverage |
- |
The configuration for distributed coverage collection by Clover. If
present, default values will be used and coverage will be collected
across JVMs. Optional nested elements (and their defaults) of
distributedCoverage are:
|
encoding | String |
- |
The character encoding to use when parsing source files. |
excludes | Set |
- |
The list of file to exclude from the instrumentation. |
excludesList | String |
- |
The comma seperated list of file to exclude from the instrumentation. |
flushInterval | int |
- |
When the Clover Flush Policy is set to "interval" or threaded this
value is the minimum period between flush operations (in
milliseconds). Default value is: 500 . |
flushPolicy | String |
- |
The Clover flush
policy to use. Valid values are directed ,
interval and threaded . Default value is: threaded . |
includes | Set |
- |
The list of file to include in the instrumentation. Defaults are **.java which are overwritten if <includes> is set by the user |
includesAllSourceRoots | boolean |
- |
Whether the Clover plugin should instrument all source roots (ie
even generated sources) or whether it should only instrument the
main source root. Default value is: false . |
includesList | String |
- |
The comma seperated list of files to include in the instrumentation. Defaults are **.java which are overwritten if <includes> is set by the user |
includesTestSourceRoots | boolean |
- |
Whether the Clover plugin should instrument test source roots. Default value is: true . |
instrumentation | String |
- |
The level to instrument to. Valid values are 'method' or 'statement'. Default is 'statement'. Setting this to 'method' greatly reduces the overhead of enabling Clover, however limited or no reporting is available. The current use of setting this to method is for Test Optimization only. |
jdk | String |
- |
Whether the Clover instrumentation should use the Clover
jdk14 , jdk15 or jdk16 flags
to parse sources. Valid values are 1.4, 1.5 and 1.6 . |
license | String |
- |
The full Clover license String to use. If supplied, this
certificate will be used over licenseLocation . NB.
newline chars must be preserved. A trial Clover license can be
generated
here. |
licenseLocation | String |
- |
A Clover license file to be used by the plugin. The plugin tries to resolve this parameter first as a resource, then as a URL, and then as a file location on the filesystem. A trial Clover license can be generated here. |
methodContexts | Map |
- |
Specifies the custom method contexts to use for filtering specific
methods from Clover reports. e.g.
<main>public static void main\(String args\[\]\).*</main>will define the context called 'main' which will match all public static void main methods. |
scope | String |
- |
When creating the clover.jar dependency, what scope to use. This may be one of: compile, test, provided etc. If not specified - provided will be used. |
singleCloverDatabase | boolean |
- |
If true, then a single cloverDatabase will be used for the entire
project. This flag will be ignored if a custom cloverDatabase
location is specified. Default value is: false . |
skip | boolean |
- |
A flag to indicate not to run clover for this execution. If set to
true, Clover will not be run. Default value is: false . |
snapshot | File |
- |
The location to store the clover snapshot file. This file needs to persist between builds to enable Clover's build optimization feature. If not specified, the snapshot will be stored next to the cloverDatabase. |
staleMillis | int |
- |
Sets the granularity in milliseconds of the last modification date
for testing whether a source needs reinstrumentation. Default value is: 0 . |
statementContexts | Map |
- |
Specifies the custom statement contexts to use for filtering
specific statements from Clover reports. e.g.
<log>^LOG\..*</log> defines a statement context called "log" which matches all LOG statements. |
useCloverClassifier | boolean |
- |
Whether or not to include the -clover classifier on artifacts. Default value is: true . |
useFullyQualifiedJavaLang | boolean |
- |
Use the fully qualified package name for java.lang.* classes. Default value is: true . |
waitForFlush | boolean |
- |
If true we'll wait 2*flushInterval to ensure coverage data is
flushed to the Clover database before running any query on it.
Note: The only use case where you would want to turn this off is if you're running your tests in a separate JVM. In that case the coverage data will be flushed by default upon the JVM shutdown and there would be no need to wait for the data to be flushed. As we can't control whether users want to fork their tests or not, we're offering this parameter to them. Default value is:true . |
The location of the Clover database.
java.lang.String
No
${maven.clover.cloverDatabase}
The location of the merged clover database to create when running a report in a multimodule build.
java.lang.String
Yes
${maven.clover.cloverMergeDatabase}
${project.build.directory}/clover/cloverMerge.db
The directory where the Clover plugin will put all the files it generates during the build process. For example the Clover plugin will put instrumented sources somewhere inside this directory.
java.lang.String
Yes
${project.build.directory}/clover
cloveredArtifactExpiryInMillis:
The difference (in milliseconds) that a -clover classified artifact can have to a non-clover classified artifact. If the -clover classified artifact is more than cloveredArtifactExpiryInMillis older than the non-clover classified artifact, then the non-classified artifact will be used. This setting defaults to 2000.
long
No
${maven.clover.cloveredArtifactExpiryInMillis}
2000
If set, then the maven-clover2-plugin will not copy files that were excluded, across to the target/clover directory. This is useful if the build is also using plugins such as the maven-gwt-plugin, that scans for resources, and skips a step if none are found. Otherwise, setting this to false could well cause build failures.
boolean
No
${maven.clover.copyExcludedFiles}
true
If you wish to enable debug level logging in just the Clover plugin, set this to true. This is useful for integrating Clover into the build
boolean
No
${maven.clover.debug}
false
The configuration for distributed coverage collection by Clover. If present, default values will be used and coverage will be collected across JVMs. Optional nested elements (and their defaults) of distributedCoverage are:
com.atlassian.maven.plugin.clover.DistributedCoverage
No
The character encoding to use when parsing source files.
java.lang.String
No
${maven.clover.encoding}
The list of file to exclude from the instrumentation.
java.util.Set
No
The comma seperated list of file to exclude from the instrumentation.
java.lang.String
No
${maven.clover.excludesList}
When the Clover Flush Policy is set to "interval" or threaded this value is the minimum period between flush operations (in milliseconds).
int
No
${maven.clover.flushInterval}
500
The Clover flush
policy to use. Valid values are directed
,
interval
and threaded
.
java.lang.String
No
${maven.clover.flushPolicy}
threaded
The list of file to include in the instrumentation. Defaults are **.java which are overwritten if <includes> is set by the user
java.util.Set
No
Whether the Clover plugin should instrument all source roots (ie even generated sources) or whether it should only instrument the main source root.
boolean
No
${maven.clover.includesAllSourceRoots}
false
The comma seperated list of files to include in the instrumentation. Defaults are **.java which are overwritten if <includes> is set by the user
java.lang.String
No
${maven.clover.includesList}
Whether the Clover plugin should instrument test source roots.
boolean
No
${maven.clover.includesTestSourceRoots}
true
The level to instrument to. Valid values are 'method' or 'statement'. Default is 'statement'. Setting this to 'method' greatly reduces the overhead of enabling Clover, however limited or no reporting is available. The current use of setting this to method is for Test Optimization only.
java.lang.String
No
${maven.clover.instrumentation}
jdk:
Whether the Clover instrumentation should use the Clover
jdk14
, jdk15
or jdk16
flags
to parse sources. Valid values are 1.4, 1.5 and 1.6 .
java.lang.String
No
${maven.clover.jdk}
The full Clover license String to use. If supplied, this
certificate will be used over licenseLocation
. NB.
newline chars must be preserved. A trial Clover license can be
generated
here.
java.lang.String
No
${maven.clover.license}
A Clover license file to be used by the plugin. The plugin tries to resolve this parameter first as a resource, then as a URL, and then as a file location on the filesystem. A trial Clover license can be generated here.
java.lang.String
No
${maven.clover.licenseLocation}
Local maven repository.
org.apache.maven.artifact.repository.ArtifactRepository
Yes
${localRepository}
Specifies the custom method contexts to use for filtering specific methods from Clover reports. e.g.
<main>public static void main\(String args\[\]\).*</main>will define the context called 'main' which will match all public static void main methods.
java.util.Map
No
List of all artifacts for this Clover plugin provided by Maven. This is used internally to get a handle on the Clover JAR artifact.
Note: This is passed by Maven and must not be configured by the user.
java.util.List
Yes
${plugin.artifacts}
The Maven project instance for the executing project.
Note: This is passed by Maven and must not be configured by the user.
org.apache.maven.project.MavenProject
Yes
${project}
When creating the clover.jar dependency, what scope to use. This may be one of: compile, test, provided etc. If not specified - provided will be used.
java.lang.String
No
${maven.clover.scope}
If true, then a single cloverDatabase will be used for the entire project. This flag will be ignored if a custom cloverDatabase location is specified.
boolean
No
${maven.clover.singleCloverDatabase}
false
skip:
A flag to indicate not to run clover for this execution. If set to true, Clover will not be run.
boolean
No
${maven.clover.skip}
false
The location to store the clover snapshot file. This file needs to persist between builds to enable Clover's build optimization feature. If not specified, the snapshot will be stored next to the cloverDatabase.
java.io.File
No
${maven.clover.snapshot}
Sets the granularity in milliseconds of the last modification date for testing whether a source needs reinstrumentation.
int
No
${maven.clover.staleMillis}
0
Specifies the custom statement contexts to use for filtering specific statements from Clover reports. e.g.
<log>^LOG\..*</log>
defines a statement context called "log" which matches all LOG statements.
java.util.Map
No
Whether or not to include the -clover classifier on artifacts.
boolean
No
${maven.clover.useCloverClassifier}
true
Use the fully qualified package name for java.lang.* classes.
boolean
No
${maven.clover.useFullyQualifiedJavaLang}
true
If true we'll wait 2*flushInterval to ensure coverage data is flushed to the Clover database before running any query on it.
Note: The only use case where you would want to turn this off is if you're running your tests in a separate JVM. In that case the coverage data will be flushed by default upon the JVM shutdown and there would be no need to wait for the data to be flushed. As we can't control whether users want to fork their tests or not, we're offering this parameter to them.
boolean
No
${maven.clover.waitForFlush}
true