maven-plugins/pmd/xdocs/how-to.xml
evenisse 85df922d35 Update to ASL v.2
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@114795 13f79535-47bb-0310-9956-ffa450edef68
2004-03-04 18:40:25 +00:00

95 lines
3.2 KiB
XML

<?xml version="1.0"?>
<!--
/*
* Copyright 2001-2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-->
<document>
<properties>
<title>Maven PMD Plug-in How To</title>
<author email="siegfried.goeschl@it20one.at">Siegfried Goeschl</author>
</properties>
<body>
<section name="Maven PMD Plugin How To">
<subsection name="How to enable PMD for all of my projects?">
<p>
Usually I provide a custom plugin, e.g. "maven-it20one-plugin-1.0"
which sets the variable "maven.pmd.enable" to "true". Since all
plugins are parsed it is guaranteed that PMD will be executed
</p>
<p>
The simple way is to define the property in
$MAVEN_HOME/bin/driver.properties
</p>
</subsection>
<subsection name="How to disable PMD for one project?">
<p>
Assume that you have generated a DB layer having a few
hundreds Java source files. Apart from being curious you
don't want to have a PMD report for generated source files.
Simply put "maven.pmd.enable=false" into your project properties.
</p>
</subsection>
<subsection name="How to disable PMD for certain files?">
<p>
Also assuming that you have generated a DB layer within your project.
Simply put "maven.pmd.excludes=**/database/**" into your project
properties.
</p>
</subsection>
<subsection name="How to get rid of zillions of rule violations?">
<p>
You could fix the rule violations. On the other hand I find
some of the rules quite annoying. Rules can be removed by editing
the rulesets.properties.
</p>
<p>
In other case you change the trigger of the rules directly in the
ruleset files to fine tune the reports.
</p>
</subsection>
<subsection name="How to upgrade to a newer PMD jar?">
<p>
"Those bloody contributors do not keep up with the
release - there is the new JAR out there for two
days and no update of the plugin ... having pizza,
coke, a joint and doing nothing" - Fine, as
long as we do not inhale ... ;-)
</p>
<p>
The JAR picked up the plugin is defined in
$MAVEN_HOME/plugins/pmd/project.xml and can be
changed.
</p>
<p>
Leave it, try it but don't whine will I have to carve
out a living with some paid work ... :-[]
</p>
</subsection>
</section>
</body>
</document>