Jenkins can visualize the results of the FindBugs analysis of your class files. When this option is configured Jenkins shows the FindBugs analysis results in different views: historical result trend, module and package statistics, web UI for viewing analysis reports and warnings, and so on.
You need to set up your build to run FindBugs in order to use this feature - this Jenkins plug-in does not perform the actual analysis!
pom.xml
file to enable the findbugs analysis: <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>findbugs-maven-plugin</artifactId> <version>1.2</version> <configuration> <findbugsXmlOutput>true</findbugsXmlOutput> <findbugsXmlWithMessages>true</findbugsXmlWithMessages> <xmlOutput>true</xmlOutput> [...] </configuration> </plugin>
build.xml
, you first need to add a task
definition. This should appear as follows: <taskdef name="findbugs" classname="edu.umd.cs.findbugs.anttask.FindBugsTask"/>After you have added the task definition, you can define a target which uses the
findbugs
task, e.g.: <target name="findbugs" depends="jar"> <findbugs home="${findbugs.home}" output="xml:withMessages" outputFile="findbugs.xml" > <auxClasspath path="${basedir}/lib/Regex.jar" /> <sourcePath path="${basedir}/src/java" /> <class location="${basedir}/bin/bcel.jar" /> </findbugs> </target>