Publish CPD Report

Version 1 by Steve Luo
on Feb 14, 2010 12:01.

compared with
Current by Steve Luo
on Jun 10, 2010 18:47.

These lines were removed. This word was removed.
These lines were added. This word was added.

View page history

There are 1 changes. View first change.

 To publish [CPD|] report, you only need two steps:
 # Generate CPD *XML* report from [Ant|] or [Maven|] or any other build tool.
 # Add CPD report publish step by choosing _Publish -> CPD Report_ from step menu.
 h2. Generate CPD Report
 QuickBuild will NOT generate [CPD|] report automatically, so first make sure the CPD report is produced by [ANT|] or by any other build tool. The following example shows how to generate CPD XML report with [CPD Ant task|]:
 {code:xml|title= CheckStyle target in build.xml}
 <target name="cpd" depends="init" description="Generate the CPD XML report">
  <taskdef name="cpd"
  <fileset dir="${pmd.home}/lib">
  <include name="*.jar"/>
  <mkdir dir="${}"/>
  <cpd minimumTokenCount="100" format="xml" outputFile="${}/cpd_report.xml">
  <fileset dir="${dir.src}">
  <include name="**/*.java"/>
 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.
 h2. Publish CPD Report
 Just like all other [build reports|Publish Build Reports], you add CPD report by [adding a publish step|Working With Step] in a [configuration|Working with Configurations]. When you add publish CPD Report step, the following screen will be displayed:
 For Report Files/Patterns field, QuickBuild uses an [enhanced Ant style file patterns|File Pattern Reference] to collect the reports, and the directory you specified is *relative* to the [workspace|Configuration Workspace] directory.
 QuickBuild will analyze the CPD report and it will generate the Overview/Details after each build, and it also will generate the statistics data for the reports.
  Add _*Publish CPD Report*_ step to your build workflow. If you have several report sets, you can add several steps with different report set names. Reference [this page|Publish Build Reports] for more details.