Package org.jacoco.maven
Class ReportMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.jacoco.maven.AbstractReportMojo
org.jacoco.maven.ReportMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled
,org.apache.maven.plugin.Mojo
,org.apache.maven.reporting.MavenMultiPageReport
,org.apache.maven.reporting.MavenReport
@Mojo(name="report",
defaultPhase=VERIFY,
threadSafe=true)
public class ReportMojo
extends AbstractReportMojo
Creates a code coverage report for tests of a single project in multiple
formats (HTML, XML, and CSV).
- Since:
- 0.5.3
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate File
File with execution data.private File
Output directory for the reports.Fields inherited from class org.jacoco.maven.AbstractReportMojo
excludes, footer, formats, includes, outputEncoding, project, skip, sourceEncoding, title
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
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) boolean
(package private) boolean
(package private) void
createReport
(IReportGroupVisitor visitor, ReportSupport support) (package private) File
(package private) void
loadExecutionData
(ReportSupport support) void
setReportOutputDirectory
(File reportOutputDirectory) Methods inherited from class org.jacoco.maven.AbstractReportMojo
canGenerateReport, execute, generate, generate, getCategoryName, getDescription, getExcludes, getIncludes, isExternalReport
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 org.apache.maven.reporting.MavenReport
getOutputPath
-
Field Details
-
outputDirectory
Output directory for the reports. Note that this parameter is only relevant if the goal is run from the command line or from the default build lifecycle. If the goal is run indirectly as part of a site generation, the output directory configured in the Maven Site Plugin is used instead. -
dataFile
@Parameter(property="jacoco.dataFile", defaultValue="${project.build.directory}/jacoco.exec") private File dataFileFile with execution data.
-
-
Constructor Details
-
ReportMojo
public ReportMojo()
-
-
Method Details
-
canGenerateReportRegardingDataFiles
boolean canGenerateReportRegardingDataFiles()- Specified by:
canGenerateReportRegardingDataFiles
in classAbstractReportMojo
-
canGenerateReportRegardingClassesDirectory
boolean canGenerateReportRegardingClassesDirectory()- Specified by:
canGenerateReportRegardingClassesDirectory
in classAbstractReportMojo
-
loadExecutionData
- Specified by:
loadExecutionData
in classAbstractReportMojo
- Throws:
IOException
-
getOutputDirectory
File getOutputDirectory()- Specified by:
getOutputDirectory
in classAbstractReportMojo
-
createReport
- Specified by:
createReport
in classAbstractReportMojo
- Throws:
IOException
-
getReportOutputDirectory
-
setReportOutputDirectory
-
getOutputName
-
getName
-