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 ----- 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 6a5676d..2e3fd39 100644 --- a/builder/pom.xml +++ b/builder/pom.xml @@ -12,7 +12,7 @@ kemitix-checkstyle-ruleset-builder - 2.0.4 + 2.1.0 jar Kemitix Checkstyle Ruleset Builder @@ -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 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 977e1a7..e8b07bd 100644 --- a/plugin-sample/pom.xml +++ b/plugin-sample/pom.xml @@ -8,9 +8,9 @@ net.kemitix kemitix-checkstyle-ruleset-plugin-sample - 2.0.4 + 2.1.0 - plugin-sample + Kemitix Checkstyle Ruleset Plugin Sample Sample usage of the Kemitix Checkstyle Ruleset Plugin https://github.com/kemitix/kemitix-checkstyle-ruleset @@ -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-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 { diff --git a/plugin/pom.xml b/plugin/pom.xml index f1d61ea..e88bef1 100644 --- a/plugin/pom.xml +++ b/plugin/pom.xml @@ -7,7 +7,7 @@ net.kemitix kemitix-checkstyle-ruleset-parent - 2.0.4 + 2.1.0 kemitix-checkstyle-ruleset-maven-plugin @@ -20,7 +20,7 @@ UTF-8 UTF-8 3.3.9 - 3.6.0 + 3.6.1 3.5 3.5 2.10.4 @@ -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,62 +101,99 @@ 1.8 - - org.apache.maven.plugins - maven-javadoc-plugin - ${maven-javadoc-plugin.version} + org.codehaus.mojo + properties-maven-plugin + ${properties-maven-plugin.version} - attach-javadocs - verify - jar + set-system-properties + + + + maven-checkstyle-plugin.version + ${maven-checkstyle-plugin.version} + + + checkstyle.version + ${checkstyle.version} + + + sevntu.version + ${sevntu.version} + + + - - - - 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/plugin/src/main/java/net/kemitix/checkstyle/ruleset/plugin/AbstractCheckMojo.java b/plugin/src/main/java/net/kemitix/checkstyle/ruleset/plugin/AbstractCheckMojo.java index de1580a..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 @@ -62,19 +62,7 @@ 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.3") - private String checkstyleVersion; - - @Setter - @Parameter(defaultValue = "1.23.0") - private String sevntuVersion; - - @Setter - @Parameter(defaultValue = "2.0.4") + @Parameter(defaultValue = "${project.version}") private String rulesetVersion; @Setter @@ -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); @@ -107,8 +101,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) ); diff --git a/pom.xml b/pom.xml index 90a9bc6..aef2d05 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ net.kemitix kemitix-checkstyle-ruleset-parent - 2.0.4 + 2.1.0 pom Kemitix Checkstyle Ruleset (Parent) @@ -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} + + + + + diff --git a/ruleset/pom.xml b/ruleset/pom.xml index 1c0ab59..869cdba 100644 --- a/ruleset/pom.xml +++ b/ruleset/pom.xml @@ -7,11 +7,11 @@ net.kemitix kemitix-checkstyle-ruleset-parent - 2.0.4 + 2.1.0 kemitix-checkstyle-ruleset - 2.0.4 + 2.1.0 jar Kemitix Checkstyle Ruleset @@ -87,4 +87,17 @@ + + + + sonatype-nexus-snapshots + Sonatype Nexus Snapshots + https://oss.sonatype.org/content/repositories/snapshots/ + + + sonatype-nexus-staging + Nexus Release Repository + https://oss.sonatype.org/service/local/staging/deploy/maven2/ + +