de.smartics.maven.issues
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.maven.issues.AbstractReportMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo, MavenReport
Direct Known Subclasses:
AbstractIssuesConnectionMojo

public abstract class AbstractReportMojo
     
     
extends AbstractMavenReport

The issues Mojo reports on issues.

Author:
Robert Reiner

Field Summary
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  File outputDirectory
          Specifies the directory where the report will written to.
protected  org.apache.maven.project.MavenProject project
          The Maven project.
protected  org.apache.maven.artifact.resolver.ArtifactResolver resolver
          The resolver for resolving artifacts.
protected  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
 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.
protected  String getOutputDirectory()
          
protected  org.apache.maven.project.MavenProject getProject()
          
protected  Renderer getSiteRenderer()
          
protected  void provideSink()
          Ensures that a writeable sink is provided.
 
Methods inherited from class org.apache.maven.reporting.AbstractMavenReport
canGenerateReport, closeReport, generate, getCategoryName, getReportOutputDirectory, getSink, 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
 
Methods inherited from interface org.apache.maven.reporting.MavenReport
getDescription, getName, getOutputName
 

Field Detail

project

protected org.apache.maven.project.MavenProject project
The Maven project.


siteRenderer

protected Renderer siteRenderer
The Doxia site renderer.


localRepository

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


resolver

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


factory

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


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.


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 org.apache.maven.project.MavenProject getProject()

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

getSiteRenderer

protected 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()

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.

executeReport

protected void executeReport(Locale locale)
                      throws MavenReportException

Configures the plugin logger.

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

provideSink

protected void provideSink()
                    throws org.apache.maven.plugin.MojoExecutionException
Ensures that a writeable sink is provided.

Stolen from the changes plugin.

Throws:
org.apache.maven.plugin.MojoExecutionException - if the sink cannot be created.

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.


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