Author: michaelo
Date: Sat Nov 29 23:16:33 2014
New Revision: 1642483
URL: http://svn.apache.org/r1642483
Log:
[MPMD-165] target/site/pmd.html created with invalid charset=${outputEncoding}
Contributed-by: Andreas Dangel
Added:
maven/plugins/trunk/maven-pmd-plugin/src/it/MPMD-165/
maven/plugins/trunk/maven-pmd-plugin/src/it/MPMD-165/invoker.properties
maven/plugins/trunk/maven-pmd-plugin/src/it/MPMD-165/pom.xml
maven/plugins/trunk/maven-pmd-plugin/src/it/MPMD-165/src/
maven/plugins/trunk/maven-pmd-plugin/src/it/MPMD-165/src/main/
maven/plugins/trunk/maven-pmd-plugin/src/it/MPMD-165/src/main/java/
maven/plugins/trunk/maven-pmd-plugin/src/it/MPMD-165/src/main/java/test/
maven/plugins/trunk/maven-pmd-plugin/src/it/MPMD-165/src/main/java/test/MyClass.java
maven/plugins/trunk/maven-pmd-plugin/src/it/MPMD-165/verify.groovy
Modified:
maven/plugins/trunk/maven-pmd-plugin/pom.xml
Modified: maven/plugins/trunk/maven-pmd-plugin/pom.xml
URL:
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-pmd-plugin/pom.xml?rev=1642483&r1=1642482&r2=1642483&view=diff
==============================================================================
--- maven/plugins/trunk/maven-pmd-plugin/pom.xml (original)
+++ maven/plugins/trunk/maven-pmd-plugin/pom.xml Sat Nov 29 23:16:33 2014
@@ -129,7 +129,7 @@ under the License.
<dependency>
<groupId>org.apache.maven.reporting</groupId>
<artifactId>maven-reporting-impl</artifactId>
- <version>2.2</version>
+ <version>2.3</version>
</dependency>
<!-- doxia -->
Added: maven/plugins/trunk/maven-pmd-plugin/src/it/MPMD-165/invoker.properties
URL:
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-pmd-plugin/src/it/MPMD-165/invoker.properties?rev=1642483&view=auto
==============================================================================
--- maven/plugins/trunk/maven-pmd-plugin/src/it/MPMD-165/invoker.properties
(added)
+++ maven/plugins/trunk/maven-pmd-plugin/src/it/MPMD-165/invoker.properties Sat
Nov 29 23:16:33 2014
@@ -0,0 +1,19 @@
+# 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.
+
+invoker.goals = clean pmd:pmd
+invoker.maven.version = 3+
Added: maven/plugins/trunk/maven-pmd-plugin/src/it/MPMD-165/pom.xml
URL:
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-pmd-plugin/src/it/MPMD-165/pom.xml?rev=1642483&view=auto
==============================================================================
--- maven/plugins/trunk/maven-pmd-plugin/src/it/MPMD-165/pom.xml (added)
+++ maven/plugins/trunk/maven-pmd-plugin/src/it/MPMD-165/pom.xml Sat Nov 29
23:16:33 2014
@@ -0,0 +1,48 @@
+<?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>
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.apache.maven.plugin.pmd.it</groupId>
+ <artifactId>MPMD-165</artifactId>
+ <version>1.0-SNAPSHOT</version>
+
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ <project.reporting.outputEncoding>UTF-16</project.reporting.outputEncoding>
+ </properties>
+
+ <dependencies>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>@project.groupId@</groupId>
+ <artifactId>@project.artifactId@</artifactId>
+ <version>@project.version@</version>
+ <configuration>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Added:
maven/plugins/trunk/maven-pmd-plugin/src/it/MPMD-165/src/main/java/test/MyClass.java
URL:
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-pmd-plugin/src/it/MPMD-165/src/main/java/test/MyClass.java?rev=1642483&view=auto
==============================================================================
---
maven/plugins/trunk/maven-pmd-plugin/src/it/MPMD-165/src/main/java/test/MyClass.java
(added)
+++
maven/plugins/trunk/maven-pmd-plugin/src/it/MPMD-165/src/main/java/test/MyClass.java
Sat Nov 29 23:16:33 2014
@@ -0,0 +1,30 @@
+package test;
+
+/*
+ * 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.
+ */
+
+public class MyClass
+{
+
+ public static void main( String[] args )
+ {
+ return;
+ }
+
+}
Added: maven/plugins/trunk/maven-pmd-plugin/src/it/MPMD-165/verify.groovy
URL:
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-pmd-plugin/src/it/MPMD-165/verify.groovy?rev=1642483&view=auto
==============================================================================
--- maven/plugins/trunk/maven-pmd-plugin/src/it/MPMD-165/verify.groovy (added)
+++ maven/plugins/trunk/maven-pmd-plugin/src/it/MPMD-165/verify.groovy Sat Nov
29 23:16:33 2014
@@ -0,0 +1,26 @@
+/*
+ * 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.
+ */
+
+File pmdHtml = new File( basedir, "target/site/pmd.html" );
+assert pmdHtml.exists()
+
+// Groovy's getText() automatically detects the correct encoding, so that
UTF-16 works out of the box
+// see also http://groovy.codehaus.org/api/groovy/util/CharsetToolkit.html
+def html = pmdHtml.text;
+assert html.contains( '<meta http-equiv="Content-Type" content="text/html;
charset=UTF-16" />' );