How to run Spotbugs via Maven?


This is my pom.xml:

<project xmlns"" 





mvn compile, mvn package and mvn site run without any problems. Build Success.

The project consists of a single with some bugs in it.

mvn site does not show me any bugs or errors. How do I get SpotBugs to scan my code?


Use spotbugs-maven-plugin version 3.1.0-RC6, then you can find problem by mvn spotbugs:spotbugs. You may refer official document in readthedocs.

Answered By – Kengo TODA

Leave a Comment