Adding PMD Report

You are viewing an old version (v. 4) of this page.
The latest version is v. 33, last edited on Oct 17, 2009 (view differences | )
<< View previous version | view page history | view next version >>

To add PMD report, only need two steps:

  1. Generate PMD XML report from Ant or Maven or any other build tools.
  2. Publish PMD report in the [configuration].

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 tools, the following example shows how to generate PMD XML report by 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>

After adding generate the XML report for your source code, you can tell QuickBuild to add those results now.

Publish PMD Report

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

Unable to render embedded object: File (pmd_step.png) not found.

In source report files field, QuickBuild use an [enhanced Ant style file patterns] to collect the reports, and the directory you specified is relative to the [workspace] directory.

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

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