From 7e2a0790ff0405f55b32f995f228526965360e04 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sat, 14 Jan 2017 17:53:26 +0000 Subject: [PATCH 01/13] pom.xml: version set to 2.1.0-SNAPSHOT --- README.md | 2 +- builder/pom.xml | 2 +- builder/src/main/resources/README-template.md | 2 +- plugin-sample/pom.xml | 2 +- plugin/pom.xml | 2 +- .../kemitix/checkstyle/ruleset/plugin/AbstractCheckMojo.java | 2 +- pom.xml | 2 +- ruleset/pom.xml | 4 ++-- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 83b34f8..6b6028c 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ The following goals implement increasingly strict rulesets: ```` - 2.0.0 + 2.1.0 5-complexity diff --git a/builder/pom.xml b/builder/pom.xml index d67577c..6f91619 100644 --- a/builder/pom.xml +++ b/builder/pom.xml @@ -12,7 +12,7 @@ kemitix-checkstyle-ruleset-builder - 2.0.0 + 2.1.0-SNAPSHOT jar Kemitix Checkstyle Ruleset Builder diff --git a/builder/src/main/resources/README-template.md b/builder/src/main/resources/README-template.md index 489eaa5..58c64ac 100644 --- a/builder/src/main/resources/README-template.md +++ b/builder/src/main/resources/README-template.md @@ -35,7 +35,7 @@ The following goals implement increasingly strict rulesets: ```` - 2.0.0 + 2.1.0 5-complexity diff --git a/plugin-sample/pom.xml b/plugin-sample/pom.xml index ff67a52..1a47023 100644 --- a/plugin-sample/pom.xml +++ b/plugin-sample/pom.xml @@ -8,7 +8,7 @@ net.kemitix kemitix-checkstyle-ruleset-plugin-sample - 2.0.0 + 2.1.0-SNAPSHOT UTF-8 diff --git a/plugin/pom.xml b/plugin/pom.xml index 3144f37..880a333 100644 --- a/plugin/pom.xml +++ b/plugin/pom.xml @@ -7,7 +7,7 @@ net.kemitix kemitix-checkstyle-ruleset-parent - 2.0.0 + 2.1.0-SNAPSHOT kemitix-checkstyle-ruleset-maven-plugin diff --git a/plugin/src/main/java/net/kemitix/checkstyle/ruleset/plugin/AbstractCheckMojo.java b/plugin/src/main/java/net/kemitix/checkstyle/ruleset/plugin/AbstractCheckMojo.java index cda8265..06314cf 100644 --- a/plugin/src/main/java/net/kemitix/checkstyle/ruleset/plugin/AbstractCheckMojo.java +++ b/plugin/src/main/java/net/kemitix/checkstyle/ruleset/plugin/AbstractCheckMojo.java @@ -74,7 +74,7 @@ public abstract class AbstractCheckMojo extends AbstractMojo { private String sevntuVersion; @Setter - @Parameter(defaultValue = "2.0.0") + @Parameter(defaultValue = "2.1.0-SNAPSHOT") private String rulesetVersion; @Setter diff --git a/pom.xml b/pom.xml index 55f63be..6671efc 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ net.kemitix kemitix-checkstyle-ruleset-parent - 2.0.0 + 2.1.0-SNAPSHOT pom Kemitix Checkstyle Ruleset (Parent) diff --git a/ruleset/pom.xml b/ruleset/pom.xml index f4a6200..b5bef66 100644 --- a/ruleset/pom.xml +++ b/ruleset/pom.xml @@ -7,11 +7,11 @@ net.kemitix kemitix-checkstyle-ruleset-parent - 2.0.0 + 2.1.0-SNAPSHOT kemitix-checkstyle-ruleset - 2.0.0 + 2.1.0-SNAPSHOT jar Kemitix Checkstyle Ruleset From e4b4be18a02adea5f6e7f2fa77f90e9641d98a87 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sun, 15 Jan 2017 11:20:30 +0000 Subject: [PATCH 02/13] Add release profile for release-only plugins --- plugin-sample/pom.xml | 117 +++++++++++++++++++++++------------------- plugin/pom.xml | 117 +++++++++++++++++++++++------------------- pom.xml | 87 +++++++++++++++++++++++-------- 3 files changed, 192 insertions(+), 129 deletions(-) diff --git a/plugin-sample/pom.xml b/plugin-sample/pom.xml index 0a3816e..bb47109 100644 --- a/plugin-sample/pom.xml +++ b/plugin-sample/pom.xml @@ -57,62 +57,71 @@ - - - org.apache.maven.plugins - maven-javadoc-plugin - ${maven-javadoc-plugin.version} - - - attach-javadocs - verify - - jar - - - - - - - org.apache.maven.plugins - maven-source-plugin - ${maven-source-plugin.version} - - - attach-sources - verify - - jar-no-fork - - - - - - - org.apache.maven.plugins - maven-gpg-plugin - ${maven-gpg-plugin.version} - - ${gpg.passphrase} - - - - sign-artifacts - verify - - sign - - - - - - - org.apache.maven.plugins - maven-deploy-plugin - ${maven-deploy-plugin.version} - + + + release + + + + + org.apache.maven.plugins + maven-javadoc-plugin + ${maven-javadoc-plugin.version} + + + attach-javadocs + verify + + jar + + + + + + + org.apache.maven.plugins + maven-source-plugin + ${maven-source-plugin.version} + + + attach-sources + verify + + jar-no-fork + + + + + + + org.apache.maven.plugins + maven-gpg-plugin + ${maven-gpg-plugin.version} + + ${gpg.passphrase} + + + + sign-artifacts + verify + + sign + + + + + + + org.apache.maven.plugins + maven-deploy-plugin + ${maven-deploy-plugin.version} + + + + + diff --git a/plugin/pom.xml b/plugin/pom.xml index fc199ab..eb53577 100644 --- a/plugin/pom.xml +++ b/plugin/pom.xml @@ -96,62 +96,71 @@ 1.8 - - - org.apache.maven.plugins - maven-javadoc-plugin - ${maven-javadoc-plugin.version} - - - attach-javadocs - verify - - jar - - - - - - - org.apache.maven.plugins - maven-source-plugin - ${maven-source-plugin.version} - - - attach-sources - verify - - jar-no-fork - - - - - - - org.apache.maven.plugins - maven-gpg-plugin - ${maven-gpg-plugin.version} - - ${gpg.passphrase} - - - - sign-artifacts - verify - - sign - - - - - - - org.apache.maven.plugins - maven-deploy-plugin - ${maven-deploy-plugin.version} - + + + release + + + + + org.apache.maven.plugins + maven-javadoc-plugin + ${maven-javadoc-plugin.version} + + + attach-javadocs + verify + + jar + + + + + + + org.apache.maven.plugins + maven-source-plugin + ${maven-source-plugin.version} + + + attach-sources + verify + + jar-no-fork + + + + + + + org.apache.maven.plugins + maven-gpg-plugin + ${maven-gpg-plugin.version} + + ${gpg.passphrase} + + + + sign-artifacts + verify + + sign + + + + + + + org.apache.maven.plugins + maven-deploy-plugin + ${maven-deploy-plugin.version} + + + + + sevntu-maven diff --git a/pom.xml b/pom.xml index d4d4b2f..de86821 100644 --- a/pom.xml +++ b/pom.xml @@ -15,7 +15,10 @@ UTF-8 UTF-8 + 2.10.4 + 3.0.1 1.6 + 2.8.2 @@ -60,27 +63,69 @@ - - - - org.apache.maven.plugins - maven-gpg-plugin - ${maven-gpg-plugin.version} - - ${gpg.passphrase} - - - - sign-artifacts - verify - - sign - - - - - - + + + release + + + + + org.apache.maven.plugins + maven-javadoc-plugin + ${maven-javadoc-plugin.version} + + + attach-javadocs + verify + + jar + + + + + + + org.apache.maven.plugins + maven-source-plugin + ${maven-source-plugin.version} + + + attach-sources + verify + + jar-no-fork + + + + + + + org.apache.maven.plugins + maven-gpg-plugin + ${maven-gpg-plugin.version} + + ${gpg.passphrase} + + + + sign-artifacts + verify + + sign + + + + + + + org.apache.maven.plugins + maven-deploy-plugin + ${maven-deploy-plugin.version} + + + + + From 8c0f721a42846e80a91c83bdebafd464e7d2c962 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sun, 15 Jan 2017 14:24:12 +0000 Subject: [PATCH 03/13] plugin-sample:pom.xml: fix name of plugin --- plugin-sample/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin-sample/pom.xml b/plugin-sample/pom.xml index bb47109..41e6d6d 100644 --- a/plugin-sample/pom.xml +++ b/plugin-sample/pom.xml @@ -10,7 +10,7 @@ kemitix-checkstyle-ruleset-plugin-sample 2.1.0-SNAPSHOT - plugin-sample + Kemitix Checkstyle Ruleset Plugin Sample Sample usage of the Kemitix Checkstyle Ruleset Plugin https://github.com/kemitix/kemitix-checkstyle-ruleset From f01098170bfb6cebd66a57566ba62d17c7715cd8 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sun, 15 Jan 2017 14:25:04 +0000 Subject: [PATCH 04/13] plugin:AbstractCheckMojo: upgrade checkstyle to 7.4 --- .../kemitix/checkstyle/ruleset/plugin/AbstractCheckMojo.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/src/main/java/net/kemitix/checkstyle/ruleset/plugin/AbstractCheckMojo.java b/plugin/src/main/java/net/kemitix/checkstyle/ruleset/plugin/AbstractCheckMojo.java index 06314cf..fabc414 100644 --- a/plugin/src/main/java/net/kemitix/checkstyle/ruleset/plugin/AbstractCheckMojo.java +++ b/plugin/src/main/java/net/kemitix/checkstyle/ruleset/plugin/AbstractCheckMojo.java @@ -66,7 +66,7 @@ public abstract class AbstractCheckMojo extends AbstractMojo { private String mavenCheckstylePluginVersion; @Setter - @Parameter(defaultValue = "7.3") + @Parameter(defaultValue = "7.4") private String checkstyleVersion; @Setter From 4fdcae8d12f728d2ceff41aa34d4b9317424adfb Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Wed, 8 Feb 2017 09:48:06 +0000 Subject: [PATCH 05/13] plugin-sample:Sample: add note clarifying ruleset level compliance The class is meant to fail at higher levels. --- .../src/main/java/net/kemitix/checkstyle/sample/Sample.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugin-sample/src/main/java/net/kemitix/checkstyle/sample/Sample.java b/plugin-sample/src/main/java/net/kemitix/checkstyle/sample/Sample.java index 9f7eaba..55b178e 100644 --- a/plugin-sample/src/main/java/net/kemitix/checkstyle/sample/Sample.java +++ b/plugin-sample/src/main/java/net/kemitix/checkstyle/sample/Sample.java @@ -27,6 +27,9 @@ package net.kemitix.checkstyle.sample; /** * Sample class to test the Kemitix Checkstyle Ruleset Maven Plugin against. * + *

This sample is deliberately only valid for level 1-layout and 2-naming. The plugin should report errors for levels + * 3-javadoc and above.

+ * * @author Paul Campbell (paul.campbell@hubio.com) */ public class Sample { From d54ae55f0a57ab793d811c7fdad7fedc556392bd Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Wed, 8 Feb 2017 09:49:01 +0000 Subject: [PATCH 06/13] plugin:AbstractCheckMojo: upgrade checkstyle to 7.5.1 http://checkstyle.sourceforge.net/releasenotes.html#Release_7.5.1 Bug fixes: * PackageObjectFactory hides real exception. Author: rnveach #3778 * RightCurly: handling of try-with-resources on several lines with CS 7.5. Author: rnveach, Roman Ivanov #3776 Notes: * Add the Hibernate Search project to the Checkstyle CI. Author: Roman Ivanov #3790 --- .../kemitix/checkstyle/ruleset/plugin/AbstractCheckMojo.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/src/main/java/net/kemitix/checkstyle/ruleset/plugin/AbstractCheckMojo.java b/plugin/src/main/java/net/kemitix/checkstyle/ruleset/plugin/AbstractCheckMojo.java index fabc414..27d57e0 100644 --- a/plugin/src/main/java/net/kemitix/checkstyle/ruleset/plugin/AbstractCheckMojo.java +++ b/plugin/src/main/java/net/kemitix/checkstyle/ruleset/plugin/AbstractCheckMojo.java @@ -66,7 +66,7 @@ public abstract class AbstractCheckMojo extends AbstractMojo { private String mavenCheckstylePluginVersion; @Setter - @Parameter(defaultValue = "7.4") + @Parameter(defaultValue = "7.5.1") private String checkstyleVersion; @Setter From 87f74dec16b3397b650d1d38e4576d5706cf47f2 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Wed, 8 Feb 2017 09:49:28 +0000 Subject: [PATCH 07/13] plugin:AbstractCheckMojo: use ruleset version from pom.xml --- .../kemitix/checkstyle/ruleset/plugin/AbstractCheckMojo.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/src/main/java/net/kemitix/checkstyle/ruleset/plugin/AbstractCheckMojo.java b/plugin/src/main/java/net/kemitix/checkstyle/ruleset/plugin/AbstractCheckMojo.java index 27d57e0..2ea025e 100644 --- a/plugin/src/main/java/net/kemitix/checkstyle/ruleset/plugin/AbstractCheckMojo.java +++ b/plugin/src/main/java/net/kemitix/checkstyle/ruleset/plugin/AbstractCheckMojo.java @@ -74,7 +74,7 @@ public abstract class AbstractCheckMojo extends AbstractMojo { private String sevntuVersion; @Setter - @Parameter(defaultValue = "2.1.0-SNAPSHOT") + @Parameter(defaultValue = "${project.version}") private String rulesetVersion; @Setter From e951d2c99bc2692759d138367e0f54434d8b49cb Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Wed, 8 Feb 2017 09:55:29 +0000 Subject: [PATCH 08/13] plugin:AbstractCheckMojo: include ruleset version on log line --- .../kemitix/checkstyle/ruleset/plugin/AbstractCheckMojo.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugin/src/main/java/net/kemitix/checkstyle/ruleset/plugin/AbstractCheckMojo.java b/plugin/src/main/java/net/kemitix/checkstyle/ruleset/plugin/AbstractCheckMojo.java index 2ea025e..235d04c 100644 --- a/plugin/src/main/java/net/kemitix/checkstyle/ruleset/plugin/AbstractCheckMojo.java +++ b/plugin/src/main/java/net/kemitix/checkstyle/ruleset/plugin/AbstractCheckMojo.java @@ -107,8 +107,9 @@ public abstract class AbstractCheckMojo extends AbstractMojo { val configLocation = MojoExecutor.element(CONFIG_LOCATION, String.format("net/kemitix/checkstyle-%s.xml", level)); - getLog().info( - String.format("Running Checkstyle %s (sevntu: %s) with %s", checkstyleVersion, sevntuVersion, level)); + getLog().info(String.format("Running Checkstyle %s (sevntu: %s) with ruleset %s (%s)", checkstyleVersion, + sevntuVersion, level, rulesetVersion + )); MojoExecutor.executeMojo(checkstylePlugin, "check", MojoExecutor.configuration(configLocation), MojoExecutor.executionEnvironment(mavenProject, mavenSession, pluginManager) ); From ca01a08e81444e2a4e9f51c99e9133954d3284ef Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Wed, 8 Feb 2017 10:56:55 +0000 Subject: [PATCH 09/13] plugin:AbstractCheckMojo: load dependency versions from plugin pom.xml --- plugin/pom.xml | 33 +++++++++++++++++++ .../ruleset/plugin/AbstractCheckMojo.java | 18 ++++------ 2 files changed, 39 insertions(+), 12 deletions(-) diff --git a/plugin/pom.xml b/plugin/pom.xml index eb53577..c9fb04c 100644 --- a/plugin/pom.xml +++ b/plugin/pom.xml @@ -30,6 +30,11 @@ 2.2.0 1.16.12 1.0.0 + + 1.0.0 + 2.17 + 7.5.1 + 1.23.0
@@ -96,6 +101,34 @@ 1.8 + + org.codehaus.mojo + properties-maven-plugin + ${properties-maven-plugin.version} + + + + set-system-properties + + + + + maven-checkstyle-plugin.version + ${maven-checkstyle-plugin.version} + + + checkstyle.version + ${checkstyle.version} + + + sevntu.version + ${sevntu.version} + + + + + + diff --git a/plugin/src/main/java/net/kemitix/checkstyle/ruleset/plugin/AbstractCheckMojo.java b/plugin/src/main/java/net/kemitix/checkstyle/ruleset/plugin/AbstractCheckMojo.java index 235d04c..fbb72f1 100644 --- a/plugin/src/main/java/net/kemitix/checkstyle/ruleset/plugin/AbstractCheckMojo.java +++ b/plugin/src/main/java/net/kemitix/checkstyle/ruleset/plugin/AbstractCheckMojo.java @@ -61,18 +61,6 @@ public abstract class AbstractCheckMojo extends AbstractMojo { private static final String CONFIG_LOCATION = "configLocation"; - @Setter - @Parameter(defaultValue = "2.17") - private String mavenCheckstylePluginVersion; - - @Setter - @Parameter(defaultValue = "7.5.1") - private String checkstyleVersion; - - @Setter - @Parameter(defaultValue = "1.23.0") - private String sevntuVersion; - @Setter @Parameter(defaultValue = "${project.version}") private String rulesetVersion; @@ -97,6 +85,12 @@ public abstract class AbstractCheckMojo extends AbstractMojo { * @throws MojoFailureException on execution failure */ protected final void performCheck(final String level) throws MojoExecutionException, MojoFailureException { + // load versions from plugin's pom.xml + val properties = System.getProperties(); + val mavenCheckstylePluginVersion = properties.getProperty("maven-checkstyle-plugin.version"); + val checkstyleVersion = properties.getProperty("checkstyle.version"); + val sevntuVersion = properties.getProperty("sevntu.version"); + val checkstyle = MojoExecutor.dependency(CHECKSTYLE_GROUPID, CHECKSTYLE_ARTIFACTID, checkstyleVersion); val sevntu = MojoExecutor.dependency(SEVNTU_GROUPID, SEVNTU_ARTIFACTID, sevntuVersion); val ruleset = MojoExecutor.dependency(KEMITIX_GROUPID, KEMITIX_ARTIFACTID, rulesetVersion); From 5fc556aaf253c9fd2c560d2bf046a2513184b464 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Wed, 8 Feb 2017 11:29:48 +0000 Subject: [PATCH 10/13] builder:pom.xml: upgrade dependencies * spring-boot 1.5.1 * assertj 3.6.2 * mapstream 2.3.5 --- builder/pom.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/builder/pom.xml b/builder/pom.xml index 6f91619..23ebbf5 100644 --- a/builder/pom.xml +++ b/builder/pom.xml @@ -37,10 +37,10 @@ 1.8 UTF-8 UTF-8 - 1.4.3.RELEASE + 1.5.1.RELEASE 1.16.12 - 3.6.1 - 2.3.4 + 3.6.2 + 2.3.5 1.0.0 4.3.0 From 9170a36684438821d4a71573f8849c3e97df4bb0 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Wed, 8 Feb 2017 11:31:44 +0000 Subject: [PATCH 11/13] plugin:pom.xml: upgrade dependencies * maven-compiler-plugin 3.6.1 --- plugin/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/pom.xml b/plugin/pom.xml index c9fb04c..293a9a8 100644 --- a/plugin/pom.xml +++ b/plugin/pom.xml @@ -20,7 +20,7 @@ UTF-8 UTF-8 3.3.9 - 3.6.0 + 3.6.1 3.5 3.5 2.10.4 From 961eb2c1dbe227ede8d380ef061706373052afe7 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Wed, 8 Feb 2017 12:26:55 +0000 Subject: [PATCH 12/13] pom.xml: version set to 2.1.0 --- builder/pom.xml | 2 +- plugin-sample/pom.xml | 2 +- plugin/pom.xml | 2 +- pom.xml | 2 +- ruleset/pom.xml | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/builder/pom.xml b/builder/pom.xml index 23ebbf5..2e3fd39 100644 --- a/builder/pom.xml +++ b/builder/pom.xml @@ -12,7 +12,7 @@ kemitix-checkstyle-ruleset-builder - 2.1.0-SNAPSHOT + 2.1.0 jar Kemitix Checkstyle Ruleset Builder diff --git a/plugin-sample/pom.xml b/plugin-sample/pom.xml index 41e6d6d..e8b07bd 100644 --- a/plugin-sample/pom.xml +++ b/plugin-sample/pom.xml @@ -8,7 +8,7 @@ net.kemitix kemitix-checkstyle-ruleset-plugin-sample - 2.1.0-SNAPSHOT + 2.1.0 Kemitix Checkstyle Ruleset Plugin Sample Sample usage of the Kemitix Checkstyle Ruleset Plugin diff --git a/plugin/pom.xml b/plugin/pom.xml index 293a9a8..e88bef1 100644 --- a/plugin/pom.xml +++ b/plugin/pom.xml @@ -7,7 +7,7 @@ net.kemitix kemitix-checkstyle-ruleset-parent - 2.1.0-SNAPSHOT + 2.1.0 kemitix-checkstyle-ruleset-maven-plugin diff --git a/pom.xml b/pom.xml index de86821..aef2d05 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ net.kemitix kemitix-checkstyle-ruleset-parent - 2.1.0-SNAPSHOT + 2.1.0 pom Kemitix Checkstyle Ruleset (Parent) diff --git a/ruleset/pom.xml b/ruleset/pom.xml index b293370..869cdba 100644 --- a/ruleset/pom.xml +++ b/ruleset/pom.xml @@ -7,11 +7,11 @@ net.kemitix kemitix-checkstyle-ruleset-parent - 2.1.0-SNAPSHOT + 2.1.0 kemitix-checkstyle-ruleset - 2.1.0-SNAPSHOT + 2.1.0 jar Kemitix Checkstyle Ruleset From e7bf2435a7c1d6fc41aa91e5c914ab0ce32dff9a Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Wed, 8 Feb 2017 12:27:38 +0000 Subject: [PATCH 13/13] CHANGELOG --- CHANGELOG | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index 6d53a2a..4b7a42a 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,11 @@ CHANGELOG ========= +2.1.0 +----- + +* Upgrade dependencies, including checkstyle to 7.5.1 + 2.0.3 -----