Configure the site for every module

This commit is contained in:
Andreas Dangel 2014-10-08 21:49:23 +02:00
parent bc9469e385
commit 475745e98e
29 changed files with 417 additions and 153 deletions

11
.gitignore vendored
View File

@ -7,6 +7,11 @@ bin/
.ruleset
.settings/
*.patch
pmd/src/site/site.xml
pmd/src/site/xdoc/rules
pmd/src/site/xdoc/mergedruleset.xml
pmd-java/src/site/site.xml
pmd-javascript/src/site/site.xml
pmd-jsp/src/site/site.xml
pmd-plsql/src/site/site.xml
pmd-vm/src/site/site.xml
pmd-xml/src/site/site.xml
*/src/site/xdoc/rules
*/src/site/xdoc/mergedruleset.xml

View File

@ -0,0 +1,3 @@
# PMD C++
Only CPD is supported. There are no PMD rules for C++.

12
pmd-cpp/src/site/site.xml Normal file
View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns="http://maven.apache.org/DECORATION/1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/DECORATION/1.1.0 http://maven.apache.org/xsd/decoration-1.1.0.xsd"
name="PMD CPP">
<body>
<menu ref="parent"/>
<menu ref="reports"/>
</body>
</project>

View File

@ -0,0 +1,3 @@
# PMD Fortran
Only CPD is supported. There are no PMD rules for Fortran.

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns="http://maven.apache.org/DECORATION/1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/DECORATION/1.1.0 http://maven.apache.org/xsd/decoration-1.1.0.xsd"
name="PMD Fortran">
<body>
<menu ref="parent"/>
<menu ref="reports"/>
</body>
</project>

View File

@ -100,11 +100,22 @@
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd-build</artifactId>
<configuration>
<xdocDirectory>${project.build.directory}/generated-xdocs</xdocDirectory>
<rulesetsDirectory>${basedir}/src/main/resources/rulesets</rulesetsDirectory>
<siteXml>${basedir}/src/site/site.pre.xml</siteXml>
<siteXmlTarget>${basedir}/src/site/site.xml</siteXmlTarget>
<target>${basedir}/src/site/xdoc/rules</target>
</configuration>
<executions>
<execution>
<phase>pre-site</phase>
<goals>
<goal>pmd-pre-site</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

View File

@ -41,6 +41,24 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd-build</artifactId>
<configuration>
<rulesetsDirectory>${basedir}/src/main/resources/rulesets</rulesetsDirectory>
<siteXml>${basedir}/src/site/site.pre.xml</siteXml>
<siteXmlTarget>${basedir}/src/site/site.xml</siteXmlTarget>
<target>${basedir}/src/site/xdoc/rules</target>
</configuration>
<executions>
<execution>
<phase>pre-site</phase>
<goals>
<goal>pmd-pre-site</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>

View File

@ -0,0 +1,5 @@
# PMD JavaScript
Contains the PMD implementation to support the JavaScript programming language.
For the available rules, see <a href="rules/index.html">rulesets index</a> page.

View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns="http://maven.apache.org/DECORATION/1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/DECORATION/1.1.0 http://maven.apache.org/xsd/decoration-1.1.0.xsd"
name="PMD JavaScript">
<body>
<menu ref="parent"/>
<!-- The rulesets part of navigation will be added during pre-site and the
list is build dynamically based on rulesets folder directory layout -->
<menu name="Rule Sets"/>
<!-- *********** -->
<menu ref="reports"/>
</body>
</project>

View File

@ -83,11 +83,22 @@
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd-build</artifactId>
<configuration>
<xdocDirectory>${project.build.directory}/generated-xdocs</xdocDirectory>
<rulesetsDirectory>${basedir}/src/main/resources/rulesets</rulesetsDirectory>
<siteXml>${basedir}/src/site/site.pre.xml</siteXml>
<siteXmlTarget>${basedir}/src/site/site.xml</siteXmlTarget>
<target>${basedir}/src/site/xdoc/rules</target>
</configuration>
<executions>
<execution>
<phase>pre-site</phase>
<goals>
<goal>pmd-pre-site</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

View File

@ -0,0 +1,5 @@
# PMD JSP
Contains the PMD implementation to support Java Server Pages.
For the available rules, see <a href="rules/index.html">rulesets index</a> page.

View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns="http://maven.apache.org/DECORATION/1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/DECORATION/1.1.0 http://maven.apache.org/xsd/decoration-1.1.0.xsd"
name="PMD JSP">
<body>
<menu ref="parent"/>
<!-- The rulesets part of navigation will be added during pre-site and the
list is build dynamically based on rulesets folder directory layout -->
<menu name="Rule Sets"/>
<!-- *********** -->
<menu ref="reports"/>
</body>
</project>

View File

@ -0,0 +1,3 @@
# PMD PHP
Only CPD is supported. There are no PMD rules for PHP.

12
pmd-php/src/site/site.xml Normal file
View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns="http://maven.apache.org/DECORATION/1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/DECORATION/1.1.0 http://maven.apache.org/xsd/decoration-1.1.0.xsd"
name="PMD PHP">
<body>
<menu ref="parent"/>
<menu ref="reports"/>
</body>
</project>

View File

@ -83,11 +83,22 @@
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd-build</artifactId>
<configuration>
<xdocDirectory>${project.build.directory}/generated-xdocs</xdocDirectory>
<rulesetsDirectory>${basedir}/src/main/resources/rulesets</rulesetsDirectory>
<siteXml>${basedir}/src/site/site.pre.xml</siteXml>
<siteXmlTarget>${basedir}/src/site/site.xml</siteXmlTarget>
<target>${basedir}/src/site/xdoc/rules</target>
</configuration>
<executions>
<execution>
<phase>pre-site</phase>
<goals>
<goal>pmd-pre-site</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

View File

@ -0,0 +1,5 @@
# PMD PL/SQL
Contains the PMD implementation to support PL/SQL.
For the available rules, see <a href="rules/index.html">rulesets index</a> page.

View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns="http://maven.apache.org/DECORATION/1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/DECORATION/1.1.0 http://maven.apache.org/xsd/decoration-1.1.0.xsd"
name="PMD PL/SQL">
<body>
<menu ref="parent"/>
<!-- The rulesets part of navigation will be added during pre-site and the
list is build dynamically based on rulesets folder directory layout -->
<menu name="Rule Sets"/>
<!-- *********** -->
<menu ref="reports"/>
</body>
</project>

View File

@ -0,0 +1,3 @@
# PMD Ruby
Only CPD is supported. There are no PMD rules for Ruby.

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns="http://maven.apache.org/DECORATION/1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/DECORATION/1.1.0 http://maven.apache.org/xsd/decoration-1.1.0.xsd"
name="PMD Ruby">
<body>
<menu ref="parent"/>
<menu ref="reports"/>
</body>
</project>

View File

@ -82,6 +82,24 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd-build</artifactId>
<configuration>
<rulesetsDirectory>${basedir}/src/main/resources/rulesets</rulesetsDirectory>
<siteXml>${basedir}/src/site/site.pre.xml</siteXml>
<siteXmlTarget>${basedir}/src/site/site.xml</siteXmlTarget>
<target>${basedir}/src/site/xdoc/rules</target>
</configuration>
<executions>
<execution>
<phase>pre-site</phase>
<goals>
<goal>pmd-pre-site</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>

View File

@ -0,0 +1,5 @@
# PMD Velocity
Contains the PMD implementation to support the Velocity Template Language.
For the available rules, see <a href="rules/index.html">rulesets index</a> page.

View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns="http://maven.apache.org/DECORATION/1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/DECORATION/1.1.0 http://maven.apache.org/xsd/decoration-1.1.0.xsd"
name="PMD Velocity">
<body>
<menu ref="parent"/>
<!-- The rulesets part of navigation will be added during pre-site and the
list is build dynamically based on rulesets folder directory layout -->
<menu name="Rule Sets"/>
<!-- *********** -->
<menu ref="reports"/>
</body>
</project>

View File

@ -41,6 +41,24 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd-build</artifactId>
<configuration>
<rulesetsDirectory>${basedir}/src/main/resources/rulesets</rulesetsDirectory>
<siteXml>${basedir}/src/site/site.pre.xml</siteXml>
<siteXmlTarget>${basedir}/src/site/site.xml</siteXmlTarget>
<target>${basedir}/src/site/xdoc/rules</target>
</configuration>
<executions>
<execution>
<phase>pre-site</phase>
<goals>
<goal>pmd-pre-site</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>

View File

@ -0,0 +1,5 @@
# PMD XML and XSL
Contains the PMD implementation to support XML and XSL.
For the available rules, see <a href="rules/index.html">rulesets index</a> page.

View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns="http://maven.apache.org/DECORATION/1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/DECORATION/1.1.0 http://maven.apache.org/xsd/decoration-1.1.0.xsd"
name="PMD XML">
<body>
<menu ref="parent"/>
<!-- The rulesets part of navigation will be added during pre-site and the
list is build dynamically based on rulesets folder directory layout -->
<menu name="Rule Sets"/>
<!-- *********** -->
<menu ref="reports"/>
</body>
</project>

View File

@ -115,25 +115,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd-build</artifactId>
<configuration>
<rulesetsDirectory>${basedir}/src/main/resources/rulesets</rulesetsDirectory>
<siteXml>${basedir}/src/site/site.pre.xml</siteXml>
<siteXmlTarget>${basedir}/src/site/site.xml</siteXmlTarget>
<target>${basedir}/src/site/xdoc/rules</target>
</configuration>
<executions>
<execution>
<phase>pre-site</phase>
<goals>
<goal>pmd-pre-site</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
@ -222,118 +203,6 @@
</dependency>
</dependencies>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jxr-plugin</artifactId>
<version>2.4</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9.1</version>
<reportSets>
<reportSet>
<reports>
<report>javadoc</report>
<report>test-javadoc</report>
</reports>
</reportSet>
</reportSets>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<version>${pmd.plugin.version}</version>
<configuration>
<linkXref>true</linkXref>
<minimumTokens>100</minimumTokens>
<targetJdk>${java.version}</targetJdk>
<rulesets>
<ruleset>src/main/resources/rulesets/internal/dogfood.xml</ruleset>
</rulesets>
</configuration>
</plugin>
<!-- Emma is a test coverage tools to be used instead of clover.
As the mvn2 plugin is not released yet, the plugin is commented out, so you
build won't fail: You can get an Emma plugin for Maven2 at http://jira.codehaus.org/browse/MOJO-762
Download the tarball, extract, cd into dir, run $ mvn install. -->
<!-- <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>emma-maven-plugin</artifactId>
</plugin> -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>${checkstyle.version}</version>
<configuration>
<configLocation>etc/checkstyle-config.xml</configLocation>
<suppressionsFile>etc/checkstyle-suppressions.xml</suppressionsFile>
</configuration>
<reportSets>
<reportSet>
<reports>
<report>checkstyle</report>
</reports>
</reportSet>
</reportSets>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>2.7</version>
<reportSets>
<reportSet>
<reports>
<report>summary</report>
<report>dependencies</report>
<report>project-team</report>
<report>mailing-list</report>
<report>cim</report>
<report>issue-tracking</report>
<report>license</report>
<report>scm</report>
</reports>
</reportSet>
</reportSets>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>${surefire.version}</version>
</plugin>
<plugin>
<groupId>com.atlassian.maven.plugins</groupId>
<artifactId>maven-clover2-plugin</artifactId>
<version>2.5.1</version>
<configuration>
<licenseLocation>licences/clover2.license</licenseLocation>
<reportDescriptor>etc/default-clover-report.xml</reportDescriptor>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>
<version>2.1</version>
<reportSets>
<reportSet>
<reports>
<report>dependency-updates-report</report>
<report>plugin-updates-report</report>
<report>property-updates-report</report>
</reports>
</reportSet>
</reportSets>
</plugin>
</plugins>
</reporting>
<profiles>
<profile>
<id>reports</id>

View File

@ -54,15 +54,6 @@
<menu ref="parent"/>
<!-- The rulesets part of navigation will be added during pre-site and the
list is build dynamically based on rulesets folder directory layout -->
<menu name="Rule Sets"/>
<!-- *********** -->
<menu ref="reports"/>
</body>

114
pom.xml
View File

@ -271,7 +271,7 @@
If the xdocs files stay in src/site/xdoc/, mvn tries to copy over the generated
one, and complains... -->
<src.xdocs.dir>src/site/xdocs</src.xdocs.dir>
<pmd.website.baseurl>http://pmd.sourceforge.net/snapshot</pmd.website.baseurl>
<pmd.website.baseurl>http://pmd.sourceforge.net/snapshot/${project.artifactId}</pmd.website.baseurl>
</properties>
<build>
@ -447,6 +447,118 @@
</plugins>
</build>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jxr-plugin</artifactId>
<version>2.4</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9.1</version>
<reportSets>
<reportSet>
<reports>
<report>javadoc</report>
<report>test-javadoc</report>
</reports>
</reportSet>
</reportSets>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<version>${pmd.plugin.version}</version>
<configuration>
<linkXref>true</linkXref>
<minimumTokens>100</minimumTokens>
<targetJdk>${java.version}</targetJdk>
<rulesets>
<ruleset>src/main/resources/rulesets/internal/dogfood.xml</ruleset>
</rulesets>
</configuration>
</plugin>
<!-- Emma is a test coverage tools to be used instead of clover.
As the mvn2 plugin is not released yet, the plugin is commented out, so you
build won't fail: You can get an Emma plugin for Maven2 at http://jira.codehaus.org/browse/MOJO-762
Download the tarball, extract, cd into dir, run $ mvn install. -->
<!-- <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>emma-maven-plugin</artifactId>
</plugin> -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>${checkstyle.version}</version>
<configuration>
<configLocation>etc/checkstyle-config.xml</configLocation>
<suppressionsFile>etc/checkstyle-suppressions.xml</suppressionsFile>
</configuration>
<reportSets>
<reportSet>
<reports>
<report>checkstyle</report>
</reports>
</reportSet>
</reportSets>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>2.7</version>
<reportSets>
<reportSet>
<reports>
<report>summary</report>
<report>dependencies</report>
<report>project-team</report>
<report>mailing-list</report>
<report>cim</report>
<report>issue-tracking</report>
<report>license</report>
<report>scm</report>
</reports>
</reportSet>
</reportSets>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>${surefire.version}</version>
</plugin>
<plugin>
<groupId>com.atlassian.maven.plugins</groupId>
<artifactId>maven-clover2-plugin</artifactId>
<version>2.5.1</version>
<configuration>
<licenseLocation>licences/clover2.license</licenseLocation>
<reportDescriptor>etc/default-clover-report.xml</reportDescriptor>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>
<version>2.1</version>
<reportSets>
<reportSet>
<reports>
<report>dependency-updates-report</report>
<report>plugin-updates-report</report>
<report>property-updates-report</report>
</reports>
</reportSet>
</reportSets>
</plugin>
</plugins>
</reporting>
<dependencyManagement>
<dependencies>
<dependency>