maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From denn...@apache.org
Subject svn commit: r1610932 - in /maven/plugins/trunk/maven-pmd-plugin: ./ src/it/MPMD-182/ src/it/MPMD-182/src/ src/it/MPMD-182/src/main/ src/it/MPMD-182/src/main/java/ src/main/java/org/apache/maven/plugin/pmd/ src/test/java/org/apache/maven/plugin/pmd/
Date Wed, 16 Jul 2014 08:22:56 GMT
Author: dennisl
Date: Wed Jul 16 08:22:56 2014
New Revision: 1610932

URL: http://svn.apache.org/r1610932
Log:
[MPMD-182] Upgrade to PMD 5.1.1

Added:
    maven/plugins/trunk/maven-pmd-plugin/src/it/MPMD-182/
    maven/plugins/trunk/maven-pmd-plugin/src/it/MPMD-182/invoker.properties   (with props)
    maven/plugins/trunk/maven-pmd-plugin/src/it/MPMD-182/pom.xml   (with props)
    maven/plugins/trunk/maven-pmd-plugin/src/it/MPMD-182/src/
    maven/plugins/trunk/maven-pmd-plugin/src/it/MPMD-182/src/main/
    maven/plugins/trunk/maven-pmd-plugin/src/it/MPMD-182/src/main/java/
    maven/plugins/trunk/maven-pmd-plugin/src/it/MPMD-182/src/main/java/RunnableTest.java 
 (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/CpdReport.java
    maven/plugins/trunk/maven-pmd-plugin/src/test/java/org/apache/maven/plugin/pmd/CpdReportTest.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=1610932&r1=1610931&r2=1610932&view=diff
==============================================================================
--- maven/plugins/trunk/maven-pmd-plugin/pom.xml (original)
+++ maven/plugins/trunk/maven-pmd-plugin/pom.xml Wed Jul 16 08:22:56 2014
@@ -82,7 +82,7 @@ under the License.
   <properties>
     <mavenVersion>2.2.1</mavenVersion>
     <doxiaVersion>1.4</doxiaVersion>
-    <pmdVersion>5.0.5</pmdVersion>
+    <pmdVersion>5.1.1</pmdVersion>
     <sitePluginVersion>3.3</sitePluginVersion>
     <mavenPluginVersion>3.2</mavenPluginVersion>
     <projectInfoReportsPluginVersion>2.7</projectInfoReportsPluginVersion>

Added: maven/plugins/trunk/maven-pmd-plugin/src/it/MPMD-182/invoker.properties
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-pmd-plugin/src/it/MPMD-182/invoker.properties?rev=1610932&view=auto
==============================================================================
--- maven/plugins/trunk/maven-pmd-plugin/src/it/MPMD-182/invoker.properties (added)
+++ maven/plugins/trunk/maven-pmd-plugin/src/it/MPMD-182/invoker.properties Wed Jul 16 08:22:56
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 verify pmd:pmd
+invoker.java.version = 1.8+

Propchange: maven/plugins/trunk/maven-pmd-plugin/src/it/MPMD-182/invoker.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-pmd-plugin/src/it/MPMD-182/invoker.properties
------------------------------------------------------------------------------
    svn:keywords = Date Revision Author Id

Added: maven/plugins/trunk/maven-pmd-plugin/src/it/MPMD-182/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-pmd-plugin/src/it/MPMD-182/pom.xml?rev=1610932&view=auto
==============================================================================
--- maven/plugins/trunk/maven-pmd-plugin/src/it/MPMD-182/pom.xml (added)
+++ maven/plugins/trunk/maven-pmd-plugin/src/it/MPMD-182/pom.xml Wed Jul 16 08:22:56 2014
@@ -0,0 +1,55 @@
+<?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.plugins.pmd.its</groupId>
+  <artifactId>MPMD-182</artifactId>
+  <version>1.0-SNAPSHOT</version>
+
+  <properties>
+    <javaVersion>1.8</javaVersion>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+  </properties>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <configuration>
+          <source>${javaVersion}</source>
+          <target>${javaVersion}</target>
+        </configuration>
+      </plugin>
+
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-pmd-plugin</artifactId>
+        <version>@project.version@</version>
+        <configuration>
+          <targetJdk>${javaVersion}</targetJdk>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>

Propchange: maven/plugins/trunk/maven-pmd-plugin/src/it/MPMD-182/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-pmd-plugin/src/it/MPMD-182/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision Author Id

Added: maven/plugins/trunk/maven-pmd-plugin/src/it/MPMD-182/src/main/java/RunnableTest.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-pmd-plugin/src/it/MPMD-182/src/main/java/RunnableTest.java?rev=1610932&view=auto
==============================================================================
--- maven/plugins/trunk/maven-pmd-plugin/src/it/MPMD-182/src/main/java/RunnableTest.java (added)
+++ maven/plugins/trunk/maven-pmd-plugin/src/it/MPMD-182/src/main/java/RunnableTest.java Wed
Jul 16 08:22:56 2014
@@ -0,0 +1,39 @@
+/*
+ * 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 RunnableTest {
+  public static void main(String[] args) {
+    System.out.println("=== RunnableTest ===");
+    
+    // Anonymous Runnable
+    Runnable r1 = new Runnable(){
+      @Override
+      public void run(){
+        System.out.println("Hello world one!");
+      }
+    };
+    
+    // Lambda Runnable
+    Runnable r2 = () -> System.out.println("Hello world two!");
+    
+    // Run em!
+    r1.run();
+    r2.run();
+  }
+}

Propchange: maven/plugins/trunk/maven-pmd-plugin/src/it/MPMD-182/src/main/java/RunnableTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-pmd-plugin/src/it/MPMD-182/src/main/java/RunnableTest.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision Author Id

Modified: maven/plugins/trunk/maven-pmd-plugin/src/main/java/org/apache/maven/plugin/pmd/CpdReport.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-pmd-plugin/src/main/java/org/apache/maven/plugin/pmd/CpdReport.java?rev=1610932&r1=1610931&r2=1610932&view=diff
==============================================================================
--- maven/plugins/trunk/maven-pmd-plugin/src/main/java/org/apache/maven/plugin/pmd/CpdReport.java
(original)
+++ maven/plugins/trunk/maven-pmd-plugin/src/main/java/org/apache/maven/plugin/pmd/CpdReport.java
Wed Jul 16 08:22:56 2014
@@ -223,7 +223,11 @@ public class CpdReport
 
             String encoding = determineEncoding( !filesToProcess.isEmpty() );
 
-            CPDConfiguration cpdConfiguration = new CPDConfiguration( minimumTokens, new
JavaLanguage( p ), encoding );
+            CPDConfiguration cpdConfiguration = new CPDConfiguration();
+            cpdConfiguration.setMinimumTileSize( minimumTokens );
+            cpdConfiguration.setLanguage( new JavaLanguage( p ) );
+            cpdConfiguration.setEncoding( encoding );
+
             cpd = new CPD( cpdConfiguration );
 
             for ( File file : filesToProcess.keySet() )

Modified: maven/plugins/trunk/maven-pmd-plugin/src/test/java/org/apache/maven/plugin/pmd/CpdReportTest.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-pmd-plugin/src/test/java/org/apache/maven/plugin/pmd/CpdReportTest.java?rev=1610932&r1=1610931&r2=1610932&view=diff
==============================================================================
--- maven/plugins/trunk/maven-pmd-plugin/src/test/java/org/apache/maven/plugin/pmd/CpdReportTest.java
(original)
+++ maven/plugins/trunk/maven-pmd-plugin/src/test/java/org/apache/maven/plugin/pmd/CpdReportTest.java
Wed Jul 16 08:22:56 2014
@@ -195,7 +195,10 @@ public class CpdReportTest
         tMatch.setSourceCodeSlice( "// ----- ACCESSEURS  avec �l�ments -----" );
         tList.add( tMatch );
 
-        CPDConfiguration cpdConfiguration = new CPDConfiguration( 100, new JavaLanguage(),
"UTF-8" );
+        CPDConfiguration cpdConfiguration = new CPDConfiguration();
+        cpdConfiguration.setMinimumTileSize( 100 );
+        cpdConfiguration.setLanguage( new JavaLanguage() );
+        cpdConfiguration.setEncoding( "UTF-8" );
         CPD tCpd = new MockCpd( cpdConfiguration, tList.iterator() );
 
         tCpd.go();



Mime
View raw message