Package org.apache.maven.reporting
Interface MavenReport
-
- All Known Subinterfaces:
MavenMultiPageReport
public interface MavenReport
The basis for a Maven report.- Since:
- 2.0
- Author:
- Brett Porter, Emmanuel Venisse, Vincent Siveton
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
CATEGORY_PROJECT_INFORMATION
Category for project information reportsstatic java.lang.String
CATEGORY_PROJECT_REPORTS
Category for project reportsstatic java.lang.String
ROLE
Plexus lookup name
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description boolean
canGenerateReport()
Verify some conditions before generating the report.void
generate(org.apache.maven.doxia.sink.Sink sink, java.util.Locale locale)
Generate the report depending the wanted locale.java.lang.String
getCategoryName()
Get the category name for this report.java.lang.String
getDescription(java.util.Locale locale)
Get the localized report description.java.lang.String
getName(java.util.Locale locale)
Get the localized report name.java.lang.String
getOutputName()
Deprecated.Method name does not properly reflect its purpose.default java.lang.String
getOutputPath()
Get the path relative togetReportOutputDirectory()
where the report's main output file will be written.java.io.File
getReportOutputDirectory()
Get the shared report output directory.boolean
isExternalReport()
An external report is a report which calls a third party program which generates some reports too.void
setReportOutputDirectory(java.io.File outputDirectory)
Set a new shared report output directory.
-
-
-
Field Detail
-
ROLE
static final java.lang.String ROLE
Plexus lookup name
-
CATEGORY_PROJECT_INFORMATION
static final java.lang.String CATEGORY_PROJECT_INFORMATION
Category for project information reports- See Also:
- Constant Field Values
-
CATEGORY_PROJECT_REPORTS
static final java.lang.String CATEGORY_PROJECT_REPORTS
Category for project reports- See Also:
- Constant Field Values
-
-
Method Detail
-
generate
void generate(org.apache.maven.doxia.sink.Sink sink, java.util.Locale locale) throws MavenReportException
Generate the report depending the wanted locale.
Mainly used for external reports like javadoc.- Parameters:
sink
- the sink to use for the generation.locale
- the wanted locale to generate the report.- Throws:
MavenReportException
- if any
-
getOutputPath
default java.lang.String getOutputPath()
Get the path relative togetReportOutputDirectory()
where the report's main output file will be written. The last component is the name of the file without any extension. The actual output extension will by added by the sink implementation.Note: This method won't be
default
anymore whengetOutputName()
is removed. You are advised to implement it as soon as possible.- Returns:
- the relative output path of this report
- Since:
- 4.0.0
-
getOutputName
@Deprecated java.lang.String getOutputName()
Deprecated.Method name does not properly reflect its purpose. Implement and usegetOutputPath()
instead.
-
getCategoryName
java.lang.String getCategoryName()
Get the category name for this report.- Returns:
- the category name of this report. Should be
CATEGORY_PROJECT_INFORMATION
orCATEGORY_PROJECT_REPORTS
-
getName
java.lang.String getName(java.util.Locale locale)
Get the localized report name.- Parameters:
locale
- the wanted locale to return the report's name.- Returns:
- the name of this report
-
getDescription
java.lang.String getDescription(java.util.Locale locale)
Get the localized report description.- Parameters:
locale
- the wanted locale to return the report's description.- Returns:
- the description of this report
-
setReportOutputDirectory
void setReportOutputDirectory(java.io.File outputDirectory)
Set a new shared report output directory. This directory may contain the output of other reports as well.- Parameters:
outputDirectory
- the new shared report output directory
-
getReportOutputDirectory
java.io.File getReportOutputDirectory()
Get the shared report output directory.- Returns:
- the current shared report output directory
-
isExternalReport
boolean isExternalReport()
An external report is a report which calls a third party program which generates some reports too. A good example is javadoc tool.- Returns:
true
if this report is external,false
otherwise. Default should befalse
.
-
canGenerateReport
boolean canGenerateReport() throws MavenReportException
Verify some conditions before generating the report.- Returns:
true
if this report can be generated,false
otherwise. Default should betrue
.- Throws:
MavenReportException
- if any
-
-