org.apache.rat.mp
Class AbstractRatMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.apache.rat.mp.AbstractRatMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
Direct Known Subclasses:
RatCheckMojo, RatReportMojo

public abstract class AbstractRatMojo
extends org.apache.maven.plugin.AbstractMojo

Abstract base class for Mojos, which are running Rat.


Field Summary
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
AbstractRatMojo()
           
 
Method Summary
protected  ClaimStatistic createReport(Writer out, InputStream style)
          Writes the report to the given stream.
protected  ReportConfiguration getConfiguration()
           
protected  IHeaderMatcher[] getLicenseMatchers()
          Returns the set of header matchers to use.
protected  org.apache.maven.project.MavenProject getProject()
           
protected  IReportable getResources()
          Creates an iterator over the files to check.
 
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.plugin.Mojo
execute
 

Constructor Detail

AbstractRatMojo

public AbstractRatMojo()
Method Detail

getProject

protected org.apache.maven.project.MavenProject getProject()
Returns:
Returns the Maven project.

getLicenseMatchers

protected IHeaderMatcher[] getLicenseMatchers()
                                       throws org.apache.maven.plugin.MojoFailureException,
                                              org.apache.maven.plugin.MojoExecutionException
Returns the set of header matchers to use.

Returns:
Array of license matchers to use
Throws:
org.apache.maven.plugin.MojoFailureException - An error in the plugin configuration was detected.
org.apache.maven.plugin.MojoExecutionException - An error occurred while calculating the result.

getResources

protected IReportable getResources()
Creates an iterator over the files to check.

Returns:
A container of files, which are being checked.

createReport

protected ClaimStatistic createReport(Writer out,
                                      InputStream style)
                               throws org.apache.maven.plugin.MojoExecutionException,
                                      org.apache.maven.plugin.MojoFailureException
Writes the report to the given stream.

Parameters:
out - The target writer, to which the report is being written.
style - The stylesheet to use, or null for raw XML
Returns:
the current statistic.
Throws:
org.apache.maven.plugin.MojoFailureException - An error in the plugin configuration was detected.
org.apache.maven.plugin.MojoExecutionException - Another error occurred while creating the report.

getConfiguration

protected ReportConfiguration getConfiguration()
                                        throws org.apache.maven.plugin.MojoFailureException,
                                               org.apache.maven.plugin.MojoExecutionException
Throws:
org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionException


Copyright © 2007–2014 Apache Software Foundation. All rights reserved.