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
protected  java.io.File basedir
          The base directory, in which to search for files.
static java.lang.String[] ECLIPSE_DEFAULT_EXCLUDES
          The Eclipse specific default excludes.
static java.lang.String[] IDEA_DEFAULT_EXCLUDES
          The IDEA specific default excludes.
static java.lang.String[] MAVEN_DEFAULT_EXCLUDES
          The Maven specific default excludes.
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
AbstractRatMojo()
           
 
Method Summary
protected  ClaimStatistic createReport(java.io.Writer out, java.io.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()
          Returns the Maven project.
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
 

Field Detail

MAVEN_DEFAULT_EXCLUDES

public static final java.lang.String[] MAVEN_DEFAULT_EXCLUDES
The Maven specific default excludes.


ECLIPSE_DEFAULT_EXCLUDES

public static final java.lang.String[] ECLIPSE_DEFAULT_EXCLUDES
The Eclipse specific default excludes.


IDEA_DEFAULT_EXCLUDES

public static final java.lang.String[] IDEA_DEFAULT_EXCLUDES
The IDEA specific default excludes.


basedir

protected java.io.File basedir
The base directory, in which to search for files.

Constructor Detail

AbstractRatMojo

public AbstractRatMojo()
Method Detail

getProject

protected org.apache.maven.project.MavenProject getProject()
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(java.io.Writer out,
                                      java.io.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
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 © 2006-2011 Apache Software Foundation. All Rights Reserved.