Zexter
Zexter

Reputation: 72

Jenkins Findbugs Empty output

I have configured jenkins to have a job which will run a batch command set to compile a java file.I have enabled findbugs for the job as well. But when I build the job the output i get is as follows

No changes.
Started by anonymous user
FindBugs: 0 warnings.

No warnings since build 4.
New zero warnings highscore: no warnings since yesterday!
During parsing an error has been reported.

When I click on error all I get is

Errors

No report files were found. Configuration error?

My job configuration looks like this enter image description here

If I run findbugs outside the jenkins I get the correct output

enter image description here

My Java File looks like this

class Input {
public static void main(String[] args) {
    System.out.println("Hello World! "); // Display the string.


    String str = null;
    if(str.equals("Test")) {
 /* The code here will not be reached, as an exception will be thrown. */
    }
}}

Upvotes: 0

Views: 990

Answers (1)

CSchulz
CSchulz

Reputation: 11020

The FindBugs Plugin searches for a findbugs.xml and generate a report. That means you have to run findbugs first.

The FindBugs plug-in scans for findbugs.xml files in the build workspace and reports the number of warnings found. This plug-in is part of the suite of static code analysis plug-ins that are documented on a separate WIKI page. (source)

But you can run findbugs before manually (more information):

java -jar $FINDBUGS_HOME/lib/findbugs.jar

Upvotes: 1

Related Questions