de.smartics.testdoc.maven
Class AbstractReportMojo

Package class diagram package AbstractReportMojo
java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.apache.maven.reporting.AbstractMavenReport
          extended by de.smartics.testdoc.maven.AbstractReportMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo, MavenMultiPageReport, MavenReport
Direct Known Subclasses:
AbstractSourceReportMojo

public abstract class AbstractReportMojo
     
     
extends AbstractMavenReport

The abstract base implementation for reports.

Author:
Robert Reiner

Field Summary
protected  String description
          The description of the report.
protected  org.apache.maven.artifact.factory.ArtifactFactory factory
          The factory to create dependent artifacts.
protected  String locale
          The locale to use regardless of the report.
protected  org.apache.maven.artifact.repository.ArtifactRepository localRepository
          Local Repository.
protected  String logLevel
          Specifies the log level used for this plugin.
protected  de.smartics.maven.util.report.MessageHelper messages
           
protected  String name
          The name of the report used as title.
protected  File outputDirectory
          Specifies the directory where the report will written to.
protected  String outputName
          The name of the report.
protected  MavenProject project
          The Maven project.
protected  org.apache.maven.artifact.resolver.ArtifactResolver resolver
          The resolver for resolving artifacts.
protected  org.apache.maven.doxia.siterenderer.Renderer siteRenderer
          The Doxia site renderer.
 
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
AbstractReportMojo()
           
 
Method Summary
 boolean canGenerateReport()
          
 void execute()
          Runs the report generation.
protected  void executeReport(Locale locale)
           Configures the plugin logger.
protected  ResourceBundle getBundle(Locale locale)
          Returns the resource bundle for the given locale.
 String getDescription(Locale locale)
          
 String getName(Locale locale)
          
protected  String getOutputDirectory()
          
 String getOutputName()
          
protected  MavenProject getProject()
          
protected  org.apache.maven.doxia.siterenderer.Renderer getSiteRenderer()
          
 
Methods inherited from class org.apache.maven.reporting.AbstractMavenReport
closeReport, generate, generate, generate, getCategoryName, getReportOutputDirectory, getSink, getSinkFactory, isExternalReport, 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

name

protected String name
The name of the report used as title.

Since:
1.0

description

protected String description
The description of the report.

Since:
1.0

outputName

protected String outputName
The name of the report.

Since:
1.0

messages

protected de.smartics.maven.util.report.MessageHelper messages

project

protected MavenProject project
The Maven project.

Since:
1.0

siteRenderer

protected org.apache.maven.doxia.siterenderer.Renderer siteRenderer
The Doxia site renderer.

Since:
1.0

localRepository

protected org.apache.maven.artifact.repository.ArtifactRepository localRepository
Local Repository.

Since:
1.0

resolver

protected org.apache.maven.artifact.resolver.ArtifactResolver resolver
The resolver for resolving artifacts.

Since:
1.0

factory

protected org.apache.maven.artifact.factory.ArtifactFactory factory
The factory to create dependent artifacts.

Since:
1.0

outputDirectory

protected File outputDirectory
Specifies the directory where the report will written to. This information is only used if the report is not part of the site generation process.

Since:
1.0

logLevel

protected String logLevel
Specifies the log level used for this plugin.

Allowed values are SEVERE, WARNING, INFO and FINEST.

Since:
1.0

locale

protected String locale
The locale to use regardless of the report. This should be set to the locale the Javadoc comment is written in. If not set, the Maven provided locale is used.

Since:
1.0
Constructor Detail

AbstractReportMojo

public AbstractReportMojo()
Method Detail

getProject

protected MavenProject getProject()

Specified by:
getProject in class AbstractMavenReport
See Also:
AbstractMavenReport.getProject()

getSiteRenderer

protected org.apache.maven.doxia.siterenderer.Renderer getSiteRenderer()

Specified by:
getSiteRenderer in class AbstractMavenReport
See Also:
AbstractMavenReport.getSiteRenderer()

getOutputDirectory

protected String getOutputDirectory()

Specified by:
getOutputDirectory in class AbstractMavenReport
See Also:
AbstractMavenReport.getOutputDirectory()

getName

public String getName(Locale locale)

See Also:
MavenReport.getName(java.util.Locale)

getDescription

public String getDescription(Locale locale)

See Also:
MavenReport.getDescription(java.util.Locale)

execute

public void execute()
             throws org.apache.maven.plugin.MojoExecutionException
Runs the report generation.

Specified by:
execute in interface org.apache.maven.plugin.Mojo
Overrides:
execute in class AbstractMavenReport
Throws:
org.apache.maven.plugin.MojoExecutionException - on any problem encountered.

canGenerateReport

public boolean canGenerateReport()

Specified by:
canGenerateReport in interface MavenReport
Overrides:
canGenerateReport in class AbstractMavenReport
See Also:
AbstractMavenReport.canGenerateReport()

executeReport

protected void executeReport(Locale locale)
                      throws MavenReportException

Configures the plugin logger.

Specified by:
executeReport in class AbstractMavenReport
Throws:
MavenReportException
See Also:
AbstractMavenReport.executeReport(java.util.Locale)

getBundle

protected ResourceBundle getBundle(Locale locale)
Returns the resource bundle for the given locale.

Parameters:
locale - the locale for which the resource bundle is requested.
Returns:
the bundle for the given locale.

getOutputName

public String getOutputName()

See Also:
MavenReport.getOutputName()


Copyright © 2010-2013 Kronseder & Reiner GmbH - smartics. All Rights Reserved.