Fork me on GitHub

SpotBugs Maven Plugin

Please Note - This version is using Spotbugs 4.8.4.

SpotBugs looks for bugs in Java programs. It is based on the concept of bug patterns. A bug pattern is a code idiom that is often an error. Bug patterns arise for a variety of reasons:

  • Difficult language features
  • Misunderstood API methods
  • Misunderstood invariants when code is modified during maintenance
  • Garden variety mistakes: typos, use of the wrong boolean operator

SpotBugs uses static analysis to inspect Java bytecode for occurrences of bug patterns. We have found that SpotBugs finds real errors in most Java software. Because its analysis is sometimes imprecise, SpotBugs can report false warnings, which are warnings that do not indicate real errors. In practice, the rate of false warnings reported by SpotBugs is generally less than 50%.

SpotBugs is free software, available under the terms of the Lesser GNU Public License. It is written in Java, and can be run with any virtual machine compatible with Java 8. It can analyze programs written for any version of Java. SpotBugs was originally developed by Bill Pugh. It is maintained by Bill Pugh, David Hovemeyer, and a team of volunteers.

SpotBugs uses BCEL to analyze Java bytecode. It uses dom4j for XML manipulation.

This introduction is an excerpt from the Facts Sheet at SpotBugs home page.

To see more documentation about SpotBugs' options, please see the SpotBugs Manual.

Please Note

As of version 3.1.0, you will need to use JDK 8 to run this plugin. This is a requirement imposed by Spotbugs.