Fork me on GitHub

surefire-report:report-only

Note:

This goal should be used as a Maven report.

Full name:

org.apache.maven.plugins:maven-surefire-report-plugin:3.5.2:report-only

Description:

Creates a nicely formatted Surefire Test Report in html format. This goal does not run the tests, it only builds the reports. This is a workaround for https://issues.apache.org/jira/browse/SUREFIRE-257

Attributes:

  • Requires a Maven project to be executed.
  • The goal is not marked as thread-safe and thus does not support parallel builds.
  • Since version: 2.3.

Required Parameters

Name Type Since Description
<outputDirectory> File - The shared output directory for the report. Note that this parameter is only evaluated if the goal is run directly from the command line. If the goal is run indirectly as part of a site generation, the shared output directory configured in the Maven Site Plugin is used instead.

A plugin may use any subdirectory structure (either using a hard-coded name or, ideally, an additional user-defined mojo parameter with a default value) to generate multi-page reports or external reports with the main output file (entry point) denoted by #getOutputName().


Default: ${project.build.directory}/reports
<outputName> String - The filename to use for the report.
Default: surefire
User Property: outputName
<showSuccess> boolean - If set to false, only failures are shown.
Default: true
User Property: showSuccess

Optional Parameters

Name Type Since Description
<aggregate> boolean - Whether to build an aggregated report at the root, or build individual reports.
Default: false
User Property: aggregate
<alwaysGenerateSurefireReport> boolean 2.11 If set to true the surefire report will be generated even when there are no surefire result files. Defaults to true to preserve legacy behaviour pre 2.10.
Default: true
User Property: alwaysGenerateSurefireReport
<customBundle> String 3.1.0 Path for a custom bundle instead of using the default one.
Using this field, you could change the texts in the generated reports.
Default: ${basedir}/src/site/custom/surefire-report.properties
<linkXRef> boolean - Link the violation line numbers to the (Test) Source XRef. Links will be created automatically if the JXR plugin is being used.
Default: true
User Property: linkXRef
<locale> String - The locale to use when the report generation is invoked directly as a standalone Mojo.
See also: org.apache.maven.doxia.tools.SiteTool.DEFAULT_LOCALE, org.apache.maven.doxia.tools.SiteTool.getSiteLocales(java.lang.String)
Default: default
<outputFormat> String - The report output format: null by default, to represent a site, but can be configured to a Doxia Sink id.
User Property: output.format
<outputTimestamp> String - Timestamp for reproducible output archive entries, either formatted as ISO 8601 yyyy-MM-dd'T'HH:mm:ssXXX or as an int representing seconds since the epoch (like SOURCE_DATE_EPOCH).
Default: ${project.build.outputTimestamp}
<reportsDirectories> File[] - Directories containing the XML Report files that will be parsed and rendered to HTML format.
<reportsDirectory> File -
Deprecated.
No reason given

(Deprecated, use reportsDirectories) This directory contains the XML Report files that will be parsed and rendered to HTML format.
<siteDirectory> File - Directory containing the site.xml file.
Default: ${basedir}/src/site
<skipSurefireReport> boolean 2.11 If set to true the surefire report generation will be skipped.
Default: false
User Property: skipSurefireReport
<xrefTestLocation> File - Location where Test Source XRef is generated for this project.
Default: org.apache.maven.reporting.AbstractMavenReport.getReportOutputDirectory() + /xref-test

Parameter Details

<aggregate>

Whether to build an aggregated report at the root, or build individual reports.
  • Type: boolean
  • Required: No
  • User Property: aggregate
  • Default: false

<alwaysGenerateSurefireReport>

If set to true the surefire report will be generated even when there are no surefire result files. Defaults to true to preserve legacy behaviour pre 2.10.
  • Type: boolean
  • Since: 2.11
  • Required: No
  • User Property: alwaysGenerateSurefireReport
  • Default: true

<customBundle>

Path for a custom bundle instead of using the default one.
Using this field, you could change the texts in the generated reports.
  • Type: java.lang.String
  • Since: 3.1.0
  • Required: No
  • Default: ${basedir}/src/site/custom/surefire-report.properties

<linkXRef>

Link the violation line numbers to the (Test) Source XRef. Links will be created automatically if the JXR plugin is being used.
  • Type: boolean
  • Required: No
  • User Property: linkXRef
  • Default: true

<locale>

The locale to use when the report generation is invoked directly as a standalone Mojo.
See also: org.apache.maven.doxia.tools.SiteTool.DEFAULT_LOCALE, org.apache.maven.doxia.tools.SiteTool.getSiteLocales(java.lang.String)
  • Type: java.lang.String
  • Required: No
  • Default: default

<outputDirectory>

The shared output directory for the report. Note that this parameter is only evaluated if the goal is run directly from the command line. If the goal is run indirectly as part of a site generation, the shared output directory configured in the Maven Site Plugin is used instead.

A plugin may use any subdirectory structure (either using a hard-coded name or, ideally, an additional user-defined mojo parameter with a default value) to generate multi-page reports or external reports with the main output file (entry point) denoted by #getOutputName().

  • Type: java.io.File
  • Required: Yes
  • Default: ${project.build.directory}/reports

<outputFormat>

The report output format: null by default, to represent a site, but can be configured to a Doxia Sink id.
  • Type: java.lang.String
  • Required: No
  • User Property: output.format

<outputName>

The filename to use for the report.
  • Type: java.lang.String
  • Required: Yes
  • User Property: outputName
  • Default: surefire

<outputTimestamp>

Timestamp for reproducible output archive entries, either formatted as ISO 8601 yyyy-MM-dd'T'HH:mm:ssXXX or as an int representing seconds since the epoch (like SOURCE_DATE_EPOCH).
  • Type: java.lang.String
  • Required: No
  • Default: ${project.build.outputTimestamp}

<reportsDirectories>

Directories containing the XML Report files that will be parsed and rendered to HTML format.
  • Type: java.io.File[]
  • Required: No

<reportsDirectory>

Deprecated.
No reason given

(Deprecated, use reportsDirectories) This directory contains the XML Report files that will be parsed and rendered to HTML format.
  • Type: java.io.File
  • Required: No

<showSuccess>

If set to false, only failures are shown.
  • Type: boolean
  • Required: Yes
  • User Property: showSuccess
  • Default: true

<siteDirectory>

Directory containing the site.xml file.
  • Type: java.io.File
  • Required: No
  • Default: ${basedir}/src/site

<skipSurefireReport>

If set to true the surefire report generation will be skipped.
  • Type: boolean
  • Since: 2.11
  • Required: No
  • User Property: skipSurefireReport
  • Default: false

<xrefTestLocation>

Location where Test Source XRef is generated for this project.
Default: org.apache.maven.reporting.AbstractMavenReport.getReportOutputDirectory() + /xref-test
  • Type: java.io.File
  • Required: No