<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- 
/*
 * 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</title>
    <author email="siegfried.goeschl@it20one.at">Siegfried Goeschl</author>
  </properties>

  <body>
    <section name="Maven PMD Plug-in">

      <p>
        This plugin generates a report of the PMD static source code
        analyzer.
      </p>

      <subsection name="Installation">
        
        <p>
          Copy the downloaded plugin into the Maven plugin directory.
          Any older version of the plugin should to be deleted to make
          sure that the newest plugin is called
        </p>

        <p>
          Download the PMD binary distribution and put the PMD
          jar into the repository. This has to be done manually
          unless PMD is hosted on the Maven remote repository.
        </p>
          
        <p>          
          Run "maven -g" and look out for documented PMD goals. 
          If you see some then the unpacking succeeded.
        </p>        
        
        <p>                  
          The PMD plugin can be started through "maven pmd" 
          or integrated by using the following code snippet in
          maven.xml:
        </p>        
        
        <source>
<![CDATA[
<?xml version="1.0"?>
  <preGoal name="site:generate">
    <attainGoal name="pmd"/>
  </preGoal>
]]>
        </source>

        <p>                  
          The generated report has to be added manually to the 
          website which is usually done with navigation.xml.
        </p>        

        <source>
<![CDATA[
<?xml version="1.0"?>
  <menu name="Custom Reports">
    <item name="PMD Report" href="/pmd-report.html"/>
    <!-- Add more custom reports here -->
  </menu>
]]>
        </source>

        <p>                  
          Another way to integrate the PMD plugin is to add it to the &lt;reports&gt;
          section in your project.xml:
        </p>        
        
        <source>
<![CDATA[
  <reports>
    <report>maven-jdepend-plugin</report>
    <report>maven-checkstyle-plugin</report>
    <report>maven-pmd-plugin</report>
    <report>maven-changelog-plugin</report>
    <report>maven-file-activity-plugin</report>
    <report>maven-developer-activity-plugin</report>
    <report>maven-javadoc-plugin</report>
    <report>maven-jxr-plugin</report>
    <report>maven-junit-report-plugin</report>
    <report>maven-tasklist-plugin</report>
  </reports>  
]]>
        </source>

      </subsection>

      <subsection name="Thanks to ...">
     
        <p>
          And last but not least - thanks to 
          <a href="http://www.together.at">Together Teamlösungen</a> for
          their support of Open Source Software and their contributions
          such as <a href="http://www.enhydra.org">Enhydra Application 
          Server 5.0 ("Aonyx")</a> and a couple of Maven plugins.
        </p>      
        
      </subsection>        
      
    </section>

  </body>

</document>
