|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.maven.plugin.AbstractMojo
com.atlassian.maven.plugin.clover.internal.AbstractCloverMojo
com.atlassian.maven.plugin.clover.internal.AbstractCloverInstrumentMojo
public class AbstractCloverInstrumentMojo
Common settings for clover2:instr / clover2:setup MOJOs.
| Field Summary | |
|---|---|
protected long |
cloveredArtifactExpiryInMillis
The difference (in milliseconds) that a -clover classified artifact can have to a non-clover classified artifact. |
protected boolean |
copyExcludedFiles
If set, then the maven-clover2-plugin will not copy files that were excluded, across to the target/clover directory. |
protected DistributedCoverage |
distributedCoverage
The configuration for distributed coverage collection by Clover. |
protected String |
encoding
The character encoding to use when parsing source files. |
protected Set<String> |
excludes
The list of file to exclude from the instrumentation. |
protected String |
excludesList
The comma seperated list of file to exclude from the instrumentation. |
protected String |
flushPolicy
The Clover flush policy to use. |
protected File |
groverJar
By default, Maven Clover Plugin generates the ${java.io.tmpdir}/grover*.jar file during setup,
which is next being added as the dependent artifact to the build. |
protected Set<String> |
includes
The list of file to include in the instrumentation. |
protected boolean |
includesAllSourceRoots
Till 3.1.11: whether the Clover plugin should instrument all source roots (for example src/main/java, src/main/groovy, target/generated-sources, so including the generated sources)
or whether it should only instrument the main source root (usually src/main/java). |
protected String |
includesList
The comma seperated list of files to include in the instrumentation. |
protected boolean |
includesTestSourceRoots
Whether the Clover plugin should instrument test source roots. |
protected String |
instrumentation
The level to instrument to. |
protected String |
jdk
Which Java language level Clover shall use to parse sources. |
protected Map<String,String> |
methodContexts
Specifies the custom method contexts to use for filtering specific methods from Clover reports. |
protected String |
scope
When creating the clover.jar dependency, what scope to use. |
protected boolean |
setTestFailureIgnore
If set to true, Clover will add several properties to the build configuration which
disable a build failure for following plugins:
maven-surefire-plugin (maven.test.failure.ignore=true)
maven-failsafe-plugin (maven.test.failure.ignore=true)
maven-checkstyle-plugin (checkstyle.failOnViolation=false)
maven-pmd-plugin (pmd.failOnViolation=false)
Thanks to this, build continues despite test failures or code validation failures and thus
it is possible to generate a Clover coverage report for failed tests at the end of the build. |
protected boolean |
skipGroverJar
By default, Maven Clover Plugin generates the ${java.io.tmpdir}/grover*.jar file during setup,
which is next being added as the dependent artifact to the build. |
protected int |
staleMillis
Sets the granularity in milliseconds of the last modification date for testing whether a source needs reinstrumentation. |
protected Map<String,String> |
statementContexts
Specifies the custom statement contexts to use for filtering specific statements from Clover reports. |
protected boolean |
useCloverClassifier
Whether or not to include the -clover classifier on artifacts. |
protected boolean |
useFullyQualifiedJavaLang
Use the fully qualified package name for java.lang.* classes. |
| Fields inherited from class com.atlassian.maven.plugin.clover.internal.AbstractCloverMojo |
|---|
cloverOutputDirectory, debug, license, licenseLocation, skip, snapshot |
| Fields inherited from interface org.apache.maven.plugin.Mojo |
|---|
ROLE |
| Constructor Summary | |
|---|---|
AbstractCloverInstrumentMojo()
|
|
| Method Summary | |
|---|---|
DistributedCoverage |
getDistributedCoverage()
|
String |
getEncoding()
|
Set<String> |
getExcludes()
|
String |
getFlushPolicy()
|
Set<String> |
getIncludes()
|
String |
getInstrumentation()
|
String |
getInstrumentLambda()
|
String |
getJdk()
|
Map<String,String> |
getMethodContexts()
|
int |
getStaleMillis()
|
Map<String,String> |
getStatementContexts()
|
boolean |
isCopyExcludedFiles()
|
boolean |
isIncludesAllSourceRoots()
|
boolean |
isUseFullyQualifiedJavaLang()
|
| Methods inherited from class com.atlassian.maven.plugin.clover.internal.AbstractCloverMojo |
|---|
areCloverDatabasesAvailable, execute, getCloverDatabase, getCloverMergeDatabase, getDescendentModuleProjects, getFlushInterval, getModuleProjects, getProject, getReactorProjects, getResourceAsFile, getResourceManager, getWaitForFlush, isLastProjectInReactor, isModuleOfProject, isSingleCloverDatabase, registerCloverAntTasks, registerLicenseFile, registerLicenseFile, resolveCloverDatabase, setLicense, setLicenseLocation, setProject, setResourceManager, waitForFlush |
| Methods inherited from class org.apache.maven.plugin.AbstractMojo |
|---|
getLog, getPluginContext, setLog, setPluginContext |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.atlassian.maven.plugin.clover.internal.CompilerConfiguration |
|---|
getFlushInterval |
| Methods inherited from interface com.atlassian.maven.plugin.clover.internal.CloverConfiguration |
|---|
getCloverDatabase, getLog, getProject, getReactorProjects, isSingleCloverDatabase, resolveCloverDatabase |
| Field Detail |
|---|
protected long cloveredArtifactExpiryInMillis
protected boolean copyExcludedFiles
protected DistributedCoverage distributedCoverage
protected String encoding
protected Set<String> excludes
protected String excludesList
protected String flushPolicy
directed, interval and threaded.
protected File groverJar
By default, Maven Clover Plugin generates the ${java.io.tmpdir}/grover*.jar file during setup,
which is next being added as the dependent artifact to the build. As the file has generated, unique
name and the jar is not being removed at the end of the build, these files can litter the temporary
directory.
By setting this parameter you can:
a) specify constant file name for generated artifact,
b) choose location different than ${java.io.tmpdir}.
However, you must ensure that:
a) grover.jar will not be deleted till end of the build (for example don't put into ./target directory
and next run mvn clover2:setup clean)
b) grover.jar will not be shared among builds with different Maven Clover Plugin versions used (for
example if ProjectA uses Clover v 3.1.8 and ProjectB uses Clover v 3.1.9 then they shall have different
groverJar locations defined)
protected Set<String> includes
protected String includesList
protected boolean includesAllSourceRoots
Till 3.1.11: whether the Clover plugin should instrument all source roots (for example
src/main/java, src/main/groovy, target/generated-sources, so including the generated sources)
or whether it should only instrument the main source root (usually src/main/java).
Since 3.1.12: whether the Clover plugin should instrument all source roots (for example
src/main/java, src/main/groovy, target/generated-sources, so including the generated sources)
or whether it should instrument non-generated source roots (i.e. all roots except target/generated-sources/*)
protected boolean includesTestSourceRoots
protected String instrumentation
protected String jdk
protected Map<String,String> methodContexts
<main>public static void main\(String args\[\]\).*</main>will define the context called 'main' which will match all public static void main methods.
protected String scope
protected boolean setTestFailureIgnore
If set to true, Clover will add several properties to the build configuration which
disable a build failure for following plugins:
Thanks to this, build continues despite test failures or code validation failures and thus it is possible to generate a Clover coverage report for failed tests at the end of the build.
Note: before version 3.1.9 the testFailureIgnore property was set to true for the forked Clover lifecycle ('instrument' goal) for 'test' and 'integration-test' phases. Since 3.1.9 it is no longer set.
protected boolean skipGroverJar
By default, Maven Clover Plugin generates the ${java.io.tmpdir}/grover*.jar file during setup,
which is next being added as the dependent artifact to the build. As the file has generated, unique
name and the jar is not being removed at the end of the build, these files can litter the temporary
directory.
In case when there is no Groovy code in the project, this parameter can be set to true in order
to disable generation of grover.jar artifact.
protected Map<String,String> statementContexts
<log>^LOG\..*</log>defines a statement context called "log" which matches all LOG statements.
protected int staleMillis
protected boolean useCloverClassifier
protected boolean useFullyQualifiedJavaLang
| Constructor Detail |
|---|
public AbstractCloverInstrumentMojo()
| Method Detail |
|---|
public boolean isCopyExcludedFiles()
isCopyExcludedFiles in interface CompilerConfigurationpublic String getEncoding()
getEncoding in interface CompilerConfigurationpublic DistributedCoverage getDistributedCoverage()
getDistributedCoverage in interface CompilerConfigurationpublic Set<String> getExcludes()
getExcludes in interface CompilerConfigurationpublic String getFlushPolicy()
getFlushPolicy in interface CompilerConfigurationpublic Set<String> getIncludes()
getIncludes in interface CompilerConfigurationpublic String getInstrumentation()
getInstrumentation in interface CompilerConfigurationpublic String getInstrumentLambda()
getInstrumentLambda in interface CompilerConfigurationpublic String getJdk()
getJdk in interface CompilerConfigurationpublic Map<String,String> getMethodContexts()
getMethodContexts in interface CompilerConfigurationpublic Map<String,String> getStatementContexts()
getStatementContexts in interface CompilerConfigurationpublic int getStaleMillis()
getStaleMillis in interface CompilerConfigurationpublic boolean isIncludesAllSourceRoots()
isIncludesAllSourceRoots in interface CompilerConfigurationpublic boolean isUseFullyQualifiedJavaLang()
isUseFullyQualifiedJavaLang in interface CompilerConfiguration
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||