From 23288e17e7defadb4f018a9b6928750cc19b2914 Mon Sep 17 00:00:00 2001 From: brett Date: Mon, 1 Mar 2004 01:50:22 +0000 Subject: [PATCH] PR: MPPMD-5 Add CPD report patch git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@114765 13f79535-47bb-0310-9956-ffa450edef68 --- pmd/plugin.jelly | 65 +++++++++++++++++++++++++++++++++++++++- pmd/plugin.properties | 8 +++++ pmd/xdocs/changes.xml | 3 ++ pmd/xdocs/properties.xml | 15 ++++++++++ 4 files changed, 90 insertions(+), 1 deletion(-) diff --git a/pmd/plugin.jelly b/pmd/plugin.jelly index 2da14f17..9731bb9f 100644 --- a/pmd/plugin.jelly +++ b/pmd/plugin.jelly @@ -19,6 +19,11 @@ pluginName="pmd" description="Verification of coding rules." link="pmd-report"/> + @@ -30,6 +35,7 @@ + @@ -118,6 +124,63 @@ prettyPrint="true" /> + + + + + + - + + + + + + + + + Running the CPD task with minimumTokenCount = ${maven.pmd.cpd.minimumtokencount} ... + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pmd/plugin.properties b/pmd/plugin.properties index ac5264cd..4541b70c 100644 --- a/pmd/plugin.properties +++ b/pmd/plugin.properties @@ -15,3 +15,11 @@ maven.pmd.rulesetfiles=${plugin.resources}/rulesets/basic.xml,${plugin.resources maven.pmd.includes = **/*.java maven.pmd.excludes = + +# enable/disable CPD + +maven.pmd.cpd.enable = false + +# minimum length of token sequences considered equal + +maven.pmd.cpd.minimumtokencount = 100 diff --git a/pmd/xdocs/changes.xml b/pmd/xdocs/changes.xml index eeed206e..1c72265d 100644 --- a/pmd/xdocs/changes.xml +++ b/pmd/xdocs/changes.xml @@ -15,6 +15,9 @@ Apply MAVEN-1008. Allow for custom rulesets in the classpath. + + Apply MPPMD-5. Add support for CPD report. + diff --git a/pmd/xdocs/properties.xml b/pmd/xdocs/properties.xml index 61861ba6..85b97b67 100644 --- a/pmd/xdocs/properties.xml +++ b/pmd/xdocs/properties.xml @@ -54,6 +54,21 @@ exclude any files. + + maven.pmd.cpd.enable + Yes + + Enable/disable the CPD report. Defaults to "false". + + + + maven.pmd.cpd.minimumtokencount + Yes + + Specifies the minimal number required to consider two sequences of + tokens identical. Defaults to "100". + +