Author: hboutemy
Date: Tue Apr 20 21:51:51 2010
New Revision: 936074
URL: http://svn.apache.org/viewvc?rev=936074&view=rev
Log:
[MPMD-95] don't fail when format=none
Added:
maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-4/
maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-4/pom.xml
(with props)
maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-4/src/
maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-4/src/main/
maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-4/src/main/java/
maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-4/src/main/java/test/
maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-4/src/main/java/test/MyClass.java
(with props)
Modified:
maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/pom.xml
maven/plugins/trunk/maven-pmd-plugin/src/main/java/org/apache/maven/plugin/pmd/PmdReport.java
Added: maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-4/pom.xml
URL:
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-4/pom.xml?rev=936074&view=auto
==============================================================================
--- maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-4/pom.xml
(added)
+++ maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-4/pom.xml Tue
Apr 20 21:51:51 2010
@@ -0,0 +1,49 @@
+<?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-4</artifactId>
+
+ <name>Module 4</name>
+ <description>
+ Test proper report generation with format=none.
+ </description>
+
+ <reporting>
+ <plugins>
+ <plugin>
+ <artifactId>maven-pmd-plugin</artifactId>
+ <version>@project.version@</version>
+ <configuration>
+ <format>none</format>
+ </configuration>
+ </plugin>
+ </plugins>
+ </reporting>
+</project>
Propchange:
maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-4/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-4/pom.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added:
maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-4/src/main/java/test/MyClass.java
URL:
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-4/src/main/java/test/MyClass.java?rev=936074&view=auto
==============================================================================
---
maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-4/src/main/java/test/MyClass.java
(added)
+++
maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-4/src/main/java/test/MyClass.java
Tue Apr 20 21:51:51 2010
@@ -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-4/src/main/java/test/MyClass.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/mod-4/src/main/java/test/MyClass.java
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Modified: 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=936074&r1=936073&r2=936074&view=diff
==============================================================================
--- maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/pom.xml (original)
+++ maven/plugins/trunk/maven-pmd-plugin/src/it/multi-module/pom.xml Tue Apr 20
21:51:51 2010
@@ -36,6 +36,7 @@ under the License.
<module>mod-1</module>
<module>mod-2</module>
<module>mod-3</module>
+ <module>mod-4</module>
</modules>
<properties>
Modified:
maven/plugins/trunk/maven-pmd-plugin/src/main/java/org/apache/maven/plugin/pmd/PmdReport.java
URL:
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-pmd-plugin/src/main/java/org/apache/maven/plugin/pmd/PmdReport.java?rev=936074&r1=936073&r2=936074&view=diff
==============================================================================
---
maven/plugins/trunk/maven-pmd-plugin/src/main/java/org/apache/maven/plugin/pmd/PmdReport.java
(original)
+++
maven/plugins/trunk/maven-pmd-plugin/src/main/java/org/apache/maven/plugin/pmd/PmdReport.java
Tue Apr 20 21:51:51 2010
@@ -331,6 +331,11 @@ public class PmdReport
{
Renderer r = createRenderer();
+ if ( r == null )
+ {
+ return;
+ }
+
Writer writer = null;
try
@@ -457,11 +462,6 @@ public class PmdReport
}
}
- if ( renderer == null )
- {
- throw new MavenReportException( "Can't create report with format
of " + format );
- }
-
return renderer;
}