org.codehaus.mojo.clirr
Class AbstractClirrMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.codehaus.mojo.clirr.AbstractClirrMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
Direct Known Subclasses:
ClirrCheckMojo, ClirrReport

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

Base parameters for Clirr check and report.

Author:
Brett Porter

Field Summary
protected  java.io.File classesDirectory
          The classes of this project to compare the last release against.
protected  ArtifactSpecification[] comparisonArtifacts
          List of artifacts to compare the current code against.
protected  java.lang.String comparisonVersion
          Version to compare the current code against.
protected  java.lang.String[] excludes
          A list of classes to exclude.
protected  org.apache.maven.artifact.factory.ArtifactFactory factory
           
protected  java.lang.String[] includes
          A list of classes to include.
protected  org.apache.maven.artifact.repository.ArtifactRepository localRepository
           
protected  boolean logResults
          Whether to log the results to the console or not.
protected  org.apache.maven.project.MavenProject project
           
protected  org.apache.maven.artifact.resolver.ArtifactResolver resolver
           
protected  java.io.File textOutputFile
          A text output file to render to.
protected  java.io.File xmlOutputFile
          An XML file to render to.
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
AbstractClirrMojo()
           
 
Method Summary
protected  boolean canGenerate()
           
static net.sf.clirr.core.spi.JavaType[] createClassSet(java.io.File classes, java.lang.ClassLoader thirdPartyClasses, net.sf.clirr.core.ClassFilter classFilter)
           
 ClirrDiffListener executeClirr()
           
protected  ClirrDiffListener executeClirr(net.sf.clirr.core.Severity minSeverity)
           
 
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

project

protected org.apache.maven.project.MavenProject project

resolver

protected org.apache.maven.artifact.resolver.ArtifactResolver resolver

factory

protected org.apache.maven.artifact.factory.ArtifactFactory factory

localRepository

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

classesDirectory

protected java.io.File classesDirectory
The classes of this project to compare the last release against.


comparisonVersion

protected java.lang.String comparisonVersion
Version to compare the current code against.


comparisonArtifacts

protected ArtifactSpecification[] comparisonArtifacts
List of artifacts to compare the current code against. This overrides comparisonVersion, if present. Each comparisonArtifact is made of a groupId, an artifactId, a version number. Optionally it may have a classifier (default null) and a type (default "jar").


textOutputFile

protected java.io.File textOutputFile
A text output file to render to. If omitted, no output is rendered to a text file.


xmlOutputFile

protected java.io.File xmlOutputFile
An XML file to render to. If omitted, no output is rendered to an XML file.


includes

protected java.lang.String[] includes
A list of classes to include. Anything not included is excluded. If omitted, all are assumed to be included. Values are specified in path pattern notation, e.g. org/codehaus/mojo/**.


excludes

protected java.lang.String[] excludes
A list of classes to exclude. These classes are excluded from the list of classes that are included. Values are specified in path pattern notation, e.g. org/codehaus/mojo/**.


logResults

protected boolean logResults
Whether to log the results to the console or not.

Constructor Detail

AbstractClirrMojo

public AbstractClirrMojo()
Method Detail

executeClirr

public ClirrDiffListener executeClirr()
                               throws org.apache.maven.plugin.MojoExecutionException,
                                      org.apache.maven.plugin.MojoFailureException
Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException

executeClirr

protected ClirrDiffListener executeClirr(net.sf.clirr.core.Severity minSeverity)
                                  throws org.apache.maven.plugin.MojoExecutionException,
                                         org.apache.maven.plugin.MojoFailureException
Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException

createClassSet

public static net.sf.clirr.core.spi.JavaType[] createClassSet(java.io.File classes,
                                                              java.lang.ClassLoader thirdPartyClasses,
                                                              net.sf.clirr.core.ClassFilter classFilter)
                                                       throws java.net.MalformedURLException
Throws:
java.net.MalformedURLException

canGenerate

protected boolean canGenerate()
                       throws org.apache.maven.plugin.MojoFailureException,
                              org.apache.maven.plugin.MojoExecutionException
Throws:
org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionException


Copyright © 2006-2009. All Rights Reserved.