git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@113253 13f79535-47bb-0310-9956-ffa450edef68
108 lines
2.9 KiB
XML
108 lines
2.9 KiB
XML
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||
|
||
<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 <reports>
|
||
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<6D>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>
|