Class ReportAggregateMojo

java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.jacoco.maven.AbstractReportMojo
org.jacoco.maven.ReportAggregateMojo
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-aggregate", threadSafe=true) public class ReportAggregateMojo extends AbstractReportMojo

Creates a structured code coverage report (HTML, XML, and CSV) from multiple projects within reactor. The report is created from all modules this project depends on. From those projects class and source files as well as JaCoCo execution data files will be collected. In addition execution data is collected from the project itself. This also allows to create coverage reports when tests are in separate projects than the code under test, for example in case of integration tests.

Using the dependency scope allows to distinguish projects which contribute execution data but should not become part of the report:

  • compile, runtime, provided: Project source and execution data is included in the report.
  • test: Only execution data is considered for the report.
Since:
0.7.7
  • Field Details

    • dataFileIncludes

      @Parameter List<String> dataFileIncludes
      A list of execution data files to include in the report from each project. May use wildcard characters (* and ?). When not specified all *.exec files from the target folder will be included.
    • dataFileExcludes

      @Parameter List<String> dataFileExcludes
      A list of execution data files to exclude from the report. May use wildcard characters (* and ?). When not specified nothing will be excluded.
    • outputDirectory

      @Parameter(defaultValue="${project.reporting.outputDirectory}/jacoco-aggregate") private File 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.
    • reactorProjects

      @Parameter(property="reactorProjects", readonly=true) private List<org.apache.maven.project.MavenProject> reactorProjects
      The projects in the reactor.
  • Constructor Details

    • ReportAggregateMojo

      public ReportAggregateMojo()
  • Method Details