You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by th...@apache.org on 2019/12/29 06:08:02 UTC

[commons-dbutils] 02/09: Use checkstyle-plugin version from parent pom, and use latest checkstyle dependency Update junit, mockito to latest non-rc releases Correct checkstyle config based on updates

This is an automated email from the ASF dual-hosted git repository.

thecarlhall pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-dbutils.git

commit 8c8320cfecccea6a8fffd652496cf5078a0708f9
Author: Carl Hall <th...@apache.org>
AuthorDate: Fri Dec 27 16:41:07 2019 -0800

    Use checkstyle-plugin version from parent pom, and use latest checkstyle dependency
    Update junit, mockito to latest non-rc releases
    Correct checkstyle config based on updates
---
 checkstyle.xml | 15 ++++++++-------
 pom.xml        | 23 +++++++++++++----------
 2 files changed, 21 insertions(+), 17 deletions(-)

diff --git a/checkstyle.xml b/checkstyle.xml
index 0156ad8..d5c2748 100644
--- a/checkstyle.xml
+++ b/checkstyle.xml
@@ -22,9 +22,11 @@
   <!--
     Checkstyle checks configured for Maven.
   -->
-  
+
   <module name="Checker">
-  
+
+      <property name="cacheFile" value="${checkstyle.cache.file}"/>
+
       <!-- Checks that a package.html file exists for each package.     -->
       <!-- See http://checkstyle.sf.net/config_javadoc.html#PackageHtml -->
       <module name="JavadocPackage">
@@ -55,10 +57,12 @@
           <property name="message" value="Line has trailing spaces."/>
       </module>
 
+      <module name="LineLength">
+          <property name="max" value="132"/>
+      </module>
+
       <module name="TreeWalker">
   
-          <property name="cacheFile" value="${checkstyle.cache.file}"/>
-  
           <!-- ************************************************************** -->
           <!-- Checks that are different from the sun coding conventions ones -->
           <!-- ************************************************************** -->
@@ -69,9 +73,6 @@
           <module name="RightCurly">
             <property name="option" value="same"/>
           </module>
-          <module name="LineLength">
-            <property name="max" value="132"/>
-          </module>
           <module name="MethodLength">
             <property name="max" value="175"/>
           </module>
diff --git a/pom.xml b/pom.xml
index 6f64400..02e6407 100644
--- a/pom.xml
+++ b/pom.xml
@@ -208,13 +208,13 @@
     <dependency>
       <groupId>junit</groupId>
       <artifactId>junit</artifactId>
-      <version>4.11</version>
+      <version>4.12</version>
       <scope>test</scope>
     </dependency>
     <dependency>
       <groupId>org.mockito</groupId>
       <artifactId>mockito-core</artifactId>
-      <version>3.1.0</version>
+      <version>3.2.4</version>
       <scope>test</scope>
     </dependency>
     <dependency>
@@ -238,7 +238,7 @@
     <maven.compiler.source>1.7</maven.compiler.source>
     <maven.compiler.target>1.7</maven.compiler.target>
 
-    <checkstyle.plugin.version>2.17</checkstyle.plugin.version>
+    <checkstyle.version>8.27</checkstyle.version>
 
     <commons.componentid>dbutils</commons.componentid>
     <commons.module.name>org.apache.commons.dbutils</commons.module.name>
@@ -258,12 +258,20 @@
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-checkstyle-plugin</artifactId>
-          <version>${checkstyle.plugin.version}</version>
+          <version>${commons.checkstyle-plugin.version}</version>
           <configuration>
             <configLocation>${basedir}/checkstyle.xml</configLocation>
             <enableRulesSummary>false</enableRulesSummary>
             <headerLocation>${basedir}/license-header.txt</headerLocation>
+            <failOnViolation>false</failOnViolation>
           </configuration>
+          <dependencies>
+            <dependency>
+              <groupId>com.puppycrawl.tools</groupId>
+              <artifactId>checkstyle</artifactId>
+              <version>${checkstyle.version}</version>
+            </dependency>
+          </dependencies>
         </plugin>
       </plugins>
     </pluginManagement>
@@ -335,11 +343,6 @@
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-checkstyle-plugin</artifactId>
-        <configuration>
-          <configLocation>${basedir}/checkstyle.xml</configLocation>
-          <enableRulesSummary>false</enableRulesSummary>
-          <headerLocation>${basedir}/license-header.txt</headerLocation>
-        </configuration>
       </plugin>
       <plugin>
         <groupId>org.codehaus.mojo</groupId>
@@ -347,7 +350,7 @@
         <configuration>
           <threshold>Normal</threshold>
           <effort>Default</effort>
-       </configuration>
+        </configuration>
       </plugin>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>