Findbugs command for src

I am trying to combine hudson and findbugs on the command line. I am using a command line script.

./findbugs -textui -xml -outputFile report.xml src/

When I try to run this, I get an error

Exception in thread "main" edu.umd.cs.findbugs.NoClassesFoundToAnalyzeException: No classes found to analyze in

Is it possible to run findbugs on .java files? How to include java files in this directory and subdirectories?

+4
source share
2 answers

You must specify the assembly directory with the class or jar files instead of src dir. FindBugs parses bytecode, not source files.

+3
source

It is best to use the Ant Findbugs or Maven Findbugs plugin to generate a report of XML findbugs files (possibly DAILY using the Hudson Job), based on which build mechanism you use (ant or maven). You can tell them to use the desired source directory for your code base.

In the same task, if you have the Findbugs plugin enabled, you can configure it using Hudson by specifying the location of the findbugs XML search (generated by the ANT or MAVEN task), and Hudson will prepare a report. More on the plugin @ http://wiki.hudson-ci.org/display/HUDSON/FindBugs+Plugin

+2
source

All Articles