spotbugs / spotbugs-maven-plugin

Maven Mojo Plug-In to generate reports based on the SpotBugs Analyzer
https://spotbugs.github.io/spotbugs-maven-plugin/
Apache License 2.0
69 stars 51 forks source link

Report generation only works after compiling the sources #93

Closed uweplonus closed 5 years ago

uweplonus commented 5 years ago

Today I faced a problem generating my site. I'm on a project where I do not compile the source files but only execute mvn site to generate the site (A Spotbugs Example Project). Therefore I only run mvn site but then the report is not generated. I had to run at least mvn compile site to get the report generated. This should at least be documented for the plugin that the compiled classes are needed to create the report.

hazendaz commented 5 years ago

What version are you using?

Get Outlook for Androidhttps://aka.ms/ghei36


From: uweplonus notifications@github.com Sent: Saturday, October 20, 2018 6:58:39 AM To: spotbugs/spotbugs-maven-plugin Cc: Subscribed Subject: [spotbugs/spotbugs-maven-plugin] Report generation only works after compiling the sources (#93)

Today I faced a problem generating my site. I'm on a project where I do not compile the source files but only execute mvn site to generate the site (A Spotbugs Example Project). Therefore I only run mvn site but then the report is not generated. I had to run at least mvn compile site to get the report generated. This should at least be documented for the plugin that the compiled classes are needed to create the report.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/spotbugs/spotbugs-maven-plugin/issues/93, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AA7ho2gygzzz2fHyN44KPh08CLvHY__Rks5umwHfgaJpZM4Xx3N9.

uweplonus commented 5 years ago

I tried this with all versions from 3.1.0-RC5 up to the recent 3.1.7.

iloveeclipse commented 5 years ago

Spotbugs needs compiled code to run, this is not a bug, it is the way how Spotbugs was designed. So no compile => no results.

uweplonus commented 5 years ago

As I wrote in the bug report at least a documentation is useful.

iloveeclipse commented 5 years ago

https://spotbugs.github.io/ says "it can analyze programs compiled for any version of Java, from 1.0 to 1.9."

But if you like to improve the manual, please check https://spotbugs.readthedocs.io/en/latest/introduction.html and try to contribute a fix - click the "Edit on GitHub" link in the upper right corner.

hazendaz commented 5 years ago

Closing issue here as not an issue with the maven plugin nor design of spotbugs but rather documentation clarity if user so wishes to update that.