org.codehaus.mojo.findbugs
Class FindbugsViolationCheckMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.codehaus.groovy.maven.mojo.GroovyMojo
          extended by org.codehaus.mojo.findbugs.FindbugsViolationCheckMojo
All Implemented Interfaces:
groovy.lang.GroovyObject, ContextEnabled, Mojo, FindBugsInfo

public class FindbugsViolationCheckMojo
extends org.codehaus.groovy.maven.mojo.GroovyMojo
implements FindBugsInfo

Fail the build if there were any FindBugs violations in the source code. An XML report is put out by default in the target directory with the errors. To see more documentation about FindBugs' options, please see the FindBugs Manual.

Since:
2.0
Version:
$Id: FindbugsViolationCheckMojo.groovy gleclaire $
Author:
Garvin LeClaire
Is defined to be executed in:
goal:
findbugs
Is defined by the goal name:
check
Is bound to the specified phase of the standard build lifecycle:
verify
Requires the dependencies in this specified scope:
compile
Requires a Maven project to run:
true

Field Summary
protected  org.apache.maven.doxia.tools.SiteTool siteTool
          SiteTool.
 
Fields inherited from class org.codehaus.groovy.maven.mojo.GroovyMojo
__timeStamp, __timeStamp__239_neverHappen1218741132868, sanitizeErrors
 
Fields inherited from interface org.codehaus.mojo.findbugs.FindBugsInfo
BUNDLE_NAME, DESCRIPTION_KEY, findbugsEfforts, findbugsThresholds, JAVA_REGEX_PATTERN, JAVA_SOURCES_KEY, NAME_KEY, PLUGIN_NAME, SOURCE_ROOT_KEY, TEST_SOURCE_ROOT_KEY
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
FindbugsViolationCheckMojo()
           
 
Method Summary
 void execute()
           
 ArtifactResolver getArtifactResolver()
           
 int getBugCount()
           
 File getClassFilesDirectory()
           
 List getCompileSourceRoots()
           
 Boolean getDebug()
           
 String getEffort()
           
 int getErrorCount()
           
 String getExcludeFilterFile()
           
 boolean getFailOnError()
           
 boolean getFindbugsXmlOutput()
           
 File getFindbugsXmlOutputDirectory()
           
 String getIncludeFilterFile()
           
 boolean getIncludeTests()
           
 DefaultArtifactRepository getLocalRepository()
           
 int getMaxHeap()
           
 groovy.lang.MetaClass getMetaClass()
           
 String getOmitVisitors()
           
 String getOnlyAnalyze()
           
 File getOutputDirectory()
           
 String getOutputEncoding()
           
 ArrayList getPluginArtifacts()
           
 String getPluginList()
           
 MavenProject getProject()
           
 Object getProperty(String name)
           
 Boolean getRelaxed()
           
 List getRemoteArtifactRepositories()
           
 org.codehaus.plexus.resource.ResourceManager getResourceManager()
           
 org.codehaus.doxia.site.renderer.SiteRenderer getSiteRenderer()
           
 boolean getSkip()
           
 String getSourceEncoding()
           
 File getTestClassFilesDirectory()
           
 List getTestSourceRoots()
           
 String getThreshold()
           
 int getTimeout()
           
 String getVisitors()
           
 String getXmlEncoding()
           
 boolean getXmlOutput()
           
 File getXmlOutputDirectory()
           
 File getXrefLocation()
           
 File getXrefTestLocation()
           
 Object invokeMethod(String name, Object args)
           
 boolean isFailOnError()
           
 boolean isFindbugsXmlOutput()
           
 boolean isIncludeTests()
           
 boolean isSkip()
           
 boolean isXmlOutput()
           
 void setArtifactResolver(ArtifactResolver value)
           
 void setBugCount(int value)
           
 void setClassFilesDirectory(File value)
           
 void setCompileSourceRoots(List value)
           
 void setDebug(Boolean value)
           
 void setEffort(String value)
           
 void setErrorCount(int value)
           
 void setExcludeFilterFile(String value)
           
 void setFailOnError(boolean value)
           
 void setFindbugsXmlOutput(boolean value)
           
 void setFindbugsXmlOutputDirectory(File value)
           
 void setIncludeFilterFile(String value)
           
 void setIncludeTests(boolean value)
           
 void setLocalRepository(DefaultArtifactRepository value)
           
 void setMaxHeap(int value)
           
 void setMetaClass(groovy.lang.MetaClass metaClass)
           
 void setOmitVisitors(String value)
           
 void setOnlyAnalyze(String value)
           
 void setOutputDirectory(File value)
           
 void setOutputEncoding(String value)
           
 void setPluginArtifacts(ArrayList value)
           
 void setPluginList(String value)
           
 void setProject(MavenProject value)
           
 void setProperty(String name, Object value)
           
 void setRelaxed(Boolean value)
           
 void setRemoteArtifactRepositories(List value)
           
 void setResourceManager(org.codehaus.plexus.resource.ResourceManager value)
           
 void setSiteRenderer(org.codehaus.doxia.site.renderer.SiteRenderer value)
           
 void setSkip(boolean value)
           
 void setSourceEncoding(String value)
           
 void setTestClassFilesDirectory(File value)
           
 void setTestSourceRoots(List value)
           
 void setThreshold(String value)
           
 void setTimeout(int value)
           
 void setVisitors(String value)
           
 void setXmlEncoding(String value)
           
 void setXmlOutput(boolean value)
           
 void setXmlOutputDirectory(File value)
           
 void setXrefLocation(File value)
           
 void setXrefTestLocation(File value)
           
 
Methods inherited from class org.codehaus.groovy.maven.mojo.GroovyMojo
afterExecute, beforeExecute, fail, fail, getAnt
 
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

siteTool

protected org.apache.maven.doxia.tools.SiteTool siteTool
SiteTool.

Since:
2.1-SNAPSHOT
Is a Plexus component defined by:
role:
org.apache.maven.doxia.tools.SiteTool
Is readonly.
Is required.
Constructor Detail

FindbugsViolationCheckMojo

public FindbugsViolationCheckMojo()
Method Detail

getOutputDirectory

public File getOutputDirectory()

setOutputDirectory

public void setOutputDirectory(File value)

getXmlOutput

public boolean getXmlOutput()

isXmlOutput

public boolean isXmlOutput()

setXmlOutput

public void setXmlOutput(boolean value)

getXmlOutputDirectory

public File getXmlOutputDirectory()

setXmlOutputDirectory

public void setXmlOutputDirectory(File value)

getFindbugsXmlOutput

public boolean getFindbugsXmlOutput()

isFindbugsXmlOutput

public boolean isFindbugsXmlOutput()

setFindbugsXmlOutput

public void setFindbugsXmlOutput(boolean value)

getFindbugsXmlOutputDirectory

public File getFindbugsXmlOutputDirectory()

setFindbugsXmlOutputDirectory

public void setFindbugsXmlOutputDirectory(File value)

getSiteRenderer

public org.codehaus.doxia.site.renderer.SiteRenderer getSiteRenderer()

setSiteRenderer

public void setSiteRenderer(org.codehaus.doxia.site.renderer.SiteRenderer value)

getClassFilesDirectory

public File getClassFilesDirectory()

setClassFilesDirectory

public void setClassFilesDirectory(File value)

getTestClassFilesDirectory

public File getTestClassFilesDirectory()

setTestClassFilesDirectory

public void setTestClassFilesDirectory(File value)

getXrefLocation

public File getXrefLocation()

setXrefLocation

public void setXrefLocation(File value)

getXrefTestLocation

public File getXrefTestLocation()

setXrefTestLocation

public void setXrefTestLocation(File value)

getCompileSourceRoots

public List getCompileSourceRoots()

setCompileSourceRoots

public void setCompileSourceRoots(List value)

getTestSourceRoots

public List getTestSourceRoots()

setTestSourceRoots

public void setTestSourceRoots(List value)

getIncludeTests

public boolean getIncludeTests()

isIncludeTests

public boolean isIncludeTests()

setIncludeTests

public void setIncludeTests(boolean value)

getPluginArtifacts

public ArrayList getPluginArtifacts()

setPluginArtifacts

public void setPluginArtifacts(ArrayList value)

getLocalRepository

public DefaultArtifactRepository getLocalRepository()

setLocalRepository

public void setLocalRepository(DefaultArtifactRepository value)

getRemoteArtifactRepositories

public List getRemoteArtifactRepositories()

setRemoteArtifactRepositories

public void setRemoteArtifactRepositories(List value)

getProject

public MavenProject getProject()

setProject

public void setProject(MavenProject value)

getXmlEncoding

public String getXmlEncoding()

setXmlEncoding

public void setXmlEncoding(String value)

getSourceEncoding

public String getSourceEncoding()

setSourceEncoding

public void setSourceEncoding(String value)

getOutputEncoding

public String getOutputEncoding()

setOutputEncoding

public void setOutputEncoding(String value)

getThreshold

public String getThreshold()

setThreshold

public void setThreshold(String value)

getArtifactResolver

public ArtifactResolver getArtifactResolver()

setArtifactResolver

public void setArtifactResolver(ArtifactResolver value)

getIncludeFilterFile

public String getIncludeFilterFile()

setIncludeFilterFile

public void setIncludeFilterFile(String value)

getExcludeFilterFile

public String getExcludeFilterFile()

setExcludeFilterFile

public void setExcludeFilterFile(String value)

getEffort

public String getEffort()

setEffort

public void setEffort(String value)

getDebug

public Boolean getDebug()

setDebug

public void setDebug(Boolean value)

getRelaxed

public Boolean getRelaxed()

setRelaxed

public void setRelaxed(Boolean value)

getVisitors

public String getVisitors()

setVisitors

public void setVisitors(String value)

getOmitVisitors

public String getOmitVisitors()

setOmitVisitors

public void setOmitVisitors(String value)

getPluginList

public String getPluginList()

setPluginList

public void setPluginList(String value)

getOnlyAnalyze

public String getOnlyAnalyze()

setOnlyAnalyze

public void setOnlyAnalyze(String value)

getSkip

public boolean getSkip()

isSkip

public boolean isSkip()

setSkip

public void setSkip(boolean value)

getResourceManager

public org.codehaus.plexus.resource.ResourceManager getResourceManager()

setResourceManager

public void setResourceManager(org.codehaus.plexus.resource.ResourceManager value)

getFailOnError

public boolean getFailOnError()

isFailOnError

public boolean isFailOnError()

setFailOnError

public void setFailOnError(boolean value)

getMaxHeap

public int getMaxHeap()

setMaxHeap

public void setMaxHeap(int value)

getTimeout

public int getTimeout()

setTimeout

public void setTimeout(int value)

getBugCount

public int getBugCount()

setBugCount

public void setBugCount(int value)

getErrorCount

public int getErrorCount()

setErrorCount

public void setErrorCount(int value)

execute

public void execute()
Specified by:
execute in interface Mojo

getMetaClass

public groovy.lang.MetaClass getMetaClass()
Specified by:
getMetaClass in interface groovy.lang.GroovyObject
Overrides:
getMetaClass in class org.codehaus.groovy.maven.mojo.GroovyMojo

setMetaClass

public void setMetaClass(groovy.lang.MetaClass metaClass)
Specified by:
setMetaClass in interface groovy.lang.GroovyObject
Overrides:
setMetaClass in class org.codehaus.groovy.maven.mojo.GroovyMojo

invokeMethod

public Object invokeMethod(String name,
                           Object args)
Specified by:
invokeMethod in interface groovy.lang.GroovyObject
Overrides:
invokeMethod in class org.codehaus.groovy.maven.mojo.GroovyMojo

getProperty

public Object getProperty(String name)
Specified by:
getProperty in interface groovy.lang.GroovyObject
Overrides:
getProperty in class org.codehaus.groovy.maven.mojo.GroovyMojo

setProperty

public void setProperty(String name,
                        Object value)
Specified by:
setProperty in interface groovy.lang.GroovyObject
Overrides:
setProperty in class org.codehaus.groovy.maven.mojo.GroovyMojo


Copyright © 2005-2009 Codehaus. All Rights Reserved.