com.atlassian.maven.plugin.clover
Class CloverInstrumentInternalMojo

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.CloverInstrumentInternalMojo
All Implemented Interfaces:
CloverConfiguration, CompilerConfiguration, org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
Direct Known Subclasses:
CloverResetMojo, CloverSetupMojo

public class CloverInstrumentInternalMojo
extends AbstractCloverMojo
implements CompilerConfiguration

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


Field Summary
 
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
CloverInstrumentInternalMojo()
           
 
Method Summary
 boolean copyExcludedFiles()
           
 void execute()
          
protected  org.apache.maven.artifact.Artifact findCloverArtifact(java.util.List pluginArtifacts)
           
 DistributedCoverage getDistributedCoverage()
           
 java.lang.String getEncoding()
           
 java.util.Set getExcludes()
           
 java.util.Set getIncludes()
           
 java.lang.String getInstrumentation()
           
 java.util.Map getMethodContexts()
           
static java.lang.String getOriginalSrcDir(java.lang.String module)
           
static java.lang.String getOriginalSrcTestDir(java.lang.String module)
           
protected  java.lang.String getSrcName()
           
protected  java.lang.String getSrcTestName()
           
 int getStaleMillis()
           
 java.util.Map getStatementContexts()
           
 boolean includesAllSourceRoots()
           
 boolean isUseFullyQualifiedJavaLang()
           
protected  void redirectArtifact()
          Modify main artifact to add a "clover" classifier to it so that it's not mixed with the main artifact of a normal build.
protected  void redirectOutputDirectories()
           
static void resetSrcDirsOriginal(org.apache.maven.artifact.Artifact artifact, CompilerConfiguration config)
           
protected  void setArtifactFactory(org.apache.maven.artifact.factory.ArtifactFactory artifactFactory)
           
protected  void setArtifactResolver(org.apache.maven.artifact.resolver.ArtifactResolver artifactResolver)
           
protected  java.util.Set swizzleCloverDependencies(java.util.Set artifacts)
           
 
Methods inherited from class com.atlassian.maven.plugin.clover.internal.AbstractCloverMojo
areCloverDatabasesAvailable, getCloverDatabase, getCloverMergeDatabase, getFlushInterval, getFlushPolicy, getJdk, getProject, getReactorProjects, getResourceAsFile, getResourceManager, getWaitForFlush, 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, getFlushPolicy, getJdk
 
Methods inherited from interface com.atlassian.maven.plugin.clover.internal.CloverConfiguration
getCloverDatabase, getLog, getProject, getReactorProjects, isSingleCloverDatabase, resolveCloverDatabase
 

Constructor Detail

CloverInstrumentInternalMojo

public CloverInstrumentInternalMojo()
Method Detail

getOriginalSrcDir

public static java.lang.String getOriginalSrcDir(java.lang.String module)

getOriginalSrcTestDir

public static java.lang.String getOriginalSrcTestDir(java.lang.String module)

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()

resetSrcDirsOriginal

public static void resetSrcDirsOriginal(org.apache.maven.artifact.Artifact artifact,
                                        CompilerConfiguration config)

getSrcTestName

protected java.lang.String getSrcTestName()

getSrcName

protected java.lang.String getSrcName()

redirectOutputDirectories

protected void redirectOutputDirectories()

redirectArtifact

protected void redirectArtifact()
Modify main artifact to add a "clover" classifier to it so that it's not mixed with the main artifact of a normal build.


swizzleCloverDependencies

protected java.util.Set swizzleCloverDependencies(java.util.Set artifacts)

findCloverArtifact

protected org.apache.maven.artifact.Artifact findCloverArtifact(java.util.List pluginArtifacts)

setArtifactFactory

protected void setArtifactFactory(org.apache.maven.artifact.factory.ArtifactFactory artifactFactory)

setArtifactResolver

protected void setArtifactResolver(org.apache.maven.artifact.resolver.ArtifactResolver artifactResolver)

getIncludes

public java.util.Set getIncludes()
Specified by:
getIncludes in interface CompilerConfiguration

getExcludes

public java.util.Set getExcludes()
Specified by:
getExcludes in interface CompilerConfiguration

includesAllSourceRoots

public boolean includesAllSourceRoots()
Specified by:
includesAllSourceRoots in interface CompilerConfiguration

isUseFullyQualifiedJavaLang

public boolean isUseFullyQualifiedJavaLang()
Specified by:
isUseFullyQualifiedJavaLang in interface CompilerConfiguration

getEncoding

public java.lang.String getEncoding()
Specified by:
getEncoding in interface CompilerConfiguration

getMethodContexts

public java.util.Map getMethodContexts()
Specified by:
getMethodContexts in interface CompilerConfiguration

getStatementContexts

public java.util.Map getStatementContexts()
Specified by:
getStatementContexts in interface CompilerConfiguration

getStaleMillis

public int getStaleMillis()
Specified by:
getStaleMillis in interface CompilerConfiguration

getInstrumentation

public java.lang.String getInstrumentation()
Specified by:
getInstrumentation in interface CompilerConfiguration

copyExcludedFiles

public boolean copyExcludedFiles()
Specified by:
copyExcludedFiles in interface CompilerConfiguration

getDistributedCoverage

public DistributedCoverage getDistributedCoverage()
Specified by:
getDistributedCoverage in interface CompilerConfiguration


Copyright © 2009 Atlassian Pty Ltd. All Rights Reserved.