de.smartics.maven.exceptions
Class AbstractElementReport

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

public abstract class AbstractElementReport
     
     
extends org.apache.maven.reporting.AbstractMavenReport

Generates a report on elements found in the source tree.

Author:
Robert Reiner
maven-requiresProject:
maven-requiresDependencyResolution:

Field Summary
protected  org.apache.maven.artifact.factory.ArtifactFactory factory
          The factory to create dependent artifacts.
protected  File javadocDir
          Specifies the path to the directory the maven-javadoc-report generates the Javadoc HTML files.
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  List pluginArtifacts
          The plugin's dependencies to build the classpath for tools to be called.
protected  org.apache.maven.project.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
AbstractElementReport()
           
 
Method Summary
 boolean canGenerateReport()
          
 void execute()
          Runs the report generation.
protected  ResourceBundle getBundle(Locale locale)
          Returns the resource bundle for the given locale.
protected abstract  String getBundleName()
          Returns the name of the bundle to load to label report information.
 String getDescription(Locale locale)
          
 String getName(Locale locale)
          
protected  String getOutputDirectory()
          
 org.apache.maven.project.MavenProject getProject()
          Returns the maven project.
protected  org.apache.maven.doxia.siterenderer.Renderer getSiteRenderer()
          
protected  void provideSink()
          Ensures that a writeable sink is provided.
 void setProject(org.apache.maven.project.MavenProject project)
          Sets the maven project.
 
Methods inherited from class org.apache.maven.reporting.AbstractMavenReport
closeReport, executeReport, 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
getOutputName
 

Field Detail

project

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

maven-parameter:
expression="${project}"
maven-readonly:
maven-required:

pluginArtifacts

protected List pluginArtifacts
The plugin's dependencies to build the classpath for tools to be called.

maven-parameter:
expression="${plugin.artifacts}"
maven-readonly:
maven-required:

siteRenderer

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

maven-readonly:
maven-required:

localRepository

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

maven-parameter:
expression="${localRepository}"
maven-readonly:
maven-required:

resolver

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

maven-readonly:
maven-required:

factory

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

maven-readonly:
maven-required:

javadocDir

protected File javadocDir
Specifies the path to the directory the maven-javadoc-report generates the Javadoc HTML files. This allows the report generated by this plugin to reference Javadoc pages.

maven-parameter:
expression="${report.javadocDir}" default-value="${project.reporting.outputDirectory}/apidocs"

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.

maven-parameter:
expression="${project.reporting.outputDirectory}"
maven-readonly:

logLevel

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

Allowed values are SEVERE, WARNING, INFO and FINEST.

maven-parameter:
expression="${exceptioncodes.logLevel}"

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.

maven-parameter:
expression="${exceptioncodes.locale}"
Constructor Detail

AbstractElementReport

public AbstractElementReport()
Method Detail

getDescription

public String getDescription(Locale locale)

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

getName

public String getName(Locale locale)

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

getProject

public org.apache.maven.project.MavenProject getProject()
Returns the maven project.

Specified by:
getProject in class org.apache.maven.reporting.AbstractMavenReport
Returns:
the maven project.

setProject

public void setProject(org.apache.maven.project.MavenProject project)
Sets the maven project.

Parameters:
project - the maven project.

getOutputDirectory

protected String getOutputDirectory()

Specified by:
getOutputDirectory in class org.apache.maven.reporting.AbstractMavenReport
See Also:
AbstractMavenReport.getOutputDirectory()

getSiteRenderer

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

Specified by:
getSiteRenderer in class org.apache.maven.reporting.AbstractMavenReport
See Also:
AbstractMavenReport.getSiteRenderer()

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 org.apache.maven.reporting.AbstractMavenReport
Throws:
org.apache.maven.plugin.MojoExecutionException - on any problem encountered.

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.

getBundleName

protected abstract String getBundleName()
Returns the name of the bundle to load to label report information.

Returns:
the name of the bundle to load to label report information.
See Also:
getBundle(Locale)

canGenerateReport

public boolean canGenerateReport()

Specified by:
canGenerateReport in interface org.apache.maven.reporting.MavenReport
Overrides:
canGenerateReport in class org.apache.maven.reporting.AbstractMavenReport
See Also:
AbstractMavenReport.canGenerateReport()


Copyright © 2007-null Kronseder & Reiner GmbH - smartics. All Rights Reserved.