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);