PMD Plugin

Plugin Information

Plugin ID pmd
Latest Release 3.34-h-1
Latest Release Date Apr 2, 2013
Sources Github
Support Eclipse Hudson Forum
Issue Tracking Eclipse Bugzilla

This plugin generates the trend report for PMD, an open source static code analysis program. 

Quick Overview

Installation Requirements
This plug-in requires the utility plug-in "analysis-core" (called "Static Analysis Utilities" in the update manager). Please ensure that the latest version of this plug-in is also installed.

Description


 
This plug-in is supported by the Static Analysis Collector plug-in that collects different analysis results and shows the results in aggregated trend graphs. Additionally, health reporting and build stability is also based on the aggregated results.

The PMD plug-in scans for pmd.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.

The following features are provided by this plug-in:

  • Configuration of the files to scan after a build.
  • Build summary showing the new and fixed warnings of a build
  • Several trend reports showing the number of warnings per build
  • Overview of the found warnings per module, package, category, or type
    • Parsing of Maven pom.xml or Ant build.xml configuration files to obtain the module or project name
    • Parsing of Java files to obtain the package or name space name
  • Detail reports of the found warnings optionally filtered by severity (or new and fixed)
    • Short messages is read from the report file
    • Detailed description is read from the PMD library
  • Colored HTML display of the corresponding source file and warning lines:
    • Direct link to the warning line
    • Highlighting of single lines as well as line ranges
    • Highlighting of multiple line ranges per warning (different color for primary range)
    • Tool tip describing the warning message
  • Failure threshold to mark a build as unstable
  • Configurable project health support
  • Works with the freestyle and native m2 build option of Hudson (activated on goal pmd:pmd or site)
  • Remote API to export the build quality and found warnings
  • Localization available for: DE, JA (Please help to localize PMD for your locale!)

Labels:

plugin-maven plugin-maven Delete
plugin-report plugin-report Delete
supports-dashboard-view supports-dashboard-view Delete
tier3-compat-plugin tier3-compat-plugin Delete
tier2-plugin tier2-plugin Delete
Enter labels to add to this page:
Wait Image 
Looking for a label? Just start typing.
  1. Dec 17, 2009

    bokc says:

    Hi, I can't find 3.0 release on the download Section. BokC

    Hi,

    I can't find 3.0 release on the download Section.

    BokC

    1. Dec 18, 2009

      Ulli Hafner says:

      Seems that my release process has a bug somewhere. Can't you use the update mana...

      Seems that my release process has a bug somewhere. Can't you use the update manager?

      1. Dec 22, 2009

        bokc says:

        No, it's not possible. Hudson isinstaled on a server and for security it don't h...

        No, it's not possible. Hudson isinstaled on a server and for security it don't have acces to web.

  2. May 07, 2010

    Bruce W. Hoylman says:

    Hello -- I've constructed a Hudson job to run a PMD static analysis on ...

    Hello --

    I've constructed a Hudson job to run a PMD static analysis on a medium-is size code base (around 1000 source files).  The xml generated is 138k, 1300 lines so not big.  Using the latest version of your PMD plugin I configure the job to publish the results.  The build of the PMD results takes 7m42s, then the job attempts to publish the results.  It never comes back.  I've let the job run overnight just to see what would happen and it was running in the morning ... over 12 hours ... so I'm figuring it's not going to ever finish.  I see no memory errors in the catalina logs or anything out of the ordinary for that matter.  I've given the ant plenty of memory to play with (2G) for this job, so I don't think that's at issue.  Other jobs come and go during this time so Hudson is still in a good state.  Worse yet I cannot kill the running job from within Hudson either.  Is that a stuck thread?  I have to stop Hudson in order to purge the job.  The tail of the build log for the PMD job looks like this:

         [java] BUILD SUCCESSFUL
         [java] Total time: 4 minutes 11 seconds
    BUILD SUCCESSFUL
    Total time: 7 minutes 42 seconds
    [PMD] Collecting PMD analysis files...

    I run a PMD html formatter on the same xml which takes several seconds to complete, but completes non the less.  Can you explain to me how the PMD plugin is attempting to publish the analysis results?  Is it using a PMD formatter or have you crafted one of your own?

    I've resorted to running my own html formatter in the build on the analysis results and am using the html publisher plugin to get at the results so I'm not blocked, but I would however like to see the PMD plugin results.  Anyways, if I can help further troubleshoot my problem or if you need anything from me to help you understand what's going on, let me know.

    Peace.

    1. May 09, 2010

      Ulli Hafner says:

      Can you please create an issue and attach the PMD result file?

      Can you please create an issue and attach the PMD result file?