|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.maven.plugin.AbstractMojo
org.codehaus.mojo.clirr.AbstractClirrMojo
public abstract class AbstractClirrMojo
Base parameters for Clirr check and report.
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 org.apache.maven.artifact.factory.ArtifactFactory |
factory
|
protected 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 String |
minSeverity
Show only messages of this severity or higher. |
protected org.apache.maven.project.MavenProject |
project
|
protected org.apache.maven.artifact.resolver.ArtifactResolver |
resolver
|
protected boolean |
skip
Flag to easily skip execution. |
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()
|
protected static net.sf.clirr.core.Severity |
convertSeverity(String minSeverity)
|
protected static ClassLoader |
createClassLoader(Collection artifacts,
Set previousArtifacts)
Create a ClassLoader, which includes the artifacts in artifacts ,
but excludes the artifacts in previousArtifacts . |
static net.sf.clirr.core.spi.JavaType[] |
createClassSet(File classes,
ClassLoader thirdPartyClasses,
net.sf.clirr.core.ClassFilter classFilter)
|
protected abstract void |
doExecute()
|
void |
execute()
|
ClirrDiffListener |
executeClirr()
|
protected ClirrDiffListener |
executeClirr(net.sf.clirr.core.Severity minSeverity)
|
protected List |
getTransitiveDependencies(Set previousArtifacts)
|
protected Set |
resolveArtifacts(ArtifactSpecification[] artifacts)
|
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 |
Field Detail |
---|
protected boolean skip
protected org.apache.maven.project.MavenProject project
protected org.apache.maven.artifact.resolver.ArtifactResolver resolver
protected org.apache.maven.artifact.factory.ArtifactFactory factory
protected org.apache.maven.artifact.repository.ArtifactRepository localRepository
protected File classesDirectory
protected String comparisonVersion
protected ArtifactSpecification[] comparisonArtifacts
comparisonVersion
, if present.
Each comparisonArtifact
is made of a groupId
, an artifactId
and
a version
number. Optionally it may have a classifier
(default null) and a type
(default "jar").
protected String minSeverity
info
, warning
and error
.
protected File textOutputFile
protected File xmlOutputFile
protected String[] includes
org/codehaus/mojo/**
.
protected String[] excludes
org/codehaus/mojo/**
.
protected boolean logResults
Constructor Detail |
---|
public AbstractClirrMojo()
Method Detail |
---|
public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
protected abstract void doExecute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
public ClirrDiffListener executeClirr() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
protected ClirrDiffListener executeClirr(net.sf.clirr.core.Severity minSeverity) throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
protected List getTransitiveDependencies(Set previousArtifacts) throws org.apache.maven.project.ProjectBuildingException, org.apache.maven.project.artifact.InvalidDependencyVersionException, org.apache.maven.artifact.resolver.ArtifactResolutionException, org.apache.maven.artifact.resolver.ArtifactNotFoundException
org.apache.maven.project.ProjectBuildingException
org.apache.maven.project.artifact.InvalidDependencyVersionException
org.apache.maven.artifact.resolver.ArtifactResolutionException
org.apache.maven.artifact.resolver.ArtifactNotFoundException
protected Set resolveArtifacts(ArtifactSpecification[] artifacts) throws org.apache.maven.plugin.MojoFailureException, org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionException
public static net.sf.clirr.core.spi.JavaType[] createClassSet(File classes, ClassLoader thirdPartyClasses, net.sf.clirr.core.ClassFilter classFilter) throws MalformedURLException
MalformedURLException
protected static ClassLoader createClassLoader(Collection artifacts, Set previousArtifacts) throws MalformedURLException
artifacts
,
but excludes the artifacts in previousArtifacts
. The intention is,
that we let BCEL inspect the artifacts in the latter set, using a
ClassLoader
, which contains the dependencies. However, the
ClassLoader
must not contain the jar files, which are being inspected.
artifacts
- The artifacts, from which to build a ClassLoader
.previousArtifacts
- The artifacts being inspected, or null, if te
returned ClassLoader
should contain all the elements of
artifacts
.
ClassLoader
which may be used to inspect the classes in
previousArtifacts.
MalformedURLException
- Failed to convert a file to an URL.protected static net.sf.clirr.core.Severity convertSeverity(String minSeverity)
protected boolean canGenerate() throws org.apache.maven.plugin.MojoFailureException, org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |