<?xml version="1.0"?>

<document>
  <properties>
    <author email="mikkey@users.sourceforge.net">Miguel Griffa</author>
    <title>Maven plugin</title>
  </properties>

  <body>
    <section name="Maven 1 PMD plugin">
      <p>
        This page is about the maven 1 PMD plugin. The maven 2 PMD plugin page is available
        <a href="mvn-plugin.html">here</a>.
      </p>
    </section>
    <section name="Running the pmd plugin">
    	<subsection name="report">
    		<p>
    			To include the Maven report in the project reports section add the following line under
    			the reports element in your project.xml:
    			<source><![CDATA[<report>maven-pmd-plugin</report>]]></source>
    			This will add an entry to the 'project reports' section with the PMD report.
    		</p>
    	</subsection>
    	<subsection name="manual">
    		<p>
    			To run PMD on a Maven project without adding it as a report, simply run
    			<source><![CDATA[maven pmd xdoc]]></source>
    			The PMD plugin writes the report in XML which will then be formatted into more readable HTML.
    		</p>
    	</subsection>
    </section>
    <section name="Customization">
    	<subsection name="Changing rulesets">
    		<p>
    			To specify a set of official, built-in rulesets to be used set them in the property
    			<em>maven.pmd.rulesets</em>.  You can include this setting in your project.properties file.
    		</p>
    		<p>
    		    A clean strategy for customizing which rules to use for a project is to write a ruleset file.
    		    In this file you can define which rules to use, add custom rules, and
    		    customizing which rules to include/exclude from official rulesets. More information on
    		    writing a ruleset can be found <a href="howtomakearuleset.html">here</a>.
   		    </p>
   		    <p>
   		        Add to the root of your Maven project a pmd.xml file which contains the ruleset mentioned in
   		        the previous paragraph. Add the following property to your project now:
   		        <source>maven.pmd.rulesetfiles = ${basedir}/pmd.xml</source>
	        </p>
    	</subsection>
    </section>
    <section name="Reference">
    	<p>
    		See the PMD plugin project page here:
    		<a href="http://maven.apache.org/maven-1.x/plugins/pmd/">http://maven.apache.org/maven-1.x/plugins/pmd/</a>
    	</p>
   	</section>
 </body>
</document>
