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.internal.AbstractCloverInstrumentMojo
              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 AbstractCloverInstrumentMojo

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
static String CLOVER_CORE_ARTIFACT_ID
           
static String CLOVER_CORE_GROUP_ID
           
protected  List repositories
          Remote repositories used for the project.
 
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
CloverInstrumentInternalMojo()
           
 
Method Summary
protected  List<File> calcIncludedFilesForGroovy()
           
 void execute()
          
protected  org.apache.maven.artifact.Artifact findCloverArtifact(List<org.apache.maven.artifact.Artifact> pluginArtifacts)
           
static String getOriginalSrcDir(String module)
           
static String getOriginalSrcTestDir(String module)
           
protected  String getSrcName()
           
protected  String getSrcTestName()
           
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  Set<org.apache.maven.artifact.Artifact> swizzleCloverDependencies(Set<org.apache.maven.artifact.Artifact> artifacts)
           
 
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
 

Field Detail

CLOVER_CORE_GROUP_ID

public static final String CLOVER_CORE_GROUP_ID
See Also:
Constant Field Values

CLOVER_CORE_ARTIFACT_ID

public static final String CLOVER_CORE_ARTIFACT_ID
See Also:
Constant Field Values

repositories

protected List repositories
Remote repositories used for the project.

Constructor Detail

CloverInstrumentInternalMojo

public CloverInstrumentInternalMojo()
Method Detail

getOriginalSrcDir

public static String getOriginalSrcDir(String module)

getOriginalSrcTestDir

public static String getOriginalSrcTestDir(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()

calcIncludedFilesForGroovy

protected List<File> calcIncludedFilesForGroovy()
Returns:
List<File>
See Also:
AbstractInstrumenter.instrument(), redirectOutputDirectories(), Groovy-Eclipse+compiler+plugin+for+Maven

resetSrcDirsOriginal

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

getSrcTestName

protected String getSrcTestName()

getSrcName

protected 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 Set<org.apache.maven.artifact.Artifact> swizzleCloverDependencies(Set<org.apache.maven.artifact.Artifact> artifacts)

findCloverArtifact

protected org.apache.maven.artifact.Artifact findCloverArtifact(List<org.apache.maven.artifact.Artifact> pluginArtifacts)

setArtifactFactory

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

setArtifactResolver

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


Copyright © 2015 Atlassian Pty Ltd. All Rights Reserved.