From a74f097844f817c6b68af4b8303c11f7e61e2335 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Thu, 9 Feb 2017 11:59:37 +0000 Subject: [PATCH 1/2] AbstractCheckMojo: use version of plugin not the using project ${project.version} resolves to the version of the project using the plugin, rather than the version of the plugin that is being used. --- .../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 ae39165..f09b608 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 @@ -71,8 +71,6 @@ abstract class AbstractCheckMojo extends AbstractMojo { private static final String CONFIG_LOCATION = "configLocation"; - @Setter - @Parameter(defaultValue = "${project.version}") private String rulesetVersion; @Setter @@ -98,6 +96,9 @@ abstract class AbstractCheckMojo extends AbstractMojo { * @throws MojoFailureException on execution failure */ final void performCheck(final String level) throws MojoExecutionException, MojoFailureException { + rulesetVersion = mavenProject.getPlugin(KEMITIX_GROUPID + ":" + KEMITIX_ARTIFACTID + "-maven-plugin") + .getVersion(); + debug("rulesetVersion: %s", rulesetVersion); val properties = getProperties(); debug("properties: %s", properties); From d8c1323093f33635e5b6838c161ae23f5bee0067 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Thu, 9 Feb 2017 12:01:01 +0000 Subject: [PATCH 2/2] CHANGELOG --- CHANGELOG | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index 4876cc4..2042707 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,11 @@ CHANGELOG ========= +2.1.2 +----- + +* Use the plugin version to find plugin's own pom + 2.1.1 -----