You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by be...@apache.org on 2008/12/27 23:04:26 UTC
svn commit: r729684 - in /maven/plugins/trunk/maven-pmd-plugin: ./ src/it/
src/it/multi-module/ src/it/multi-module/mod-1/
src/it/multi-module/mod-1/src/ src/it/multi-module/mod-1/src/main/
src/it/multi-module/mod-1/src/main/config/ src/it/multi-module...
Author: bentmann
Date: Sat Dec 27 14:04:25 2008
New Revision: 729684
URL: http://svn.apache.org/viewvc?rev=729684&view=rev
Log:
[MPMD-85] Excludes PMD/CPD reports for POM files with pom packaging
Added:
maven/plugins/trunk/maven-pmd-plugin/src/it/
maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/
maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-1/
maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-1/pom.xml (with props)
maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-1/src/
maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-1/src/main/
maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-1/src/main/config/
maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-1/src/main/config/pmd/
maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-1/src/main/config/pmd/latin-1.xml (with props)
maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-1/src/main/config/pmd/utf-8.xml (with props)
maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-1/src/main/java/
maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-1/src/main/java/test/
maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-1/src/main/java/test/MyClass.java (with props)
maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-2/
maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-2/pom.xml (with props)
maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-2/rulesets/
maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-2/rulesets/basic.xml (with props)
maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-2/src/
maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-2/src/main/
maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-2/src/main/java/
maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-2/src/main/java/test/
maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-2/src/main/java/test/MyClass.java (with props)
maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-3/
maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-3/pom.xml (with props)
maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-3/src/
maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-3/src/main/
maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-3/src/main/config/
maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-3/src/main/config/pmd/
maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-3/src/main/config/pmd/abs.xml (with props)
maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-3/src/main/config/pmd/rel.xml (with props)
maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-3/src/main/java/
maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-3/src/main/java/test/
maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-3/src/main/java/test/MyClass.java (with props)
maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/pom.xml (with props)
maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/verify.bsh (with props)
maven/plugins/trunk/maven-pmd-plugin/src/it/settings.xml (with props)
Modified:
maven/plugins/trunk/maven-pmd-plugin/pom.xml
maven/plugins/trunk/maven-pmd-plugin/src/main/java/org/apache/maven/plugin/pmd/AbstractPmdReport.java
Modified: maven/plugins/trunk/maven-pmd-plugin/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-pmd-plugin/pom.xml?rev=729684&r1=729683&r2=729684&view=diff
==============================================================================
--- maven/plugins/trunk/maven-pmd-plugin/pom.xml (original)
+++ maven/plugins/trunk/maven-pmd-plugin/pom.xml Sat Dec 27 14:04:25 2008
@@ -99,7 +99,7 @@
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
- <version>1.5.1</version>
+ <version>1.5.6</version>
</dependency>
<dependency>
<groupId>pmd</groupId>
@@ -129,20 +129,29 @@
<build>
<plugins>
<plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
+ <artifactId>maven-invoker-plugin</artifactId>
+ <version>1.3</version>
+ <configuration>
+ <debug>true</debug>
+ <projectsDirectory>src/it</projectsDirectory>
+ <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
+ <pomIncludes>
+ <pomInclude>*/pom.xml</pomInclude>
+ </pomIncludes>
+ <preBuildHookScript>setup</preBuildHookScript>
+ <postBuildHookScript>verify</postBuildHookScript>
+ <localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
+ <settingsFile>src/it/settings.xml</settingsFile>
+ <goals>
+ <goal>clean</goal>
+ <goal>site</goal>
+ </goals>
+ </configuration>
<executions>
<execution>
<id>integration-test</id>
- <phase>integration-test</phase>
- <configuration>
- <tasks>
- <echo/><echo/><echo/><echo/><echo/>
- <echo level="warning">NO INTEGRATION TESTS DEFINED</echo>
- <echo/><echo/><echo/><echo/><echo/>
- </tasks>
- </configuration>
<goals>
+ <goal>install</goal>
<goal>run</goal>
</goals>
</execution>
Added: maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-1/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-1/pom.xml?rev=729684&view=auto
==============================================================================
--- maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-1/pom.xml (added)
+++ maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-1/pom.xml Sat Dec 27 14:04:25 2008
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.maven.its.pmd.mm</groupId>
+ <artifactId>parent</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>mod-1</artifactId>
+
+ <name>Module 1</name>
+ <description>
+ Test proper report generation in a multi-module build.
+ </description>
+
+ <reporting>
+ <plugins>
+ <plugin>
+ <artifactId>maven-pmd-plugin</artifactId>
+ <version>@project.version@</version>
+ <configuration>
+ <rulesets>
+ <ruleset>src/main/config/pmd/utf-8.xml</ruleset>
+ <ruleset>src/main/config/pmd/latin-1.xml</ruleset>
+ </rulesets>
+ </configuration>
+ </plugin>
+ </plugins>
+ </reporting>
+</project>
Propchange: maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-1/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-1/pom.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-1/src/main/config/pmd/latin-1.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-1/src/main/config/pmd/latin-1.xml?rev=729684&view=auto
==============================================================================
--- maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-1/src/main/config/pmd/latin-1.xml (added)
+++ maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-1/src/main/config/pmd/latin-1.xml Sat Dec 27 14:04:25 2008
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<ruleset name="Custom ruleset"
+ xmlns="http://pmd.sf.net/ruleset/1.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
+ xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd">
+ <description>
+ This ruleset is encoded with ISO-8859-1 to check proper encoding handling.
+ </description>
+ <rule ref="rulesets/basic.xml/UnnecessaryReturn" message="LATIN-1-CHARS: ÄÖÜäöüß"/>
+</ruleset>
Propchange: maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-1/src/main/config/pmd/latin-1.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-1/src/main/config/pmd/latin-1.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-1/src/main/config/pmd/utf-8.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-1/src/main/config/pmd/utf-8.xml?rev=729684&view=auto
==============================================================================
--- maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-1/src/main/config/pmd/utf-8.xml (added)
+++ maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-1/src/main/config/pmd/utf-8.xml Sat Dec 27 14:04:25 2008
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ruleset name="Custom ruleset"
+ xmlns="http://pmd.sf.net/ruleset/1.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
+ xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd">
+ <description>
+ This ruleset is encoded with UTF-8 to check proper encoding handling.
+ </description>
+ <rule ref="rulesets/basic.xml/EmptyStatementNotInLoop" message="UTF-8-CHARS: ÃÃÃäöüÃ"/>
+</ruleset>
Propchange: maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-1/src/main/config/pmd/utf-8.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-1/src/main/config/pmd/utf-8.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-1/src/main/java/test/MyClass.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-1/src/main/java/test/MyClass.java?rev=729684&view=auto
==============================================================================
--- maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-1/src/main/java/test/MyClass.java (added)
+++ maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-1/src/main/java/test/MyClass.java Sat Dec 27 14:04:25 2008
@@ -0,0 +1,12 @@
+package test;
+
+public class MyClass
+{
+
+ public static void main( String[] args )
+ {
+ ;
+ return;
+ }
+
+}
Propchange: maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-1/src/main/java/test/MyClass.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-1/src/main/java/test/MyClass.java
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-2/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-2/pom.xml?rev=729684&view=auto
==============================================================================
--- maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-2/pom.xml (added)
+++ maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-2/pom.xml Sat Dec 27 14:04:25 2008
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.maven.its.pmd.mm</groupId>
+ <artifactId>parent</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>mod-2</artifactId>
+
+ <name>Module 2</name>
+ <description>
+ Test proper report generation in a multi-module build.
+ </description>
+
+ <reporting>
+ <plugins>
+ <plugin>
+ <artifactId>maven-pmd-plugin</artifactId>
+ <version>@project.version@</version>
+ <configuration>
+ <rulesets>
+ <!-- NOTE: Clashes with classpath resource, check resolution -->
+ <ruleset>rulesets/basic.xml</ruleset>
+ </rulesets>
+ </configuration>
+ </plugin>
+ </plugins>
+ </reporting>
+</project>
Propchange: maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-2/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-2/pom.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-2/rulesets/basic.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-2/rulesets/basic.xml?rev=729684&view=auto
==============================================================================
--- maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-2/rulesets/basic.xml (added)
+++ maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-2/rulesets/basic.xml Sat Dec 27 14:04:25 2008
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ruleset name="Custom ruleset"
+ xmlns="http://pmd.sf.net/ruleset/1.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
+ xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd">
+ <description>
+ The relative path of this ruleset matches the built-in ruleset "basic".
+ </description>
+ <rule ref="rulesets/basic.xml/EmptyStatementNotInLoop" message="TEST: LOCAL-FILE-RULESET"/>
+</ruleset>
Propchange: maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-2/rulesets/basic.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-2/rulesets/basic.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-2/src/main/java/test/MyClass.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-2/src/main/java/test/MyClass.java?rev=729684&view=auto
==============================================================================
--- maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-2/src/main/java/test/MyClass.java (added)
+++ maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-2/src/main/java/test/MyClass.java Sat Dec 27 14:04:25 2008
@@ -0,0 +1,12 @@
+package test;
+
+public class MyClass
+{
+
+ public static void main( String[] args )
+ {
+ ;
+ return;
+ }
+
+}
Propchange: maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-2/src/main/java/test/MyClass.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-2/src/main/java/test/MyClass.java
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-3/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-3/pom.xml?rev=729684&view=auto
==============================================================================
--- maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-3/pom.xml (added)
+++ maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-3/pom.xml Sat Dec 27 14:04:25 2008
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.maven.its.pmd.mm</groupId>
+ <artifactId>parent</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>mod-3</artifactId>
+
+ <name>Module 3</name>
+ <description>
+ Test proper report generation in a multi-module build.
+ </description>
+
+ <reporting>
+ <plugins>
+ <plugin>
+ <artifactId>maven-pmd-plugin</artifactId>
+ <version>@project.version@</version>
+ <configuration>
+ <rulesets>
+ <!-- NOTE: One ruleset is given via relative path, one via absolute path, yet both must resolve to project files -->
+ <ruleset>src/main/config/pmd/rel.xml</ruleset>
+ <ruleset>${basedir}/src/main/config/pmd/abs.xml</ruleset>
+ </rulesets>
+ </configuration>
+ </plugin>
+ </plugins>
+ </reporting>
+</project>
Propchange: maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-3/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-3/pom.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-3/src/main/config/pmd/abs.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-3/src/main/config/pmd/abs.xml?rev=729684&view=auto
==============================================================================
--- maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-3/src/main/config/pmd/abs.xml (added)
+++ maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-3/src/main/config/pmd/abs.xml Sat Dec 27 14:04:25 2008
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<ruleset name="Custom ruleset"
+ xmlns="http://pmd.sf.net/ruleset/1.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
+ xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd">
+ <description>
+ This ruleset is specified via an absolute filesystem path.
+ </description>
+ <rule ref="rulesets/basic.xml/UnnecessaryReturn" message="TEST: ABSOLUTE-PATH"/>
+</ruleset>
Propchange: maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-3/src/main/config/pmd/abs.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-3/src/main/config/pmd/abs.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-3/src/main/config/pmd/rel.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-3/src/main/config/pmd/rel.xml?rev=729684&view=auto
==============================================================================
--- maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-3/src/main/config/pmd/rel.xml (added)
+++ maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-3/src/main/config/pmd/rel.xml Sat Dec 27 14:04:25 2008
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ruleset name="Custom ruleset"
+ xmlns="http://pmd.sf.net/ruleset/1.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
+ xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd">
+ <description>
+ This ruleset is specified via a relative filesystem path.
+ </description>
+ <rule ref="rulesets/basic.xml/EmptyStatementNotInLoop" message="TEST: RELATIVE-PATH"/>
+</ruleset>
Propchange: maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-3/src/main/config/pmd/rel.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-3/src/main/config/pmd/rel.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-3/src/main/java/test/MyClass.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-3/src/main/java/test/MyClass.java?rev=729684&view=auto
==============================================================================
--- maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-3/src/main/java/test/MyClass.java (added)
+++ maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-3/src/main/java/test/MyClass.java Sat Dec 27 14:04:25 2008
@@ -0,0 +1,12 @@
+package test;
+
+public class MyClass
+{
+
+ public static void main( String[] args )
+ {
+ ;
+ return;
+ }
+
+}
Propchange: maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-3/src/main/java/test/MyClass.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-3/src/main/java/test/MyClass.java
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/pom.xml?rev=729684&view=auto
==============================================================================
--- maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/pom.xml (added)
+++ maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/pom.xml Sat Dec 27 14:04:25 2008
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.apache.maven.its.pmd.mm</groupId>
+ <artifactId>parent</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <packaging>pom</packaging>
+
+ <name>Parent</name>
+ <description>
+ Test proper report generation in a multi-module build.
+ </description>
+
+ <modules>
+ <module>mod-1</module>
+ <module>mod-2</module>
+ <module>mod-3</module>
+ </modules>
+
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ </properties>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-site-plugin</artifactId>
+ <version>2.0-beta-7</version>
+ </plugin>
+ </plugins>
+ </build>
+
+ <reporting>
+ <plugins>
+ <plugin>
+ <artifactId>maven-project-info-reports-plugin</artifactId>
+ <version>2.0.1</version>
+ <reportSets>
+ <reportSet>
+ <reports>
+ <report>index</report>
+ </reports>
+ </reportSet>
+ </reportSets>
+ </plugin>
+ <plugin>
+ <artifactId>maven-pmd-plugin</artifactId>
+ <version>@project.version@</version>
+ </plugin>
+ </plugins>
+ </reporting>
+</project>
Propchange: maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/pom.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/verify.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/verify.bsh?rev=729684&view=auto
==============================================================================
--- maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/verify.bsh (added)
+++ maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/verify.bsh Sat Dec 27 14:04:25 2008
@@ -0,0 +1,50 @@
+import java.io.*;
+import java.util.*;
+
+String[] expectedPaths =
+{
+ "mod-1/target/site/pmd.html",
+ "mod-1/target/site/pmd.xml",
+ "mod-1/target/site/cpd.html",
+ "mod-1/target/site/cpd.xml",
+ "mod-2/target/site/pmd.html",
+ "mod-2/target/site/pmd.xml",
+ "mod-2/target/site/cpd.html",
+ "mod-2/target/site/cpd.xml",
+ "mod-3/target/site/pmd.html",
+ "mod-3/target/site/pmd.xml",
+ "mod-3/target/site/cpd.html",
+ "mod-3/target/site/cpd.xml",
+};
+
+for ( String path : expectedPaths )
+{
+ File file = new File( basedir, path );
+ System.out.println( "Checking for existence of " + file );
+ if ( !file.isFile() )
+ {
+ throw new FileNotFoundException( "Missing: " + file.getAbsolutePath() );
+ }
+}
+
+String[] unexpectedPaths =
+{
+ "target/site/pmd.html",
+ "target/site/pmd.xml",
+ "target/site/cpd.html",
+ "target/site/cpd.xml",
+ "target/pmd.xml",
+ "target/cpd.xml",
+};
+
+for ( String path : unexpectedPaths )
+{
+ File file = new File( basedir, path );
+ System.out.println( "Checking for absence of " + file );
+ if ( file.exists() )
+ {
+ throw new IOException( "Banned: " + file.getAbsolutePath() );
+ }
+}
+
+return true;
Propchange: maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/verify.bsh
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/verify.bsh
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: maven/plugins/trunk/maven-pmd-plugin/src/it/settings.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-pmd-plugin/src/it/settings.xml?rev=729684&view=auto
==============================================================================
--- maven/plugins/trunk/maven-pmd-plugin/src/it/settings.xml (added)
+++ maven/plugins/trunk/maven-pmd-plugin/src/it/settings.xml Sat Dec 27 14:04:25 2008
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+
+<settings>
+ <profiles>
+ <profile>
+ <id>it-repo</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+ <repositories>
+ <repository>
+ <id>local.central</id>
+ <url>@localRepositoryUrl@</url>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ </repository>
+ <repository>
+ <id>apache.snapshots</id>
+ <name>Apache Snapshot Repository</name>
+ <url>http://people.apache.org/repo/m2-snapshot-repository</url>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ </repository>
+ </repositories>
+ <pluginRepositories>
+ <pluginRepository>
+ <id>local.central</id>
+ <url>@localRepositoryUrl@</url>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ </pluginRepository>
+ </pluginRepositories>
+ </profile>
+ </profiles>
+</settings>
Propchange: maven/plugins/trunk/maven-pmd-plugin/src/it/settings.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-pmd-plugin/src/it/settings.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Modified: maven/plugins/trunk/maven-pmd-plugin/src/main/java/org/apache/maven/plugin/pmd/AbstractPmdReport.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-pmd-plugin/src/main/java/org/apache/maven/plugin/pmd/AbstractPmdReport.java?rev=729684&r1=729683&r2=729684&view=diff
==============================================================================
--- maven/plugins/trunk/maven-pmd-plugin/src/main/java/org/apache/maven/plugin/pmd/AbstractPmdReport.java (original)
+++ maven/plugins/trunk/maven-pmd-plugin/src/main/java/org/apache/maven/plugin/pmd/AbstractPmdReport.java Sat Dec 27 14:04:25 2008
@@ -389,6 +389,11 @@
return false;
}
+ if ( "pom".equals( project.getPackaging() ) && !aggregate )
+ {
+ return false;
+ }
+
// if format is XML, we need to output it even if the file list is empty
// so the "check" goals can check for failures
if ( "xml".equals( format ) )