clover2:instrumentInternal

Full name:

com.atlassian.maven.plugins:maven-clover2-plugin:2.3.1: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:

  • Requires a Maven 2.0 project to be executed.
  • Requires dependency resolution of artifacts in scope: test.
  • Binds by default to the lifecycle phase: validate.

Required Parameters

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.

Optional Parameters

Name Type Since Description
cloverDatabase String - The location of the Clover database . Default value is: ${project.build.directory}/clover/clover.db.
encoding String - The character encoding to use when parsing source files.
excludes Set - The 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.
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.
includesTestSourceRoots boolean - Whether the Clover plugin should instrument test source roots. Default value is: true.
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 .
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.
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.

Parameter Details

cloverDatabase :

The location of the Clover database .

  • Type: java.lang.String
  • Required: No
  • Expression: ${maven.clover.cloverDatabase}
  • Default: ${project.build.directory}/clover/clover.db

cloverMergeDatabase :

The location of the merged clover database to create when running a report in a multimodule build.

  • Type: java.lang.String
  • Required: Yes
  • Expression: ${maven.clover.cloverMergeDatabase}
  • Default: ${project.build.directory}/clover/cloverMerge.db

cloverOutputDirectory :

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.

  • Type: java.lang.String
  • Required: Yes
  • Default: ${project.build.directory}/clover

encoding :

The character encoding to use when parsing source files.

  • Type: java.lang.String
  • Required: No
  • Expression: ${maven.clover.encoding}

excludes :

The list of file to exclude from the instrumentation.

  • Type: java.util.Set
  • Required: No

flushInterval :

When the Clover Flush Policy is set to "interval" or threaded this value is the minimum period between flush operations (in milliseconds).

  • Type: int
  • Required: No
  • Expression: ${maven.clover.flushInterval}
  • Default: 500

flushPolicy :

The Clover flush policy to use. Valid values are directed, interval and threaded.

  • Type: java.lang.String
  • Required: No
  • Expression: ${maven.clover.flushPolicy}
  • Default: threaded

includes :

The list of file to include in the instrumentation.

  • Type: java.util.Set
  • Required: No

includesAllSourceRoots :

Whether the Clover plugin should instrument all source roots (ie even generated sources) or whether it should only instrument the main source root.

  • Type: boolean
  • Required: No
  • Expression: ${maven.clover.includesAllSourceRoots}
  • Default: false

includesTestSourceRoots :

Whether the Clover plugin should instrument test source roots.

  • Type: boolean
  • Required: No
  • Expression: ${maven.clover.includesTestSourceRoots}
  • Default: true

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 .

  • Type: java.lang.String
  • Required: No
  • Expression: ${maven.clover.jdk}

license :

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 .

  • Type: java.lang.String
  • Required: No
  • Expression: ${maven.clover.license}

licenseLocation :

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 .

  • Type: java.lang.String
  • Required: No
  • Expression: ${maven.clover.licenseLocation}

localRepository :

Local maven repository.

  • Type: org.apache.maven.artifact.repository.ArtifactRepository
  • Required: Yes
  • Expression: ${localRepository}

pluginArtifacts :

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.

  • Type: java.util.List
  • Required: Yes
  • Expression: ${plugin.artifacts}

project :

The Maven project instance for the executing project.

Note: This is passed by Maven and must not be configured by the user.

  • Type: org.apache.maven.project.MavenProject
  • Required: Yes
  • Expression: ${project}

skip :

A flag to indicate not to run clover for this execution. If set to true, Clover will not be run.

  • Type: boolean
  • Required: No
  • Expression: ${maven.clover.skip}
  • Default: false

useFullyQualifiedJavaLang :

Use the fully qualified package name for java.lang.* classes.

  • Type: boolean
  • Required: No
  • Expression: ${maven.clover.useFullyQualifiedJavaLang}
  • Default: true

waitForFlush :

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.

  • Type: boolean
  • Required: No
  • Expression: ${maven.clover.waitForFlush}
  • Default: true