|
||||||||||
| 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
public abstract class AbstractCloverMojo
Common code for all Clover plugin build Mojos.
| Field Summary | |
|---|---|
protected java.lang.String |
cloverOutputDirectory
The directory where the Clover plugin will put all the files it generates during the build process. |
protected boolean |
debug
If you wish to enable debug level logging in just the Clover plugin, set this to true. |
protected java.lang.String |
license
The full Clover license String to use. |
protected java.lang.String |
licenseLocation
A Clover license file to be used by the plugin. |
protected boolean |
skip
A flag to indicate not to run clover for this execution. |
protected java.io.File |
snapshot
The location to store the clover snapshot file. |
| Fields inherited from interface org.apache.maven.plugin.Mojo |
|---|
ROLE |
| Constructor Summary | |
|---|---|
AbstractCloverMojo()
|
|
| Method Summary | |
|---|---|
protected boolean |
areCloverDatabasesAvailable()
Check if a Clover database exists (either a single module Clover database or an aggregated one). |
void |
execute()
|
java.lang.String |
getCloverDatabase()
|
protected java.lang.String |
getCloverMergeDatabase()
|
int |
getFlushInterval()
|
java.lang.String |
getFlushPolicy()
|
java.lang.String |
getJdk()
|
org.apache.maven.project.MavenProject |
getProject()
|
java.util.List |
getReactorProjects()
|
static java.io.File |
getResourceAsFile(org.apache.maven.project.MavenProject project,
org.codehaus.plexus.resource.ResourceManager resourceManager,
java.lang.String resourceLocation,
org.apache.maven.plugin.logging.Log logger,
java.lang.ClassLoader classloader)
|
org.codehaus.plexus.resource.ResourceManager |
getResourceManager()
|
boolean |
getWaitForFlush()
|
boolean |
isSingleCloverDatabase()
|
static void |
registerCloverAntTasks(org.apache.tools.ant.Project antProject,
org.apache.maven.plugin.logging.Log log)
Register the Clover Ant tasks against a fake Ant { Project} object so that we can the tasks later on. |
protected void |
registerLicenseFile()
|
static void |
registerLicenseFile(org.apache.maven.project.MavenProject project,
org.codehaus.plexus.resource.ResourceManager resourceManager,
java.lang.String licenseLocation,
org.apache.maven.plugin.logging.Log logger,
java.lang.ClassLoader classloader,
java.lang.String licenseCert)
Registers the license file for Clover runtime by setting the clover.license.path system property. |
java.lang.String |
resolveCloverDatabase()
|
void |
setLicense(java.lang.String license)
|
void |
setLicenseLocation(java.lang.String licenseLocation)
|
void |
setProject(org.apache.maven.project.MavenProject project)
|
void |
setResourceManager(org.codehaus.plexus.resource.ResourceManager resourceManager)
|
static void |
waitForFlush(boolean waitForFlush,
int flushInterval)
Wait 2*'flush interval' milliseconds to ensure that the coverage data have been flushed to the Clover database. |
| 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.CloverConfiguration |
|---|
getLog |
| Field Detail |
|---|
protected java.lang.String cloverOutputDirectory
protected java.io.File snapshot
protected java.lang.String licenseLocation
licenseprotected java.lang.String license
licenseLocation.
NB. newline chars must be preserved.
A trial Clover license can be generated here.
licenseLocationprotected boolean skip
protected boolean debug
| Constructor Detail |
|---|
public AbstractCloverMojo()
| Method Detail |
|---|
public void execute()
throws org.apache.maven.plugin.MojoExecutionException
execute in interface org.apache.maven.plugin.Mojoorg.apache.maven.plugin.MojoExecutionExceptionMojo.execute()public void setResourceManager(org.codehaus.plexus.resource.ResourceManager resourceManager)
public org.codehaus.plexus.resource.ResourceManager getResourceManager()
protected void registerLicenseFile()
throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
public static void registerLicenseFile(org.apache.maven.project.MavenProject project,
org.codehaus.plexus.resource.ResourceManager resourceManager,
java.lang.String licenseLocation,
org.apache.maven.plugin.logging.Log logger,
java.lang.ClassLoader classloader,
java.lang.String licenseCert)
throws org.apache.maven.plugin.MojoExecutionException
clover.license.path system property.
If the user has configured the licenseLocation parameter the plugin tries to resolve it first as a
resource, then as a URL, and then as a file location on the filesystem. If the licenseLocation
parameter has not been defined by the user we look up a default Clover license in the classpath in
/clover.license.
Note: We're defining this method as static because it is also required in the report mojo and reporting mojos
and main mojos cannot share anything right now. See http://jira.codehaus.org/browse/MNG-1886.
org.apache.maven.plugin.MojoExecutionException - when the license file cannot be found
public static java.io.File getResourceAsFile(org.apache.maven.project.MavenProject project,
org.codehaus.plexus.resource.ResourceManager resourceManager,
java.lang.String resourceLocation,
org.apache.maven.plugin.logging.Log logger,
java.lang.ClassLoader classloader)
throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
public static void registerCloverAntTasks(org.apache.tools.ant.Project antProject,
org.apache.maven.plugin.logging.Log log)
Project} object so that we can the tasks later on.
This is the Java equivalent of the taskdef call that you would need in your Ant
build.xml file if you wanted to use the Clover Ant tasks from Ant.
Note: We're defining this method as static because it is also required in the report mojo and reporting mojos
and main mojos cannot share anything right now. See http://jira.codehaus.org/browse/MNG-1886.
public static void waitForFlush(boolean waitForFlush,
int flushInterval)
protected boolean areCloverDatabasesAvailable()
public org.apache.maven.project.MavenProject getProject()
getProject in interface CloverConfigurationpublic boolean getWaitForFlush()
public java.lang.String getJdk()
public java.lang.String getCloverDatabase()
getCloverDatabase in interface CloverConfigurationpublic java.lang.String resolveCloverDatabase()
resolveCloverDatabase in interface CloverConfigurationprotected java.lang.String getCloverMergeDatabase()
public int getFlushInterval()
public java.lang.String getFlushPolicy()
public void setProject(org.apache.maven.project.MavenProject project)
public void setLicenseLocation(java.lang.String licenseLocation)
public void setLicense(java.lang.String license)
public java.util.List getReactorProjects()
getReactorProjects in interface CloverConfigurationpublic boolean isSingleCloverDatabase()
isSingleCloverDatabase in interface CloverConfiguration
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||