You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by rashmi <rc...@spiderlogic.com> on 2011/10/11 13:21:59 UTC

Disable CPD and Enable PMD check for teh same set of classes

--Need to disable CPD and enable PMD for the same set of classes.
--Having the 'configuration' tag within an 'execution' tag does not work.
--The 'configuration' tag needs to be put outside the 'executions' tag.
Therefore, whatever has been configured will apply to both CPD and PMD.
--Also tried to have 2 'plugin' tags - one for CPD and other for PMD. But,
the last 'plugin' tag is considered.
Please help me with this.

Thanks

--
View this message in context: http://maven.40175.n5.nabble.com/Disable-CPD-and-Enable-PMD-check-for-teh-same-set-of-classes-tp4891455p4891455.html
Sent from the Maven - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Disable CPD and Enable PMD check for teh same set of classes

Posted by Wayne Fay <wa...@gmail.com>.
> Following is an extract of the pom.xml that I tried:
>
> But, it neither runs PMD nor cpd.

You've got an awful lot of configuration in there. Make it work in the
simplest case (using only local [in your current project]
configuration files etc). Then add configuration until it runs as you
require.

Wayne

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Disable CPD and Enable PMD check for teh same set of classes

Posted by rashmi <rc...@spiderlogic.com>.
Hello Wayne,

Following is an extract of the pom.xml that I tried:

<plugins>
   <plugin>
	<artifactId>maven-pmd-plugin</artifactId>
	<version>2.5</version>
	<dependencies>
		<dependency>
			<groupId>com.churchmutual</groupId>
			<artifactId>pmd-ruleset</artifactId>
			<version>0.0.2</version>
		</dependency>
	</dependencies>
   </plugin>
</plugins>

<reporting>
		<plugins>
			<plugin>
					<artifactId>maven-pmd-plugin</artifactId>
					<version>2.5</version>
					<reportSets>
						<reportSet>
							<reports>
								<report>
									pmd
								</report>
							</reports>
							<configuration>
								<goal>check</goal>
								<skip>false</skip>
								<targetJdk>${compile.source}</targetJdk>
								<rulesets>
								
<ruleset>/com/churchmutual/ocns/shared/pmdruleset/ocns.pmd.rules.xml</ruleset>
								</rulesets>
								<includeTests>true</includeTests>
								<linkXref>true</linkXref>
								<failOnViolation>true</failOnViolation>
							</configuration>
						</reportSet>
						<reportSet>
							<reports>
								<report>
									cpd
								</report>
							
							</reports>
							<configuration>
								<goal>cpd-check</goal>
								<skip>false</skip>
								<targetJdk>${compile.source}</targetJdk>
								<includeTests>true</includeTests>
								
								<linkXref>true</linkXref>
								<failOnViolation>true</failOnViolation>
							</configuration>
						</reportSet>
					</reportSets>
				</plugin>
		</plugins>
	</reporting>


But, it neither runs PMD nor cpd.

--
View this message in context: http://maven.40175.n5.nabble.com/Disable-CPD-and-Enable-PMD-check-for-teh-same-set-of-classes-tp4891455p4901668.html
Sent from the Maven - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Disable CPD and Enable PMD check for teh same set of classes

Posted by Wayne Fay <wa...@gmail.com>.
> --Need to disable CPD and enable PMD for the same set of classes.

Did you RTFM? I think not...
http://maven.apache.org/plugins/maven-pmd-plugin/examples/removeReport.html

Wayne

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org