Hallo Everybody,

I am using findbugs plugin(0.9.1) via ant (ver 1.65) to generate a bug-report on my project.

I am unable to get the complete information of the bugs or violation in the output xml file.

Could anyone please see if there are to be any changes to be made in my build.xml file of the Ant given below:

 

            <taskdef name="findbugs" classname="edu.umd.cs.findbugs.anttask.FindBugsTask" />

 

            <target name="findbugs" description="Scans for instances of bug patterns,code instances that are likely to be errors.">

                        <findbugs home="${findbugs_home}" output="xml" outputFile="${findbugs_output}"

                                    effort = "max" reportLevel = "low">

                                    <sourcePath path="${source_dir}" />

                                    <class location="${builds_dir}" />

                        </findbugs>

            </target>

 

The kind of report.xml file which I receive is insufficient for me to display the information using xsl / jstl. for example: http://boss.bekk.no/boss/middlegen/findbugs-report.html


A part of the xml file is:

 

<BugCollection version="0.9.1" timestamp="1121274922440">

  <Project filename="<<unnamed project>>">

    <Jar>C:\eclipse\workspace\metrics_view\target\builds</Jar>

    <SrcDir>C:\eclipse\workspace\metrics_view</SrcDir>

  </Project>

  <BugInstance type="DE_MIGHT_IGNORE" priority="3" abbrev="DE" category="CORRECTNESS" uid="0" active="1121274922440-1121274922440">

    <Class classname="intland.code.Box"/>

    <Method classname="intland.code.Box" name="testMethod2" signature="()V">

      <SourceLine classname="intland.code.Box" start="-1" end="-1" startBytecode="0" endBytecode="12" role="SOURCE_LINE_UNKNOWN"/>

    </Method>

    <SourceLine classname="intland.code.Box" start="-1" end="-1" startBytecode="11" endBytecode="11" role="SOURCE_LINE_UNKNOWN"/>

    <Class classname="java.lang.Exception" role="CLASS_EXCEPTION"/>

  </BugInstance>

.

.

.

.

.

.

.

.

.

  <Errors></Errors>

  <FindBugsSummary timestamp="Wed, 13 Jul 2005 19:15:22 +0200" total_classes="8" total_bugs="6" total_size="868" num_packages="2" priority_3="4" priority_2="2">

    <PackageStats package="intland.code" total_bugs="2" total_types="4" total_size="426" priority_3="2">

      <ClassStats class="intland.code.Area" interface="false" size="109" bugs="0"/>

      <ClassStats class="intland.code.Box" interface="false" size="121" bugs="1" priority_3="1"/>

      <ClassStats class="intland.code.Circle" interface="false" size="87" bugs="1" priority_3="1"/>

      <ClassStats class="intland.code.Volume" interface="false" size="109" bugs="0"/>

    </PackageStats>

 

Could any one please let me know what kind of changes are to be done in the build file to receive more information and if possible give me a sample report.xml file. (i.e. like any more attributes to the finbugs tag)

 

Thanks,

 

With Best regards / Mit freundlichen Grüßen

Sreenivas.