org.codehaus.mojo.clirr
Class AbstractClirrMojo

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

public abstract class AbstractClirrMojo
extends AbstractMojo

Base parameters for Clirr check and report.

Author:
Brett Porter
Is defined to be executed in:
phase:
compile
Requires the dependencies in this specified scope:
compile

Field Summary
protected  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  String comparisonVersion
          Version to compare the current code against.
protected  String[] excludes
          A list of classes to exclude.
protected  ArtifactFactory factory
           
protected  String[] includes
          A list of classes to include.
protected  ArtifactRepository localRepository
           
protected  boolean logResults
          Whether to log the results to the console or not.
protected  MavenProject project
           
protected  ArtifactResolver resolver
           
protected  File textOutputFile
          A text output file to render to.
protected  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(File classes, 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 MavenProject project
Is defined by:
expression:
${project}
Is readonly.
Is required.

resolver

protected ArtifactResolver resolver
Is a Plexus component defined by:

factory

protected ArtifactFactory factory
Is a Plexus component defined by:

localRepository

protected ArtifactRepository localRepository
Is defined by:
default-value:
${localRepository}
Is readonly.
Is required.

classesDirectory

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

Is defined by:
default-value:
${project.build.outputDirectory}

comparisonVersion

protected String comparisonVersion
Version to compare the current code against.

Is defined by:
expression:
${comparisonVersion}
default-value:
(,${project.version})

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").

Is defined by:

textOutputFile

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

Is defined by:
expression:
${textOutputFile}

xmlOutputFile

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

Is defined by:
expression:
${xmlOutputFile}

includes

protected 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/**.

Is defined by:

excludes

protected 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/**.

Is defined by:

logResults

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

Is defined by:
expression:
${logResults}
default-value:
false
Constructor Detail

AbstractClirrMojo

public AbstractClirrMojo()
Method Detail

executeClirr

public ClirrDiffListener executeClirr()
                               throws MojoExecutionException,
                                      MojoFailureException
Throws:
MojoExecutionException
MojoFailureException

executeClirr

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

createClassSet

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

canGenerate

protected boolean canGenerate()
                       throws MojoFailureException,
                              MojoExecutionException
Throws:
MojoFailureException
MojoExecutionException


Copyright © 2006-2008 Codehaus. All Rights Reserved.