Publish CPD Report

You are viewing an old version (v. 1) of this page.
The latest version is v. 2, last edited on Jun 10, 2010 (view differences | )
view page history | view next version >>

To publish CPD report, you only need two steps:

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

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:

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.

Publish CPD Report

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

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

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 CPD report and it will generate the Overview/Details after each build, and it also will generate the statistics data for the reports.

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