Reputation: 14874
I configured maven spotbugs plugin based on docs on its website, but it doesn't generate report.
This was a line I saw when running
mvn site -X
> [INFO] 15 reports detected for
> maven-project-info-reports-plugin:3.1.0: ci-management, dependencies,
> dependency-info, dependency-management, distribution-management,
> index, issue-management, licenses, mailing-lists, modules,
> plugin-management, plugins, scm, summary, team [DEBUG] ******
> SpotBugsMojo canGenerateReport
> ******* [DEBUG] canGenerate is false
Please watch the last line!
Upvotes: 0
Views: 835
Reputation: 14874
I found out through checking source code that it needs to have classes folder generated in target before being able to run any check.
So right way to run it is
mvn compile site
Which generates classes in target folder and writes this log to console:
> [INFO] 15 reports detected for
> maven-project-info-reports-plugin:3.1.0: ci-management, dependencies,
> dependency-info, dependency-management, distribution-management,
> index, issue-management, licenses, mailing-lists, modules,
> plugin-management, plugins, scm, summary, team [DEBUG] ******
> SpotBugsMojo canGenerateReport ******* [DEBUG] canGenerate Src is true
> [DEBUG] ****** SpotBugsMojo executeSpotbugs ******* [DEBUG] ******
> Executing SpotBugsMojo *******
Upvotes: 2