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:
ContextEnabled, 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  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  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 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 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 MojoExecutionException
Runs the report generation.

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

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)

provideSink

protected void provideSink()
                    throws MojoExecutionException
Ensures that a writeable sink is provided.

Stolen from the changes plugin.

Throws:
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-2013 Kronseder & Reiner GmbH - smartics. All Rights Reserved.