You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mina.apache.org by lg...@apache.org on 2018/04/18 14:03:14 UTC
mina-sshd git commit: Upgraded PMD to 6.2.0
Repository: mina-sshd
Updated Branches:
refs/heads/master 3560fb921 -> f1a72670c
Upgraded PMD to 6.2.0
Project: http://git-wip-us.apache.org/repos/asf/mina-sshd/repo
Commit: http://git-wip-us.apache.org/repos/asf/mina-sshd/commit/f1a72670
Tree: http://git-wip-us.apache.org/repos/asf/mina-sshd/tree/f1a72670
Diff: http://git-wip-us.apache.org/repos/asf/mina-sshd/diff/f1a72670
Branch: refs/heads/master
Commit: f1a72670c33b200bfa36cf08a27e60b4faaac9e1
Parents: 3560fb9
Author: Lyor Goldstein <ly...@gmail.com>
Authored: Wed Apr 18 17:06:19 2018 +0300
Committer: Lyor Goldstein <ly...@gmail.com>
Committed: Wed Apr 18 17:06:38 2018 +0300
----------------------------------------------------------------------
pom.xml | 125 +++++++++++++++++++++++-----------------------
sshd-pmd-ruleset.xml | 10 +---
2 files changed, 64 insertions(+), 71 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/f1a72670/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 1537ff7..e3f9353 100644
--- a/pom.xml
+++ b/pom.xml
@@ -85,7 +85,7 @@
<!-- NOTE: actual value updated by groovy-maven-plugin on initialization phase -->
<!-- workspace.root.dir>${project.basedir}</workspace.root.dir -->
-
+
<java.major.version>1</java.major.version>
<java.minor.version>8</java.minor.version>
<sniffer.signatures.version>1.0</sniffer.signatures.version>
@@ -106,7 +106,7 @@
<groovy.minor.version>4</groovy.minor.version>
<groovy.release.version>15</groovy.release.version>
<groovy.compliance.level>2.0</groovy.compliance.level>
- <groovy.version>${groovy.major.version}.${groovy.minor.version}.${groovy.release.version}</groovy.version>
+ <groovy.version>${groovy.major.version}.${groovy.minor.version}.${groovy.release.version}</groovy.version>
<bouncycastle.version>1.59</bouncycastle.version>
<slf4j.version>1.7.25</slf4j.version>
@@ -115,7 +115,7 @@
<junit.version>4.12</junit.version>
<surefire.plugin.version>2.20.1</surefire.plugin.version>
<!-- See https://pmd.github.io/ for available latest version -->
- <pmd.version>5.6.1</pmd.version>
+ <pmd.version>6.2.0</pmd.version>
</properties>
<profiles>
@@ -149,7 +149,7 @@
</goals>
</execution>
</executions>
- </plugin>
+ </plugin>
</plugins>
</build>
</profile>
@@ -183,7 +183,7 @@
</build>
</profile>
</profiles>
-
+
<dependencyManagement>
<dependencies>
<dependency>
@@ -201,7 +201,7 @@
<artifactId>tomcat-apr</artifactId>
<version>5.5.23</version>
</dependency>
-
+
<dependency>
<groupId>net.i2p.crypto</groupId>
<artifactId>eddsa</artifactId>
@@ -223,7 +223,7 @@
<artifactId>bcprov-jdk15on</artifactId>
<version>${bouncycastle.version}</version>
</dependency>
-
+
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
@@ -367,7 +367,7 @@
<build>
<pluginManagement>
<plugins>
- <!--This plugin's configuration is used to store Eclipse
+ <!--This plugin's configuration is used to store Eclipse
m2e settings only and overcome integration problems.
It has no influence on the Maven build itself. -->
<plugin>
@@ -563,7 +563,7 @@
<version>${junit.version}</version>
</dependency>
</dependencies>
- </plugin>
+ </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
@@ -588,7 +588,7 @@
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
- </exclusion>
+ </exclusion>
</exclusions>
</dependency>
<!-- Use same version as us -->
@@ -606,7 +606,7 @@
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>${slf4j.version}</version>
- </dependency>
+ </dependency>
</dependencies>
</plugin>
@@ -674,32 +674,33 @@
<artifactId>groovy-ant</artifactId>
<version>${groovy.version}</version>
</dependency>
- </dependencies>
+ </dependencies>
</plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-pmd-plugin</artifactId>
- <version>3.8</version>
- <configuration>
- <targetJdk>${javac.target}</targetJdk>
- <printFailingErrors>true</printFailingErrors>
- <skipPmdError>false</skipPmdError>
- <excludeRoots>
- <excludeRoot>target/generated-sources/java</excludeRoot>
- </excludeRoots>
- </configuration>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.pmd</groupId>
- <artifactId>pmd-core</artifactId>
- <version>${pmd.version}</version>
- </dependency>
- <dependency>
- <groupId>net.sourceforge.pmd</groupId>
- <artifactId>pmd-java</artifactId>
- <version>${pmd.version}</version>
- </dependency>
- </dependencies>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-pmd-plugin</artifactId>
+ <version>3.9.0</version>
+ <configuration>
+ <targetJdk>${javac.target}</targetJdk>
+ <printFailingErrors>true</printFailingErrors>
+ <skipPmdError>false</skipPmdError>
+ <analysisCache>true</analysisCache> <!-- enable incremental analysis -->
+ <excludeRoots>
+ <excludeRoot>target/generated-sources/java</excludeRoot>
+ </excludeRoots>
+ </configuration>
+ <dependencies>
+ <dependency>
+ <groupId>net.sourceforge.pmd</groupId>
+ <artifactId>pmd-core</artifactId>
+ <version>${pmd.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>net.sourceforge.pmd</groupId>
+ <artifactId>pmd-java</artifactId>
+ <version>${pmd.version}</version>
+ </dependency>
+ </dependencies>
</plugin>
</plugins>
</pluginManagement>
@@ -732,7 +733,7 @@
return
}
}
-
+
System.err.println("Failed to detect workspace root dir")
]]>
</source>
@@ -758,26 +759,26 @@
</execution>
</executions>
</plugin>
- <plugin>
- <!-- to disable - mvn [commands...] -Dpmd.skip -->
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-pmd-plugin</artifactId>
- <configuration>
- <rulesets>
+ <plugin>
+ <!-- to disable - mvn [commands...] -Dpmd.skip -->
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-pmd-plugin</artifactId>
+ <configuration>
+ <rulesets>
<ruleset>${workspace.root.dir}${file.separator}sshd-pmd-ruleset.xml</ruleset>
- </rulesets>
+ </rulesets>
<includeTests>true</includeTests>
- </configuration>
- <executions>
- <execution>
- <id>pmd-checker</id>
- <!-- Note: phase must be AFTER detection of workspace root dir -->
+ </configuration>
+ <executions>
+ <execution>
+ <id>pmd-checker</id>
+ <!-- Note: phase must be AFTER detection of workspace root dir -->
<phase>process-test-classes</phase>
- <goals>
- <goal>check</goal>
- </goals>
- </execution>
- </executions>
+ <goals>
+ <goal>check</goal>
+ </goals>
+ </execution>
+ </executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
@@ -992,14 +993,14 @@
</repository>
</distributionManagement>
- <reporting>
- <plugins>
- <plugin> <!-- used by PMD to create a source XREF -->
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jxr-plugin</artifactId>
- <version>2.5</version>
- </plugin>
- </plugins>
+ <reporting>
+ <plugins>
+ <plugin> <!-- used by PMD to create a source XREF -->
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jxr-plugin</artifactId>
+ <version>2.5</version>
+ </plugin>
+ </plugins>
</reporting>
<modules>
http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/f1a72670/sshd-pmd-ruleset.xml
----------------------------------------------------------------------
diff --git a/sshd-pmd-ruleset.xml b/sshd-pmd-ruleset.xml
index 884aace..5b64ded 100644
--- a/sshd-pmd-ruleset.xml
+++ b/sshd-pmd-ruleset.xml
@@ -8,7 +8,7 @@
This ruleset defines the PMD rules for MINA SSHD project
</description>
- <!-- See https://pmd.github.io/pmd-5.6.1/pmd-java/rules/index.html -->
+ <!-- See https://pmd.github.io/pmd-6.2.0/pmd_rules_java.html -->
<rule ref="rulesets/java/basic.xml/AvoidMultipleUnaryOperators" />
<rule ref="rulesets/java/basic.xml/AvoidUsingOctalValues" />
<rule ref="rulesets/java/basic.xml/BooleanInstantiation" />
@@ -19,8 +19,6 @@
<rule ref="rulesets/java/basic.xml/ReturnFromFinallyBlock" />
<rule ref="rulesets/java/basic.xml/UnconditionalIfStatement" />
- <rule ref="rulesets/java/braces.xml" />
-
<rule ref="rulesets/java/clone.xml/ProperCloneImplementation" />
<rule ref="rulesets/java/clone.xml/CloneMethodMustImplementCloneable" />
@@ -29,12 +27,6 @@
<rule ref="rulesets/java/design.xml/UseNotifyAllInsteadOfNotify" />
- <rule ref="rulesets/java/empty.xml">
- <exclude name="EmptyCatchBlock" /> <!-- Enforced by checkstyle -->
- </rule>
-
- <rule ref="rulesets/java/finalizers.xml" />
-
<rule ref="rulesets/java/javabeans.xml/MissingSerialVersionUID" />
<rule ref="rulesets/java/logging-java.xml/AvoidPrintStackTrace" />