Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#5 Regarding generation of one of the findbugs views

closed
nobody
None
5
2008-01-05
2007-07-13
Pavan
No

Hi,

I am using findbugs in my application and find it extremely useful.
Could you pl tell me how I can generate the following view of findbugs analysis output uing findbugs tools?
http://findbugs.cs.umd.edu/demo/jdk7/index.html

Thanks,
Pavan

Discussion

  • Logged In: YES
    user_id=15324
    Originator: NO

    Hi Pavan,

    That output was generated with an XSL stylesheet called
    "fancy.xsl".

    First, save your project to an XML project file (with an ".fbp"
    file extension). You can use File->Save As in the GUI to
    do this.

    Then, from the command line:

    findbugs -textui -project myproject.fbp -html:fancy.xsl -outputFile myproject-report.html

    You'll substitute the name of your project file for "myproject.fbp".

    You can also use the -xml:withMessages option to save analysis
    results to the FindBugs native XML format, and directly use
    the stylesheet with an XSLT processor to generate the HTML
    report. (The stylesheets are in findbugs.jar, and should
    also be available in the FindBugs installation directory.)

    -Dave

     
  • Pavan
    Pavan
    2007-07-16

    Logged In: YES
    user_id=1843870
    Originator: YES

    Hi Dave,

    Thanks for your inputs. I could see it in action using textui option and specifying
    project option from cmd prompt. But I integrated findbugs in my application as an
    ant task. I am using the following xml for findbugs task but it did not work.
    I get the message "java.lang.ClassNotFoundException: org.apache.tools.ant.taskdefs.optional.TraXLiaison"

    <target name="analyze">
    <!-- run findbugs against itself -->
    <findbugs home="${findbugs.home}"
    output="xml"
    timeout="90000000"
    reportLevel="experimental"
    workHard="true"
    effort="max"
    outputFile="${build.home}/findbugs/findbugs-${release}.xml"
    includeFilter="${build.home}/etc/filter-bugs.xml"
    projectName="DESFindBugs"
    >
    <class location="${desflow.home}/build/webapps/WEB-INF/classes/deshaw/desflow/external" />
    <auxClasspath>
    <fileset dir="${commons.home}/lib/java"/>
    </auxClasspath>
    </findbugs>

        &lt;xslt destdir="$\{build.home\}/findbugs/"
    

    in="${build.home}/findbugs/findbugs-${release}.xml"
    out="${build.home}/findbugs/findbugs-${release}.html"
    style="${findbugs.home}/src/fancy.xsl"
    >
    <classpath>
    <pathelement path="${commons.home}"/>
    <pathelement location="lib/ant-trax-1.6.2.jar"/>
    </classpath>
    </xslt>
    </target>

    Could you pl let me know the error in this?

    Thanks a lot,
    Pavan

     
  • Ben Langmead
    Ben Langmead
    2007-12-21

    • status: open --> pending
     
  • Ben Langmead
    Ben Langmead
    2007-12-21

    Logged In: YES
    user_id=1879748
    Originator: NO

    This looks like a problem with your ant setup. I'm going to set this to 'pending' - if you're still having this problem and it looks like it's due to FindBugs, please post back.

     
  • Logged In: YES
    user_id=1312539
    Originator: NO

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 14 days (the time period specified by
    the administrator of this Tracker).

     
    • status: pending --> closed