com.atlassian.maven.plugin.clover
Class CloverInstrumentMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by com.atlassian.maven.plugin.clover.internal.AbstractCloverMojo
          extended by com.atlassian.maven.plugin.clover.internal.AbstractCloverInstrumentMojo
              extended by com.atlassian.maven.plugin.clover.CloverInstrumentMojo
All Implemented Interfaces:
CloverConfiguration, CompilerConfiguration, org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
Direct Known Subclasses:
CloverInstrumentTestMojo

public class CloverInstrumentMojo
extends AbstractCloverInstrumentMojo

Instrument all sources using Clover and forks a custom lifecycle to execute project's tests on the instrumented code so that a Clover database is created.

Note: We're forking a lifecycle because we don't want the Clover instrumentation to affect the main lifecycle build. This will prevent instrumented sources to be put in production by error. Thus running mvn install on a project where this instrument goal has been specified will run the build twice: once for building the project as usual and another time for instrumenting the sources with Clover and generating the Clover database.


Field Summary
 
Fields inherited from class com.atlassian.maven.plugin.clover.internal.AbstractCloverInstrumentMojo
cloveredArtifactExpiryInMillis, copyExcludedFiles, distributedCoverage, encoding, excludes, excludesList, flushPolicy, groverJar, includes, includesAllSourceRoots, includesList, includesTestSourceRoots, instrumentation, jdk, methodContexts, scope, setTestFailureIgnore, skipGroverJar, staleMillis, statementContexts, useCloverClassifier, useFullyQualifiedJavaLang
 
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
CloverInstrumentMojo()
           
 
Method Summary
 void execute()
          
 
Methods inherited from class com.atlassian.maven.plugin.clover.internal.AbstractCloverInstrumentMojo
getDistributedCoverage, getEncoding, getExcludes, getFlushPolicy, getIncludes, getInstrumentation, getInstrumentLambda, getJdk, getMethodContexts, getStaleMillis, getStatementContexts, isCopyExcludedFiles, isIncludesAllSourceRoots, isUseFullyQualifiedJavaLang
 
Methods inherited from class com.atlassian.maven.plugin.clover.internal.AbstractCloverMojo
areCloverDatabasesAvailable, 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
 

Constructor Detail

CloverInstrumentMojo

public CloverInstrumentMojo()
Method Detail

execute

public void execute()
             throws org.apache.maven.plugin.MojoExecutionException

Specified by:
execute in interface org.apache.maven.plugin.Mojo
Overrides:
execute in class AbstractCloverMojo
Throws:
org.apache.maven.plugin.MojoExecutionException
See Also:
AbstractCloverMojo.execute()


Copyright © 2014 Atlassian Pty Ltd. All Rights Reserved.