abstract class BaseViolationCheckMojo extends AbstractMojo
Type | Name and description |
---|---|
org.apache.maven.shared.transfer.artifact.resolve.ArtifactResolver |
artifactResolver Artifact resolver, needed to download the coreplugin jar. |
java.io.File |
classFilesDirectory Directory containing the class files for Spotbugs to analyze. |
java.util.List |
compileSourceRoots The directories containing the sources to be compiled. |
java.lang.Boolean |
debug Turn on Spotbugs debugging. |
java.lang.String |
effort Effort of the bug finders. |
java.lang.String |
excludeBugsFile |
java.lang.String |
excludeFilterFile |
boolean |
failOnError Fail the build on an error. |
java.lang.String |
failThreshold Prioritiy threshold which bugs have to reach to cause a failure. |
boolean |
fork Fork a VM for Spotbugs analysis. |
java.lang.String |
includeFilterFile |
boolean |
includeTests Run Spotbugs on the tests. |
java.lang.String |
jvmArgs |
ArtifactRepository |
localRepository The local repository, needed to download the coreplugin jar. |
int |
maxAllowedViolations |
int |
maxHeap Maximum Java heap size in megabytes (default=512). |
int |
maxRank Maximum bug ranking to record. |
java.lang.Boolean |
nested This option enables or disables scanning of nested jar and zip files found in the list of files and directories to be analyzed. |
java.lang.String |
omitVisitors The visitor list to omit. |
java.lang.String |
onlyAnalyze Restrict analysis to the given comma-separated list of classes and packages. |
java.io.File |
outputDirectory Location where generated html will be created. |
java.lang.String |
outputEncoding The file encoding to use when creating the HTML reports. |
java.util.List |
pluginArtifacts List of artifacts this plugin depends on. |
java.lang.String |
pluginList |
MavenProject |
project Maven Project. |
java.lang.Boolean |
relaxed Relaxed reporting mode. |
java.util.List |
remoteArtifactRepositories Remote repositories which will be searched for the coreplugin jar. |
org.codehaus.plexus.resource.ResourceManager |
resourceManager Resource Manager. |
MavenSession |
session Maven Session. |
org.apache.maven.doxia.siterenderer.Renderer |
siteRenderer Doxia Site Renderer. |
org.apache.maven.doxia.tools.SiteTool |
siteTool SiteTool. |
boolean |
skip Skip entire check. |
java.lang.String |
sourceEncoding The file encoding to use when reading the source files. |
boolean |
spotbugsXmlOutput This has been deprecated and is on by default. |
java.io.File |
spotbugsXmlOutputDirectory Specifies the directory where the Spotbugs native xml output will be generated. |
java.lang.String |
spotbugsXmlOutputFilename Set the name of the output XML file produced |
java.io.File |
testClassFilesDirectory Directory containing the test class files for Spotbugs to analyze. |
java.util.List |
testSourceRoots The directories containing the test-sources to be compiled. |
java.lang.String |
threshold Threshold of minimum bug severity to report. |
int |
timeout Specifies the amount of time, in milliseconds, that Spotbugs may run before it is assumed to be hung and is terminated. |
java.lang.Boolean |
trace Prints a trace of detectors run and classes analyzed to standard output. |
java.lang.String |
visitors The visitor list to run. |
java.lang.String |
xmlEncoding Encoding used for xml files. |
boolean |
xmlOutput Turn on and off xml output of the Spotbugs report. |
java.io.File |
xmlOutputDirectory Specifies the directory where the xml output will be generated. |
java.io.File |
xrefLocation Location of the Xrefs to link to. |
java.io.File |
xrefTestLocation Location of the Test Xrefs to link to. |
Constructor and description |
---|
BaseViolationCheckMojo() |
Type Params | Return Type | Name and description |
---|---|---|
|
private boolean |
doSourceFilesExist() |
|
void |
execute() |
|
private void |
printBugs(java.lang.Object total, java.lang.Object bugs) |
Artifact resolver, needed to download the coreplugin jar.
Directory containing the class files for Spotbugs to analyze.
The directories containing the sources to be compiled.
Turn on Spotbugs debugging.
Effort of the bug finders. Valid values are Min, Default and Max.
File names of the baseline files. Bugs found in the baseline files won't be reported.
Potential values are a filesystem path, a URL, or a classpath resource.
This parameter is resolved as resource, URL, then file. If successfully
resolved, the contents of the configuration is copied into the
${project.build.directory}
directory before being passed to Spotbugs as a filter file.
File name of the exclude filter. Bugs matching the filters are not reported.
Potential values are a filesystem path, a URL, or a classpath resource.
This parameter is resolved as resource, URL, then file. If successfully
resolved, the contents of the configuration is copied into the
${project.build.directory}
directory before being passed to Spotbugs as a filter file.
It supports multiple files separated by a comma
Fail the build on an error.
Prioritiy threshold which bugs have to reach to cause a failure. Valid values are High, Medium or Low. Bugs below this threshold will just issue a warning log entry.
Fork a VM for Spotbugs analysis. This will allow you to set timeouts and heap size.
File name of the include filter. Only bugs in matching the filters are reported.
Potential values are a filesystem path, a URL, or a classpath resource.
This parameter is resolved as resource, URL, then file. If successfully
resolved, the contents of the configuration is copied into the
${project.build.directory}
directory before being passed to Spotbugs as a filter file.
It supports multiple files separated by a comma
Run Spotbugs on the tests.
The arguments to pass to the forked VM (ignored if fork is disabled).
The local repository, needed to download the coreplugin jar.
specified max number of violations which can be ignored by the spotbugs.
Maximum Java heap size in megabytes (default=512). This only works if the fork parameter is set true.
Maximum bug ranking to record.
This option enables or disables scanning of nested jar and zip files found in the list of files and directories to be analyzed.
The visitor list to omit. This is a comma-delimited list.
Restrict analysis to the given comma-separated list of classes and packages.
Location where generated html will be created.
The file encoding to use when creating the HTML reports. If the property project.reporting.outputEncoding
is not set, the platform default encoding is used.
List of artifacts this plugin depends on. Used for resolving the Spotbugs core plugin.
The plugin list to include in the report. This is a comma-delimited list.
Potential values are a filesystem path, a URL, or a classpath resource.
This parameter is resolved as resource, URL, then file. If successfully
resolved, the contents of the configuration is copied into the
${project.build.directory}
directory before being passed to Spotbugs as a plugin file.
Maven Project.
Relaxed reporting mode. For many detectors, this option suppresses the heuristics used to avoid reporting false positives.
Remote repositories which will be searched for the coreplugin jar.
Resource Manager.
Maven Session.
Doxia Site Renderer.
SiteTool.
Skip entire check.
The file encoding to use when reading the source files. If the property project.build.sourceEncoding
is not set, the platform default encoding is used.
This has been deprecated and is on by default.
Specifies the directory where the Spotbugs native xml output will be generated.
Set the name of the output XML file produced
Directory containing the test class files for Spotbugs to analyze.
The directories containing the test-sources to be compiled.
Threshold of minimum bug severity to report. Valid values are High, Default, Low, Ignore, and Exp (for experimental).
Specifies the amount of time, in milliseconds, that Spotbugs may run before it is assumed to be hung and is terminated. The default is 600,000 milliseconds, which is ten minutes. This only works if the fork parameter is set true.
Prints a trace of detectors run and classes analyzed to standard output. Useful for troubleshooting unexpected analysis failures.
The visitor list to run. This is a comma-delimited list.
Encoding used for xml files. Default value is UTF-8.
Turn on and off xml output of the Spotbugs report.
Specifies the directory where the xml output will be generated.
Location of the Xrefs to link to.
Location of the Test Xrefs to link to.
Groovy Documentation