org.codehaus.mojo.emma
Class EmmaReportMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.apache.maven.reporting.AbstractMavenReport
          extended by org.codehaus.mojo.emma.EmmaReportMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo, org.apache.maven.reporting.MavenReport

public class EmmaReportMojo
extends org.apache.maven.reporting.AbstractMavenReport

Instruments, tests, and generates an EMMA report.

Author:
Alexandre ROMAN

Field Summary
protected  String columns
          Specifies which report columns and in which order to use for report generation, as a comma-separated list of column ids.
protected  File[] dataFiles
          Class coverage data files.
protected  String depth
          Specifies the amount of detail to be included in the generated coverage reports.
protected  File metadataFile
          Location to store class coverage metadata.
protected  String metrics
          Specifies the threshold coverage metrics values for a given set of columns.
protected  File outputDirectory
          Output directory for the report.
protected  String outputEncoding
          Report encoding.
protected  List pluginClasspath
          Plugin classpath.
protected  org.apache.maven.project.MavenProject project
          Maven project.
protected  org.apache.maven.doxia.siterenderer.Renderer siteRenderer
          Site renderer.
protected  String sort
          Specifies report column sorting order, as a comma-separated list of columns ids prefixed with "+" for ascending or "-" for descending directions.
protected  File[] sourcePaths
          Source locations.
protected  boolean verbose
          Sets EMMA verbosity level to verbose.
 
Fields inherited from interface org.apache.maven.reporting.MavenReport
CATEGORY_PROJECT_INFORMATION, CATEGORY_PROJECT_REPORTS, ROLE
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
EmmaReportMojo()
           
 
Method Summary
 boolean canGenerateReport()
          Checks if the report can be generated.
protected  void checkParameters()
          Check parameters.
protected  void executeReport(Locale locale)
          Executes the report for a specific locale.
 String getDescription(Locale locale)
          Gets the description in the specified locale.
 String getName(Locale locale)
          Gets the name in the specified locale.
protected  String getOutputDirectory()
          Gets the output directory.
 String getOutputName()
          Gets the output name.
protected  org.apache.maven.project.MavenProject getProject()
          Gets the maven project.
protected  ResourceBundle getResourceBundle(Locale locale)
          Gets the resource bundle for the specified locale.
protected  org.apache.maven.doxia.siterenderer.Renderer getSiteRenderer()
          Gets the site renderer.
 boolean isExternalReport()
          Returns true as this is an external report.
 
Methods inherited from class org.apache.maven.reporting.AbstractMavenReport
closeReport, execute, generate, generate, generate, getCategoryName, getReportOutputDirectory, getSink, getSinkFactory, setReportOutputDirectory
 
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
 

Field Detail

outputDirectory

protected File outputDirectory
Output directory for the report.


sourcePaths

protected File[] sourcePaths
Source locations.


metadataFile

protected File metadataFile
Location to store class coverage metadata.


dataFiles

protected File[] dataFiles
Class coverage data files.


outputEncoding

protected String outputEncoding
Report encoding.


depth

protected String depth
Specifies the amount of detail to be included in the generated coverage reports. Valid values are: all, package, source, class, method.


columns

protected String columns
Specifies which report columns and in which order to use for report generation, as a comma-separated list of column ids.


sort

protected String sort
Specifies report column sorting order, as a comma-separated list of columns ids prefixed with "+" for ascending or "-" for descending directions.


metrics

protected String metrics
Specifies the threshold coverage metrics values for a given set of columns.


verbose

protected boolean verbose
Sets EMMA verbosity level to verbose.


project

protected org.apache.maven.project.MavenProject project
Maven project.


pluginClasspath

protected List pluginClasspath
Plugin classpath.


siteRenderer

protected org.apache.maven.doxia.siterenderer.Renderer siteRenderer
Site renderer.

Constructor Detail

EmmaReportMojo

public EmmaReportMojo()
Method Detail

checkParameters

protected void checkParameters()
                        throws org.apache.maven.reporting.MavenReportException
Check parameters.

Throws:
org.apache.maven.reporting.MavenReportException - if any parameters are wrong

executeReport

protected void executeReport(Locale locale)
                      throws org.apache.maven.reporting.MavenReportException
Executes the report for a specific locale.

Specified by:
executeReport in class org.apache.maven.reporting.AbstractMavenReport
Parameters:
locale - the locale.
Throws:
org.apache.maven.reporting.MavenReportException - if something goes wrong.

getOutputDirectory

protected String getOutputDirectory()
Gets the output directory.

Specified by:
getOutputDirectory in class org.apache.maven.reporting.AbstractMavenReport
Returns:
the output directory.

getProject

protected org.apache.maven.project.MavenProject getProject()
Gets the maven project.

Specified by:
getProject in class org.apache.maven.reporting.AbstractMavenReport
Returns:
the maven project.

getSiteRenderer

protected org.apache.maven.doxia.siterenderer.Renderer getSiteRenderer()
Gets the site renderer.

Specified by:
getSiteRenderer in class org.apache.maven.reporting.AbstractMavenReport
Returns:
the site renderer.

getDescription

public String getDescription(Locale locale)
Gets the description in the specified locale.

Parameters:
locale - the locale.
Returns:
the description in the specified locale.

getName

public String getName(Locale locale)
Gets the name in the specified locale.

Parameters:
locale - the locale.
Returns:
the name in the specified locale.

getOutputName

public String getOutputName()
Gets the output name.

Returns:
the output name.

isExternalReport

public boolean isExternalReport()
Returns true as this is an external report.

Specified by:
isExternalReport in interface org.apache.maven.reporting.MavenReport
Overrides:
isExternalReport in class org.apache.maven.reporting.AbstractMavenReport
Returns:
true as this is an external report.

canGenerateReport

public boolean canGenerateReport()
Checks if the report can be generated.

Specified by:
canGenerateReport in interface org.apache.maven.reporting.MavenReport
Overrides:
canGenerateReport in class org.apache.maven.reporting.AbstractMavenReport
Returns:
true if the report can be generated.

getResourceBundle

protected ResourceBundle getResourceBundle(Locale locale)
Gets the resource bundle for the specified locale.

Parameters:
locale - the locale.
Returns:
the resource bundle for the specified locale.


Copyright © 2007-2012 Codehaus. All Rights Reserved.