Publish PMD Report

To publish PMD report, you only need two steps:

  1. Generate PMD XML report from Ant or Maven or any other build tool.
  2. Add PMD report publish step by choosing Publish -> PMD Report from step menu.

Generate PMD Report

QuickBuild will NOT generate PMD report automatically, so first make sure the PMD report is produced by ANT or by any other build tool. The following example shows how to generate PMD XML report with PMD Ant task:

CheckStyle target in build.xml
<taskdef name="pmd" classname="net.sourceforge.pmd.ant.PMDTask"/>

<target name="pmd">
    <taskdef name="pmd" classname="net.sourceforge.pmd.ant.PMDTask"/>
    <pmd rulesetfiles="imports.xml,unusedcode">
        <formatter type="xml" toFile="c:\pmd_report.xml"/>
        <fileset dir="C:\j2sdk1.4.1_01\src\java\lang\">
            <include name="**/*.java"/>
        </fileset>
    </pmd>
</target>
"Be Careful"

Please don't use 'shortFileNames' attribute for PMD task, or set this attribute to false instead, otherwise QuickBuild will not open the source code correctly.

After adding the target, you can generate the XML report for your source code, and after that you can tell QuickBuild to publish the results.

Publish PMD Report

Just like all other build reports, you add PMD report by [adding a publish step] in a configuration. When you add publish PMD Report step, the following screen will be displayed:

For Report Files/Patterns field, QuickBuild uses an enhanced Ant style file patterns to collect the reports, and the directory you specified is relative to the workspace directory.

QuickBuild will analyze the PMD report and it will generate the Overview/Details after each build, and it also will generate the statistics data for the reports.

Labels:

Enter labels to add to this page:
Wait Image 
Looking for a label? Just start typing.