Repository: mojohaus/versions
Pull request #1098 (2024-06-22 10:18:22)

Get rid of usage of o.a.maven.repository.RepositorySystem


Patch:
diff --git a/versions-common/pom.xml b/versions-common/pom.xml
index 44c22ea7..09f16b45 100644
--- a/versions-common/pom.xml
+++ b/versions-common/pom.xml
@@ -122,6 +122,12 @@
       <artifactId>commons-io</artifactId>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <groupId>org.codehaus.mojo.versions</groupId>
+      <artifactId>versions-test</artifactId>
+      <version>${project.version}</version>
+      <scope>test</scope>
+    </dependency>
   </dependencies>
 
   <build>
diff --git a/versions-common/src/main/java/org/codehaus/mojo/versions/api/DefaultVersionsHelper.java b/versions-common/src/main/java/org/codehaus/mojo/versions/api/DefaultVersionsHelper.java
index 7d5c5094..c027c631 100644
--- a/versions-common/src/main/java/org/codehaus/mojo/versions/api/DefaultVersionsHelper.java
+++ b/versions-common/src/main/java/org/codehaus/mojo/versions/api/DefaultVersionsHelper.java
@@ -20,6 +20,7 @@ package org.codehaus.mojo.versions.api;
  */
 
 import java.io.BufferedInputStream;
+import java.io.File;
 import java.io.IOException;
 import java.net.URISyntaxException;
 import java.net.URL;
@@ -51,6 +52,8 @@ import org.apache.commons.lang3.tuple.ImmutablePair;
 import org.apache.commons.lang3.tuple.Pair;
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.artifact.ArtifactUtils;
+import org.apache.maven.artifact.DefaultArtifact;
+import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager;
 import org.apache.maven.artifact.resolver.ArtifactResolutionException;
 import org.apache.maven.artifact.versioning.ArtifactVersion;
 import org.apache.maven.artifact.versioning.InvalidVersionSpecificationException;
@@ -63,7 +66,6 @@ import org.apache.maven.plugin.MojoExecution;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.logging.Log;
 import org.apache.maven.project.MavenProject;
-import org.apache.maven.repository.RepositorySystem;
 import org.apache.maven.wagon.Wagon;
 import org.apache.maven.wagon.authentication.AuthenticationInfo;
 import org.apache.maven.wagon.observers.Debug;
@@ -75,7 +77,6 @@ import org.codehaus.mojo.versions.model.io.xpp3.RuleXpp3Reader;
 import org.codehaus.mojo.versions.ordering.VersionComparator;
 import org.codehaus.mojo.versions.ordering.VersionComparators;
 import org.codehaus.mojo.versions.utils.DefaultArtifactVersionCache;
-import org.codehaus.mojo.versions.utils.DependencyBuilder;
 import org.codehaus.mojo.versions.utils.DependencyComparator;
 import org.codehaus.mojo.versions.utils.PluginComparator;
 import org.codehaus.mojo.versions.utils.RegexUtils;
@@ -84,6 +85,7 @@ import org.codehaus.plexus.component.configurator.expression.ExpressionEvaluatio
 import org.codehaus.plexus.component.configurator.expression.ExpressionEvaluator;
 import org.codehaus.plexus.util.StringUtils;
 import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
+import org.eclipse.aether.RepositorySystem;
 import org.eclipse.aether.repository.AuthenticationContext;
 import org.eclipse.aether.repository.RemoteRepository;
 import org.eclipse.aether.repository.RepositoryPolicy;
@@ -122,9 +124,9 @@ public class DefaultVersionsHelper implements VersionsHelper {
      */
     private RuleSet ruleSet;
 
-    private final RepositorySystem repositorySystem;
+    private final ArtifactHandlerManager artifactHandlerManager;
 
-    private final org.eclipse.aether.RepositorySystem aetherRepositorySystem;
+    private final RepositorySystem repositorySystem;
 
     /**
      * The {@link Log} to send log messages to.
@@ -160,13 +162,13 @@ public class DefaultVersionsHelper implements VersionsHelper {
      * Private constructor used by the builder
      */
     private DefaultVersionsHelper(
+            ArtifactHandlerManager artifactHandlerManager,
             RepositorySystem repositorySystem,
-            org.eclipse.aether.RepositorySystem aetherRepositorySystem,
             MavenSession mavenSession,
             MojoExecution mojoExecution,
             Log log) {
+        this.artifactHandlerManager = artifactHandlerManager;
         this.repositorySystem = repositorySystem;
-        this.aetherRepositorySystem = aetherRepositorySystem;
         this.mavenSession = mavenSession;
         this.mojoExecution = mojoExecution;
         this.log = log;
@@ -276,7 +278,7 @@ public class DefaultVersionsHelper implements VersionsHelper {
 
             return new ArtifactVersions(
                     artifact,
-                    aetherRepositorySystem
+                    repositorySystem
                             .resolveVersionRange(
                                     mavenSession.getRepositorySession(),
                                     new VersionRangeRequest(
@@ -356,7 +358,7 @@ public class DefaultVersionsHelper implements VersionsHelper {
     @Override
     public void resolveArtifact(Artifact artifact, boolean usePluginRepositories) throws ArtifactResolutionException {
         try {
-            ArtifactResult artifactResult = aetherRepositorySystem.resolveArtifact(
+            ArtifactResult artifactResult = repositorySystem.resolveArtifact(
                     mavenSession.getRepositorySession(),
                     new ArtifactRequest(
                             toArtifact(artifact),
@@ -445,11 +447,7 @@ public class DefaultVersionsHelper implements VersionsHelper {
 
     @Override
     public Artifact createPluginArtifact(String groupId, String artifactId, String version) {
-        Plugin plugin = new Plugin();
-        plugin.setGroupId(groupId);
-        plugin.setArtifactId(artifactId);
-        plugin.setVersion(StringUtils.isNotBlank(version) ? version : "[0,]");
-        return repositorySystem.createPluginArtifact(plugin);
+        return createDependencyArtifact(groupId, artifactId, version, "maven-plugin", null, "runtime", false);
     }
 
     @Override
@@ -461,31 +459,37 @@ public class DefaultVersionsHelper implements VersionsHelper {
             String classifier,
             String scope,
             boolean optional) {
-        return repositorySystem.createDependencyArtifact(DependencyBuilder.newBuilder()
-                .withGroupId(groupId)
-                .withArtifactId(artifactId)
-                .withType(type)
-                .withClassifier(classifier)
-                .withScope(scope)
-                .withOptional(optional)
-                .withVersion(StringUtils.isNotBlank(version) ? version : "[0,]")
-                .build());
-    }
-
-    @Override
-    public Artifact createDependencyArtifact(
-            String groupId, String artifactId, String version, String type, String classifier, String scope) {
-        return createDependencyArtifact(groupId, artifactId, version, type, classifier, scope, false);
+        try {
+            return new DefaultArtifact(
+                    groupId,
+                    artifactId,
+                    VersionRange.createFromVersionSpec(StringUtils.isNotBlank(version) ? version : "[0,]"),
+                    scope,
+                    type,
+                    classifier,
+                    artifactHandlerManager.getArtifactHandler(type),
+                    optional);
+        } catch (InvalidVersionSpecificationException e) {
+            // version should have a proper format
+            throw new RuntimeException(e);
+        }
     }
 
     @Override
     public Artifact createDependencyArtifact(Dependency dependency) {
-        if (StringUtils.isBlank(dependency.getVersion())) {
-            dependency = dependency.clone();
-            dependency.setVersion("[,0]");
-        }
-
-        return repositorySystem.createDependencyArtifact(dependency);
+        Artifact artifact = createDependencyArtifact(
+                dependency.getGroupId(),
+                dependency.getArtifactId(),
+                dependency.getVersion(),
+                dependency.getType(),
+                dependency.getClassifier(),
+                dependency.getScope(),
+                false);
+
+        if (Artifact.SCOPE_SYSTEM.equals(dependency.getScope()) && dependency.getSystemPath() != null) {
+            artifact.setFile(new File(dependency.getSystemPath()));
+        }
+        return artifact;
     }
 
     @Override
@@ -710,7 +714,7 @@ public class DefaultVersionsHelper implements VersionsHelper {
      * Builder class for {@linkplain DefaultVersionsHelper}
      */
     public static class Builder {
-        private RepositorySystem repositorySystem;
+        private ArtifactHandlerManager artifactHandlerManager;
         private Collection<String> ignoredVersions;
         private RuleSet ruleSet;
         private String serverId;
@@ -718,7 +722,8 @@ public class DefaultVersionsHelper implements VersionsHelper {
         private Log log;
         private MavenSession mavenSession;
         private MojoExecution mojoExecution;
-        private org.eclipse.aether.RepositorySystem aetherRepositorySystem;
+        private RepositorySystem repositorySystem;
+
         private Map<String, Wagon> wagonMap;
 
         public Builder() {}
@@ -919,8 +924,8 @@ public class DefaultVersionsHelper implements VersionsHelper {
             return pos == -1 ? empty() : of(url.substring(0, pos).trim());
         }
 
-        public Builder withRepositorySystem(RepositorySystem repositorySystem) {
-            this.repositorySystem = repositorySystem;
+        public Builder withArtifactHandlerManager(ArtifactHandlerManager artifactHandlerManager) {
+            this.artifactHandlerManager = artifactHandlerManager;
             return this;
         }
 
@@ -959,8 +964,8 @@ public class DefaultVersionsHelper implements VersionsHelper {
             return this;
         }
 
-        public Builder withAetherRepositorySystem(org.eclipse.aether.RepositorySystem aetherRepositorySystem) {
-            this.aetherRepositorySystem = aetherRepositorySystem;
+        public Builder withRepositorySystem(RepositorySystem repositorySystem) {
+            this.repositorySystem = repositorySystem;
             return this;
         }
 
@@ -976,7 +981,7 @@ public class DefaultVersionsHelper implements VersionsHelper {
          */
         public DefaultVersionsHelper build() throws MojoExecutionException {
             DefaultVersionsHelper instance = new DefaultVersionsHelper(
-                    repositorySystem, aetherRepositorySystem, mavenSession, mojoExecution, log);
+                    artifactHandlerManager, repositorySystem, mavenSession, mojoExecution, log);
             if (ruleSet != null) {
                 if (!isBlank(rulesUri)) {
                     log.warn("rulesUri is ignored if rules are specified in pom or as parameters");
diff --git a/versions-common/src/main/java/org/codehaus/mojo/versions/api/VersionsHelper.java b/versions-common/src/main/java/org/codehaus/mojo/versions/api/VersionsHelper.java
index c8bdd23a..e55f12c0 100644
--- a/versions-common/src/main/java/org/codehaus/mojo/versions/api/VersionsHelper.java
+++ b/versions-common/src/main/java/org/codehaus/mojo/versions/api/VersionsHelper.java
@@ -103,21 +103,6 @@ public interface VersionsHelper {
             String scope,
             boolean optional);
 
-    /**
-     * Shorthand method for <code>getArtifactFactory().createDependencyArtifact(...)</code>.
-     *
-     * @param groupId The group id.
-     * @param artifactId The artifact id.
-     * @param version The version.
-     * @param type The type.
-     * @param classifier The classifier.
-     * @param scope The scope.
-     * @return The corresponding dependency artifact.
-     * @since 1.0-beta-1
-     */
-    Artifact createDependencyArtifact(
-            String groupId, String artifactId, String version, String type, String classifier, String scope);
-
     /**
      * Shorthand method for <code>repositorySystem.createDependencyArtifact(...)</code> which extracts the
      * parameters from the Dependency instance.
diff --git a/versions-enforcer/src/main/java/org/codehaus/mojo/versions/enforcer/MaxDependencyUpdates.java b/versions-enforcer/src/main/java/org/codehaus/mojo/versions/enforcer/MaxDependencyUpdates.java
index 4b26b64e..00bae3b8 100644
--- a/versions-enforcer/src/main/java/org/codehaus/mojo/versions/enforcer/MaxDependencyUpdates.java
+++ b/versions-enforcer/src/main/java/org/codehaus/mojo/versions/enforcer/MaxDependencyUpdates.java
@@ -29,6 +29,7 @@ import java.util.Set;
 import java.util.TreeSet;
 import java.util.stream.Collectors;
 
+import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager;
 import org.apache.maven.artifact.versioning.ArtifactVersion;
 import org.apache.maven.enforcer.rule.api.AbstractEnforcerRule;
 import org.apache.maven.enforcer.rule.api.EnforcerRuleError;
@@ -38,7 +39,6 @@ import org.apache.maven.model.Dependency;
 import org.apache.maven.plugin.MojoExecution;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.project.MavenProject;
-import org.apache.maven.repository.RepositorySystem;
 import org.apache.maven.wagon.Wagon;
 import org.codehaus.mojo.versions.api.ArtifactVersions;
 import org.codehaus.mojo.versions.api.DefaultVersionsHelper;
@@ -47,6 +47,7 @@ import org.codehaus.mojo.versions.api.VersionRetrievalException;
 import org.codehaus.mojo.versions.api.VersionsHelper;
 import org.codehaus.mojo.versions.model.RuleSet;
 import org.codehaus.mojo.versions.utils.DependencyComparator;
+import org.eclipse.aether.RepositorySystem;
 
 import static java.util.Collections.emptyList;
 import static java.util.Collections.singletonList;
@@ -256,9 +257,9 @@ public class MaxDependencyUpdates extends AbstractEnforcerRule {
 
     private final MavenProject project;
 
-    private final RepositorySystem repositorySystem;
+    private final ArtifactHandlerManager artifactHandlerManager;
 
-    private final org.eclipse.aether.RepositorySystem aetherRepositorySystem;
+    private final RepositorySystem repositorySystem;
 
     private final Map<String, Wagon> wagonMap;
 
@@ -269,14 +270,14 @@ public class MaxDependencyUpdates extends AbstractEnforcerRule {
     @Inject
     public MaxDependencyUpdates(
             MavenProject project,
+            ArtifactHandlerManager artifactHandlerManager,
             RepositorySystem repositorySystem,
-            org.eclipse.aether.RepositorySystem aetherRepositorySystem,
             Map<String, Wagon> wagonMap,
             MavenSession mavenSession,
             MojoExecution mojoExecution) {
         this.project = project;
+        this.artifactHandlerManager = artifactHandlerManager;
         this.repositorySystem = repositorySystem;
-        this.aetherRepositorySystem = aetherRepositorySystem;
         this.wagonMap = wagonMap;
         this.mavenSession = mavenSession;
         this.mojoExecution = mojoExecution;
@@ -290,8 +291,8 @@ public class MaxDependencyUpdates extends AbstractEnforcerRule {
             throws EnforcerRuleError {
         try {
             return new DefaultVersionsHelper.Builder()
+                    .withArtifactHandlerManager(artifactHandlerManager)
                     .withRepositorySystem(repositorySystem)
-                    .withAetherRepositorySystem(aetherRepositorySystem)
                     .withWagonMap(wagonMap)
                     .withServerId(serverId)
                     .withRulesUri(rulesUri)
diff --git a/versions-maven-plugin/pom.xml b/versions-maven-plugin/pom.xml
index c7a9dee6..872b61c9 100644
--- a/versions-maven-plugin/pom.xml
+++ b/versions-maven-plugin/pom.xml
@@ -169,6 +169,14 @@
       <artifactId>javax.inject</artifactId>
     </dependency>
 
+    <!-- other -->
+
+    <dependency>
+      <groupId>org.eclipse.jgit</groupId>
+      <artifactId>org.eclipse.jgit</artifactId>
+      <version>5.13.3.202401111512-r</version>
+    </dependency>
+
     <!-- testing -->
     <dependency>
       <groupId>commons-codec</groupId>
diff --git a/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-0-commits-0-tags/invoker.properties b/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-0-commits-0-tags/invoker.properties
new file mode 100644
index 00000000..852932e8
--- /dev/null
+++ b/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-0-commits-0-tags/invoker.properties
@@ -0,0 +1,2 @@
+invoker.goals=${project.groupId}:${project.artifactId}:${project.version}:use-dynamic-version-from-scm
+invoker.buildResult = failure
diff --git a/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-0-commits-0-tags/pom.xml b/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-0-commits-0-tags/pom.xml
new file mode 100644
index 00000000..78bc48a8
--- /dev/null
+++ b/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-0-commits-0-tags/pom.xml
@@ -0,0 +1,11 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>localhost</groupId>
+  <artifactId>it-dynamic-versioning-scm-tag-0-commits-0-tags</artifactId>
+  <version>${revision}</version>
+  <packaging>pom</packaging>
+  <name>ranges-update-report</name>
+  <url>http://localhost/</url>
+</project>
diff --git a/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-0-commits-0-tags/selector.groovy b/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-0-commits-0-tags/selector.groovy
new file mode 100644
index 00000000..74f82d00
--- /dev/null
+++ b/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-0-commits-0-tags/selector.groovy
@@ -0,0 +1,10 @@
+try {
+    // smoke test if we have a needed tools
+    def gitVersion = "git --version".execute()
+    gitVersion.consumeProcessOutput(System.out, System.out)
+    gitVersion.waitFor()
+    return gitVersion.exitValue() == 0
+} catch (Exception e) {
+    // some error occurs - we skip a test
+    return false
+}
diff --git a/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-0-commits-0-tags/setup.groovy b/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-0-commits-0-tags/setup.groovy
new file mode 100644
index 00000000..b03e4219
--- /dev/null
+++ b/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-0-commits-0-tags/setup.groovy
@@ -0,0 +1,11 @@
+void exec(String command) {
+    def proc = command.execute(null, basedir)
+    proc.consumeProcessOutput(System.out, System.out)
+    proc.waitFor()
+    assert proc.exitValue() == 0 : "Command '${command}' returned status: ${proc.exitValue()}"
+}
+
+def testFile = new File(basedir, 'test.txt')
+testFile << 'content'
+
+exec('git init')
diff --git a/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-0-commits-0-tags/verify.groovy b/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-0-commits-0-tags/verify.groovy
new file mode 100644
index 00000000..e3427305
--- /dev/null
+++ b/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-0-commits-0-tags/verify.groovy
@@ -0,0 +1,12 @@
+// check that property was set
+
+def mavenLogFile = new File(basedir, 'build.log')
+assert mavenLogFile.exists() : "Maven log file does not exist"
+
+// Read the log file
+def logContent = mavenLogFile.text
+
+// Define a pattern to match the version output
+def versionPattern = /Caused by: org.apache.maven.plugin.MojoExecutionException: SCM repo has no head\/commits\./
+def matcher = (logContent =~ versionPattern)
+assert matcher.find() : "SCM repo should have no head/commits"
diff --git a/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-1-commit-0-tags/invoker.properties b/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-1-commit-0-tags/invoker.properties
new file mode 100644
index 00000000..b86b79ee
--- /dev/null
+++ b/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-1-commit-0-tags/invoker.properties
@@ -0,0 +1,1 @@
+invoker.goals=${project.groupId}:${project.artifactId}:${project.version}:use-dynamic-version-from-scm
diff --git a/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-1-commit-0-tags/pom.xml b/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-1-commit-0-tags/pom.xml
new file mode 100644
index 00000000..4f6aef7e
--- /dev/null
+++ b/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-1-commit-0-tags/pom.xml
@@ -0,0 +1,11 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>localhost</groupId>
+  <artifactId>it-dynamic-versioning-scm-tag-1-commit-0-tags</artifactId>
+  <version>${revision}</version>
+  <packaging>pom</packaging>
+  <name>ranges-update-report</name>
+  <url>http://localhost/</url>
+</project>
diff --git a/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-1-commit-0-tags/selector.groovy b/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-1-commit-0-tags/selector.groovy
new file mode 100644
index 00000000..74f82d00
--- /dev/null
+++ b/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-1-commit-0-tags/selector.groovy
@@ -0,0 +1,10 @@
+try {
+    // smoke test if we have a needed tools
+    def gitVersion = "git --version".execute()
+    gitVersion.consumeProcessOutput(System.out, System.out)
+    gitVersion.waitFor()
+    return gitVersion.exitValue() == 0
+} catch (Exception e) {
+    // some error occurs - we skip a test
+    return false
+}
diff --git a/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-1-commit-0-tags/setup.groovy b/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-1-commit-0-tags/setup.groovy
new file mode 100644
index 00000000..4053e7dd
--- /dev/null
+++ b/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-1-commit-0-tags/setup.groovy
@@ -0,0 +1,16 @@
+void exec(String command) {
+    def proc = command.execute(null, basedir)
+    proc.consumeProcessOutput(System.out, System.out)
+    proc.waitFor()
+    assert proc.exitValue() == 0 : "Command '${command}' returned status: ${proc.exitValue()}"
+}
+
+def testFile = new File(basedir, 'test.txt')
+testFile << 'content'
+
+exec('git init')
+exec('git config user.email "you@example.com"')
+exec('git config user.name "Your Name"')
+
+exec('git add test.txt')
+exec('git commit -m initial-commit')
diff --git a/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-1-commit-0-tags/verify.groovy b/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-1-commit-0-tags/verify.groovy
new file mode 100644
index 00000000..3c42ac51
--- /dev/null
+++ b/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-1-commit-0-tags/verify.groovy
@@ -0,0 +1,19 @@
+// check that property was set
+
+def mavenLogFile = new File(basedir, 'build.log')
+assert mavenLogFile.exists() : "Maven log file does not exist"
+
+// Read the log file
+def logContent = mavenLogFile.text
+
+// Define a pattern to match the version output
+def versionPattern = /\[INFO\] Property 'revision' set to: (.+)/ 
+def matcher = (logContent =~ versionPattern)
+assert matcher.find() : "Version information not found in log file"
+
+// Extract the version from the matched group
+def actualVersion = matcher[0][1]
+
+def expectedVersion = '0.0.1-1-SNAPSHOT'
+
+assert actualVersion == expectedVersion : "Expected version '${expectedVersion}', but found '${actualVersion}'"
diff --git a/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-4-commits-1-vtag/invoker.properties b/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-4-commits-1-vtag/invoker.properties
new file mode 100644
index 00000000..03ed4f49
--- /dev/null
+++ b/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-4-commits-1-vtag/invoker.properties
@@ -0,0 +1,1 @@
+invoker.goals=-X ${project.groupId}:${project.artifactId}:${project.version}:use-dynamic-version-from-scm
diff --git a/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-4-commits-1-vtag/pom.xml b/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-4-commits-1-vtag/pom.xml
new file mode 100644
index 00000000..edb2c329
--- /dev/null
+++ b/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-4-commits-1-vtag/pom.xml
@@ -0,0 +1,11 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>localhost</groupId>
+  <artifactId>it-dynamic-versioning-scm-tag-4-commits-1-vtag</artifactId>
+  <version>${revision}</version>
+  <packaging>pom</packaging>
+  <name>ranges-update-report</name>
+  <url>http://localhost/</url>
+</project>
diff --git a/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-4-commits-1-vtag/selector.groovy b/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-4-commits-1-vtag/selector.groovy
new file mode 100644
index 00000000..74f82d00
--- /dev/null
+++ b/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-4-commits-1-vtag/selector.groovy
@@ -0,0 +1,10 @@
+try {
+    // smoke test if we have a needed tools
+    def gitVersion = "git --version".execute()
+    gitVersion.consumeProcessOutput(System.out, System.out)
+    gitVersion.waitFor()
+    return gitVersion.exitValue() == 0
+} catch (Exception e) {
+    // some error occurs - we skip a test
+    return false
+}
diff --git a/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-4-commits-1-vtag/setup.groovy b/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-4-commits-1-vtag/setup.groovy
new file mode 100644
index 00000000..d529d2ab
--- /dev/null
+++ b/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-4-commits-1-vtag/setup.groovy
@@ -0,0 +1,30 @@
+void exec(String command) {
+    def proc = command.execute(null, basedir)
+    proc.consumeProcessOutput(System.out, System.out)
+    proc.waitFor()
+    assert proc.exitValue() == 0 : "Command '${command}' returned status: ${proc.exitValue()}"
+}
+
+def testFile = new File(basedir, 'test.txt')
+testFile << 'content'
+
+exec('git init')
+exec('git config user.email "you@example.com"')
+exec('git config user.name "Your Name"')
+
+exec('git add test.txt')
+exec('git commit -m initial-commit')
+exec('git tag 1.1.1')
+exec('git tag')
+
+testFile << 'content2'
+exec('git add test.txt')
+exec('git commit -m commit_no2')
+
+testFile << 'content3'
+exec('git add test.txt')
+exec('git commit -m commit_no3')
+
+testFile << 'content4'
+exec('git add test.txt')
+exec('git commit -m commit_no4')
diff --git a/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-4-commits-1-vtag/verify.groovy b/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-4-commits-1-vtag/verify.groovy
new file mode 100644
index 00000000..3ddc76fc
--- /dev/null
+++ b/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-4-commits-1-vtag/verify.groovy
@@ -0,0 +1,19 @@
+// check that property was set
+
+def mavenLogFile = new File(basedir, 'build.log')
+assert mavenLogFile.exists() : "Maven log file does not exist"
+
+// Read the log file
+def logContent = mavenLogFile.text
+
+// Define a pattern to match the version output
+def versionPattern = /\[INFO\] Property 'revision' set to: (.+)/ 
+def matcher = (logContent =~ versionPattern)
+assert matcher.find() : "Version information not found in log file"
+
+// Extract the version from the matched group
+def actualVersion = matcher[0][1]
+
+def expectedVersion = '1.1.2-4-SNAPSHOT'
+
+assert actualVersion == expectedVersion : "Expected version '${expectedVersion}', but found '${actualVersion}'"
diff --git a/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-param-append-snapshot/invoker.properties b/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-param-append-snapshot/invoker.properties
new file mode 100644
index 00000000..0218ef30
--- /dev/null
+++ b/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-param-append-snapshot/invoker.properties
@@ -0,0 +1,1 @@
+invoker.goals=${project.groupId}:${project.artifactId}:${project.version}:use-dynamic-version-from-scm -DappendSnapshot=false
diff --git a/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-param-append-snapshot/pom.xml b/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-param-append-snapshot/pom.xml
new file mode 100644
index 00000000..7acc0f95
--- /dev/null
+++ b/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-param-append-snapshot/pom.xml
@@ -0,0 +1,11 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>localhost</groupId>
+  <artifactId>it-dynamic-versioning-scm-tag-param-append-snapshot</artifactId>
+  <version>${revision}</version>
+  <packaging>pom</packaging>
+  <name>ranges-update-report</name>
+  <url>http://localhost/</url>
+</project>
diff --git a/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-param-append-snapshot/selector.groovy b/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-param-append-snapshot/selector.groovy
new file mode 100644
index 00000000..74f82d00
--- /dev/null
+++ b/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-param-append-snapshot/selector.groovy
@@ -0,0 +1,10 @@
+try {
+    // smoke test if we have a needed tools
+    def gitVersion = "git --version".execute()
+    gitVersion.consumeProcessOutput(System.out, System.out)
+    gitVersion.waitFor()
+    return gitVersion.exitValue() == 0
+} catch (Exception e) {
+    // some error occurs - we skip a test
+    return false
+}
diff --git a/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-param-append-snapshot/setup.groovy b/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-param-append-snapshot/setup.groovy
new file mode 100644
index 00000000..4053e7dd
--- /dev/null
+++ b/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-param-append-snapshot/setup.groovy
@@ -0,0 +1,16 @@
+void exec(String command) {
+    def proc = command.execute(null, basedir)
+    proc.consumeProcessOutput(System.out, System.out)
+    proc.waitFor()
+    assert proc.exitValue() == 0 : "Command '${command}' returned status: ${proc.exitValue()}"
+}
+
+def testFile = new File(basedir, 'test.txt')
+testFile << 'content'
+
+exec('git init')
+exec('git config user.email "you@example.com"')
+exec('git config user.name "Your Name"')
+
+exec('git add test.txt')
+exec('git commit -m initial-commit')
diff --git a/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-param-append-snapshot/verify.groovy b/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-param-append-snapshot/verify.groovy
new file mode 100644
index 00000000..522dee41
--- /dev/null
+++ b/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-param-append-snapshot/verify.groovy
@@ -0,0 +1,19 @@
+// check that property was set
+
+def mavenLogFile = new File(basedir, 'build.log')
+assert mavenLogFile.exists() : "Maven log file does not exist"
+
+// Read the log file
+def logContent = mavenLogFile.text
+
+// Define a pattern to match the version output
+def versionPattern = /\[INFO\] Property 'revision' set to: (.+)/ 
+def matcher = (logContent =~ versionPattern)
+assert matcher.find() : "Version information not found in log file"
+
+// Extract the version from the matched group
+def actualVersion = matcher[0][1]
+
+def expectedVersion = '0.0.1-1'
+
+assert actualVersion == expectedVersion : "Expected version '${expectedVersion}', but found '${actualVersion}'"
diff --git a/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-param-use-versions/invoker.properties b/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-param-use-versions/invoker.properties
new file mode 100644
index 00000000..dd8cc8fc
--- /dev/null
+++ b/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-param-use-versions/invoker.properties
@@ -0,0 +1,1 @@
+invoker.goals=${project.groupId}:${project.artifactId}:${project.version}:use-dynamic-version-from-scm -DuseVersion=9.9.9-9
diff --git a/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-param-use-versions/pom.xml b/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-param-use-versions/pom.xml
new file mode 100644
index 00000000..08131ac3
--- /dev/null
+++ b/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-param-use-versions/pom.xml
@@ -0,0 +1,11 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>localhost</groupId>
+  <artifactId>it-dynamic-versioning-scm-tag-param-use-versions</artifactId>
+  <version>${revision}</version>
+  <packaging>pom</packaging>
+  <name>ranges-update-report</name>
+  <url>http://localhost/</url>
+</project>
diff --git a/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-param-use-versions/selector.groovy b/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-param-use-versions/selector.groovy
new file mode 100644
index 00000000..74f82d00
--- /dev/null
+++ b/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-param-use-versions/selector.groovy
@@ -0,0 +1,10 @@
+try {
+    // smoke test if we have a needed tools
+    def gitVersion = "git --version".execute()
+    gitVersion.consumeProcessOutput(System.out, System.out)
+    gitVersion.waitFor()
+    return gitVersion.exitValue() == 0
+} catch (Exception e) {
+    // some error occurs - we skip a test
+    return false
+}
diff --git a/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-param-use-versions/setup.groovy b/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-param-use-versions/setup.groovy
new file mode 100644
index 00000000..4053e7dd
--- /dev/null
+++ b/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-param-use-versions/setup.groovy
@@ -0,0 +1,16 @@
+void exec(String command) {
+    def proc = command.execute(null, basedir)
+    proc.consumeProcessOutput(System.out, System.out)
+    proc.waitFor()
+    assert proc.exitValue() == 0 : "Command '${command}' returned status: ${proc.exitValue()}"
+}
+
+def testFile = new File(basedir, 'test.txt')
+testFile << 'content'
+
+exec('git init')
+exec('git config user.email "you@example.com"')
+exec('git config user.name "Your Name"')
+
+exec('git add test.txt')
+exec('git commit -m initial-commit')
diff --git a/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-param-use-versions/verify.groovy b/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-param-use-versions/verify.groovy
new file mode 100644
index 00000000..4c2fe68a
--- /dev/null
+++ b/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-param-use-versions/verify.groovy
@@ -0,0 +1,19 @@
+// check that property was set
+
+def mavenLogFile = new File(basedir, 'build.log')
+assert mavenLogFile.exists() : "Maven log file does not exist"
+
+// Read the log file
+def logContent = mavenLogFile.text
+
+// Define a pattern to match the version output
+def versionPattern = /\[INFO\] Property 'revision' set to: (.+)/ 
+def matcher = (logContent =~ versionPattern)
+assert matcher.find() : "Version information not found in log file"
+
+// Extract the version from the matched group
+def actualVersion = matcher[0][1]
+
+def expectedVersion = '9.9.9-9'
+
+assert actualVersion == expectedVersion : "Expected version '${expectedVersion}', but found '${actualVersion}'"
diff --git a/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-property-name/invoker.properties b/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-property-name/invoker.properties
new file mode 100644
index 00000000..ca4ce2b7
--- /dev/null
+++ b/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-property-name/invoker.properties
@@ -0,0 +1,1 @@
+invoker.goals=${project.groupId}:${project.artifactId}:${project.version}:use-dynamic-version-from-scm -DpropertyName=version_from_scm
diff --git a/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-property-name/pom.xml b/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-property-name/pom.xml
new file mode 100644
index 00000000..593dcc5a
--- /dev/null
+++ b/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-property-name/pom.xml
@@ -0,0 +1,11 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>localhost</groupId>
+  <artifactId>it-dynamic-versioning-scm-tag-env-use-version</artifactId>
+  <version>${revision}</version>
+  <packaging>pom</packaging>
+  <name>ranges-update-report</name>
+  <url>http://localhost/</url>
+</project>
diff --git a/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-property-name/selector.groovy b/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-property-name/selector.groovy
new file mode 100644
index 00000000..74f82d00
--- /dev/null
+++ b/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-property-name/selector.groovy
@@ -0,0 +1,10 @@
+try {
+    // smoke test if we have a needed tools
+    def gitVersion = "git --version".execute()
+    gitVersion.consumeProcessOutput(System.out, System.out)
+    gitVersion.waitFor()
+    return gitVersion.exitValue() == 0
+} catch (Exception e) {
+    // some error occurs - we skip a test
+    return false
+}
diff --git a/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-property-name/setup.groovy b/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-property-name/setup.groovy
new file mode 100644
index 00000000..4053e7dd
--- /dev/null
+++ b/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-property-name/setup.groovy
@@ -0,0 +1,16 @@
+void exec(String command) {
+    def proc = command.execute(null, basedir)
+    proc.consumeProcessOutput(System.out, System.out)
+    proc.waitFor()
+    assert proc.exitValue() == 0 : "Command '${command}' returned status: ${proc.exitValue()}"
+}
+
+def testFile = new File(basedir, 'test.txt')
+testFile << 'content'
+
+exec('git init')
+exec('git config user.email "you@example.com"')
+exec('git config user.name "Your Name"')
+
+exec('git add test.txt')
+exec('git commit -m initial-commit')
diff --git a/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-property-name/verify.groovy b/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-property-name/verify.groovy
new file mode 100644
index 00000000..603724bd
--- /dev/null
+++ b/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-property-name/verify.groovy
@@ -0,0 +1,19 @@
+// check that property was set
+
+def mavenLogFile = new File(basedir, 'build.log')
+assert mavenLogFile.exists() : "Maven log file does not exist"
+
+// Read the log file
+def logContent = mavenLogFile.text
+
+// Define a pattern to match the version output
+def versionPattern = /\[INFO\] Property 'version_from_scm' set to: (.+)/
+def matcher = (logContent =~ versionPattern)
+assert matcher.find() : "Version information not found in log file"
+
+// Extract the version from the matched group
+def actualVersion = matcher[0][1]
+
+def expectedVersion = '0.0.1-1-SNAPSHOT'
+
+assert actualVersion == expectedVersion : "Expected version '${expectedVersion}', but found '${actualVersion}'"
diff --git a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/AbstractDependencyUpdatesReportMojo.java b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/AbstractDependencyUpdatesReportMojo.java
index 91d7bafa..e4370618 100644
--- a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/AbstractDependencyUpdatesReportMojo.java
+++ b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/AbstractDependencyUpdatesReportMojo.java
@@ -29,13 +29,13 @@ import java.util.Set;
 import java.util.TreeSet;
 import java.util.stream.Collectors;
 
+import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager;
 import org.apache.maven.artifact.versioning.ArtifactVersion;
 import org.apache.maven.doxia.sink.Sink;
 import org.apache.maven.model.Dependency;
 import org.apache.maven.plugins.annotations.Parameter;
 import org.apache.maven.project.MavenProject;
 import org.apache.maven.reporting.MavenReportException;
-import org.apache.maven.repository.RepositorySystem;
 import org.apache.maven.wagon.Wagon;
 import org.codehaus.mojo.versions.api.ArtifactVersions;
 import org.codehaus.mojo.versions.api.VersionRetrievalException;
@@ -44,6 +44,7 @@ import org.codehaus.mojo.versions.reporting.model.DependencyUpdatesModel;
 import org.codehaus.mojo.versions.utils.DependencyComparator;
 import org.codehaus.mojo.versions.xml.DependencyUpdatesXmlReportRenderer;
 import org.codehaus.plexus.i18n.I18N;
+import org.eclipse.aether.RepositorySystem;
 
 import static java.util.Collections.emptyMap;
 import static org.codehaus.mojo.versions.utils.MavenProjectUtils.interpolateVersion;
@@ -102,11 +103,11 @@ public abstract class AbstractDependencyUpdatesReportMojo extends AbstractVersio
 
     public AbstractDependencyUpdatesReportMojo(
             I18N i18n,
+            ArtifactHandlerManager artifactHandlerManager,
             RepositorySystem repositorySystem,
-            org.eclipse.aether.RepositorySystem aetherRepositorySystem,
             Map<String, Wagon> wagonMap,
             ReportRendererFactory rendererFactory) {
-        super(i18n, repositorySystem, aetherRepositorySystem, wagonMap, rendererFactory);
+        super(i18n, artifactHandlerManager, repositorySystem, wagonMap, rendererFactory);
     }
 
     /**
diff --git a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/AbstractPluginUpdatesReportMojo.java b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/AbstractPluginUpdatesReportMojo.java
index a2d53e54..335576f6 100644
--- a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/AbstractPluginUpdatesReportMojo.java
+++ b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/AbstractPluginUpdatesReportMojo.java
@@ -27,12 +27,12 @@ import java.util.Set;
 import java.util.TreeSet;
 import java.util.function.BinaryOperator;
 
+import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager;
 import org.apache.maven.doxia.sink.Sink;
 import org.apache.maven.model.Plugin;
 import org.apache.maven.plugins.annotations.Parameter;
 import org.apache.maven.project.MavenProject;
 import org.apache.maven.reporting.MavenReportException;
-import org.apache.maven.repository.RepositorySystem;
 import org.apache.maven.wagon.Wagon;
 import org.codehaus.mojo.versions.api.PluginUpdatesDetails;
 import org.codehaus.mojo.versions.api.VersionRetrievalException;
@@ -41,6 +41,7 @@ import org.codehaus.mojo.versions.reporting.model.PluginUpdatesModel;
 import org.codehaus.mojo.versions.utils.PluginComparator;
 import org.codehaus.mojo.versions.xml.PluginUpdatesXmlReportRenderer;
 import org.codehaus.plexus.i18n.I18N;
+import org.eclipse.aether.RepositorySystem;
 
 import static org.codehaus.mojo.versions.utils.MiscUtils.filter;
 
@@ -76,11 +77,11 @@ public abstract class AbstractPluginUpdatesReportMojo extends AbstractVersionsRe
 
     public AbstractPluginUpdatesReportMojo(
             I18N i18n,
+            ArtifactHandlerManager artifactHandlerManager,
             RepositorySystem repositorySystem,
-            org.eclipse.aether.RepositorySystem aetherRepositorySystem,
             Map<String, Wagon> wagonMap,
             ReportRendererFactory rendererFactory) {
-        super(i18n, repositorySystem, aetherRepositorySystem, wagonMap, rendererFactory);
+        super(i18n, artifactHandlerManager, repositorySystem, wagonMap, rendererFactory);
     }
 
     /**
diff --git a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/AbstractPropertyUpdatesReportMojo.java b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/AbstractPropertyUpdatesReportMojo.java
index 38985fb9..92e2fa98 100644
--- a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/AbstractPropertyUpdatesReportMojo.java
+++ b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/AbstractPropertyUpdatesReportMojo.java
@@ -25,12 +25,12 @@ import java.util.Locale;
 import java.util.Map;
 import java.util.TreeMap;
 
+import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager;
 import org.apache.maven.doxia.sink.Sink;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugins.annotations.Parameter;
 import org.apache.maven.project.MavenProject;
 import org.apache.maven.reporting.MavenReportException;
-import org.apache.maven.repository.RepositorySystem;
 import org.apache.maven.wagon.Wagon;
 import org.codehaus.mojo.versions.api.Property;
 import org.codehaus.mojo.versions.api.PropertyVersions;
@@ -40,6 +40,7 @@ import org.codehaus.mojo.versions.reporting.model.PropertyUpdatesModel;
 import org.codehaus.mojo.versions.utils.PropertyComparator;
 import org.codehaus.mojo.versions.xml.PropertyUpdatesXmlReportRenderer;
 import org.codehaus.plexus.i18n.I18N;
+import org.eclipse.aether.RepositorySystem;
 
 /**
  * Generates a report of available updates for properties of a project which are linked to the dependencies and/or
@@ -99,11 +100,11 @@ public abstract class AbstractPropertyUpdatesReportMojo extends AbstractVersions
 
     public AbstractPropertyUpdatesReportMojo(
             I18N i18n,
+            ArtifactHandlerManager artifactHandlerManager,
             RepositorySystem repositorySystem,
-            org.eclipse.aether.RepositorySystem aetherRepositorySystem,
             Map<String, Wagon> wagonMap,
             ReportRendererFactory rendererFactory) {
-        super(i18n, repositorySystem, aetherRepositorySystem, wagonMap, rendererFactory);
+        super(i18n, artifactHandlerManager, repositorySystem, wagonMap, rendererFactory);
     }
 
     /**
diff --git a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/AbstractVersionsDependencyUpdaterMojo.java b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/AbstractVersionsDependencyUpdaterMojo.java
index 7f0b90cd..26b3ed9f 100644
--- a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/AbstractVersionsDependencyUpdaterMojo.java
+++ b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/AbstractVersionsDependencyUpdaterMojo.java
@@ -27,13 +27,13 @@ import java.util.regex.Pattern;
 
 import org.apache.commons.lang3.StringUtils;
 import org.apache.maven.artifact.Artifact;
+import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager;
 import org.apache.maven.artifact.resolver.filter.ArtifactFilter;
 import org.apache.maven.model.Dependency;
 import org.apache.maven.model.Parent;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugins.annotations.Parameter;
 import org.apache.maven.project.MavenProject;
-import org.apache.maven.repository.RepositorySystem;
 import org.apache.maven.shared.artifact.filter.PatternExcludesArtifactFilter;
 import org.apache.maven.shared.artifact.filter.PatternIncludesArtifactFilter;
 import org.apache.maven.shared.artifact.filter.ScopeArtifactFilter;
@@ -45,6 +45,7 @@ import org.codehaus.mojo.versions.recording.DefaultDependencyChangeRecord;
 import org.codehaus.mojo.versions.rewriting.ModifiedPomXMLEventReader;
 import org.codehaus.mojo.versions.utils.DependencyBuilder;
 import org.codehaus.mojo.versions.utils.DependencyComparator;
+import org.eclipse.aether.RepositorySystem;
 
 /**
  * Base class for a mojo that updates dependency versions.
@@ -159,11 +160,11 @@ public abstract class AbstractVersionsDependencyUpdaterMojo extends AbstractVers
 
     @Inject
     protected AbstractVersionsDependencyUpdaterMojo(
+            ArtifactHandlerManager artifactHandlerManager,
             RepositorySystem repositorySystem,
-            org.eclipse.aether.RepositorySystem aetherRepositorySystem,
             Map<String, Wagon> wagonMap,
             Map<String, ChangeRecorder> changeRecorders) {
-        super(repositorySystem, aetherRepositorySystem, wagonMap, changeRecorders);
+        super(artifactHandlerManager, repositorySystem, wagonMap, changeRecorders);
     }
 
     /**
diff --git a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/AbstractVersionsDisplayMojo.java b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/AbstractVersionsDisplayMojo.java
index e59587f3..9e005a8b 100644
--- a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/AbstractVersionsDisplayMojo.java
+++ b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/AbstractVersionsDisplayMojo.java
@@ -30,10 +30,11 @@ import java.util.Map;
 import java.util.Set;
 
 import org.apache.commons.lang3.StringUtils;
+import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager;
 import org.apache.maven.plugins.annotations.Parameter;
-import org.apache.maven.repository.RepositorySystem;
 import org.apache.maven.wagon.Wagon;
 import org.codehaus.mojo.versions.api.recording.ChangeRecorder;
+import org.eclipse.aether.RepositorySystem;
 
 /**
  * Abstract base class for the Display___ mojos.
@@ -83,11 +84,11 @@ public abstract class AbstractVersionsDisplayMojo extends AbstractVersionsUpdate
 
     @Inject
     protected AbstractVersionsDisplayMojo(
+            ArtifactHandlerManager artifactHandlerManager,
             RepositorySystem repositorySystem,
-            org.eclipse.aether.RepositorySystem aetherRepositorySystem,
             Map<String, Wagon> wagonMap,
             Map<String, ChangeRecorder> changeRecorders) {
-        super(repositorySystem, aetherRepositorySystem, wagonMap, changeRecorders);
+        super(artifactHandlerManager, repositorySystem, wagonMap, changeRecorders);
     }
 
     @SuppressWarnings("unchecked")
diff --git a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/AbstractVersionsReport.java b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/AbstractVersionsReport.java
index dc85e3de..db398726 100644
--- a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/AbstractVersionsReport.java
+++ b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/AbstractVersionsReport.java
@@ -23,6 +23,7 @@ import java.util.Locale;
 import java.util.Map;
 import java.util.Set;
 
+import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager;
 import org.apache.maven.doxia.sink.Sink;
 import org.apache.maven.doxia.siterenderer.Renderer;
 import org.apache.maven.execution.MavenSession;
@@ -32,13 +33,13 @@ import org.apache.maven.plugins.annotations.Parameter;
 import org.apache.maven.project.MavenProject;
 import org.apache.maven.reporting.AbstractMavenReport;
 import org.apache.maven.reporting.MavenReportException;
-import org.apache.maven.repository.RepositorySystem;
 import org.apache.maven.wagon.Wagon;
 import org.codehaus.mojo.versions.api.DefaultVersionsHelper;
 import org.codehaus.mojo.versions.api.VersionsHelper;
 import org.codehaus.mojo.versions.model.RuleSet;
 import org.codehaus.mojo.versions.reporting.ReportRendererFactory;
 import org.codehaus.plexus.i18n.I18N;
+import org.eclipse.aether.RepositorySystem;
 
 /**
  * Base class for all versions reports.
@@ -55,7 +56,7 @@ public abstract class AbstractVersionsReport<T> extends AbstractMavenReport {
      */
     protected I18N i18n;
 
-    protected RepositorySystem repositorySystem;
+    protected ArtifactHandlerManager artifactHandlerManager;
 
     /**
      * Skip entire check.
@@ -66,9 +67,9 @@ public abstract class AbstractVersionsReport<T> extends AbstractMavenReport {
     private boolean skip;
 
     /**
-     * The (injected) {@link org.eclipse.aether.RepositorySystem aetherRepositorySystem} instance.
+     * The (injected) {@link RepositorySystem repositorySystem} instance.
      */
-    protected org.eclipse.aether.RepositorySystem aetherRepositorySystem;
+    protected RepositorySystem repositorySystem;
 
     /**
      * settings.xml's server id for the URL. This is used when wagon needs extra authentication information.
@@ -167,13 +168,13 @@ public abstract class AbstractVersionsReport<T> extends AbstractMavenReport {
 
     protected AbstractVersionsReport(
             I18N i18n,
+            ArtifactHandlerManager artifactHandlerManager,
             RepositorySystem repositorySystem,
-            org.eclipse.aether.RepositorySystem aetherRepositorySystem,
             Map<String, Wagon> wagonMap,
             ReportRendererFactory rendererFactory) {
         this.i18n = i18n;
+        this.artifactHandlerManager = artifactHandlerManager;
         this.repositorySystem = repositorySystem;
-        this.aetherRepositorySystem = aetherRepositorySystem;
         this.wagonMap = wagonMap;
         this.rendererFactory = rendererFactory;
     }
@@ -182,8 +183,8 @@ public abstract class AbstractVersionsReport<T> extends AbstractMavenReport {
         if (helper == null) {
             try {
                 helper = new DefaultVersionsHelper.Builder()
+                        .withArtifactHandlerManager(artifactHandlerManager)
                         .withRepositorySystem(repositorySystem)
-                        .withAetherRepositorySystem(aetherRepositorySystem)
                         .withWagonMap(wagonMap)
                         .withServerId(serverId)
                         .withRulesUri(rulesUri)
diff --git a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/AbstractVersionsUpdaterMojo.java b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/AbstractVersionsUpdaterMojo.java
index a3222a4c..9b318839 100644
--- a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/AbstractVersionsUpdaterMojo.java
+++ b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/AbstractVersionsUpdaterMojo.java
@@ -32,6 +32,7 @@ import java.util.Optional;
 import java.util.Set;
 
 import org.apache.maven.artifact.Artifact;
+import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager;
 import org.apache.maven.artifact.resolver.ArtifactResolutionException;
 import org.apache.maven.artifact.versioning.ArtifactVersion;
 import org.apache.maven.artifact.versioning.InvalidVersionSpecificationException;
@@ -43,7 +44,6 @@ import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.MojoFailureException;
 import org.apache.maven.plugins.annotations.Parameter;
 import org.apache.maven.project.MavenProject;
-import org.apache.maven.repository.RepositorySystem;
 import org.apache.maven.wagon.Wagon;
 import org.codehaus.mojo.versions.api.ArtifactVersions;
 import org.codehaus.mojo.versions.api.DefaultVersionsHelper;
@@ -61,6 +61,7 @@ import org.codehaus.plexus.util.FileUtils;
 import org.codehaus.plexus.util.IOUtil;
 import org.codehaus.plexus.util.WriterFactory;
 import org.codehaus.stax2.XMLInputFactory2;
+import org.eclipse.aether.RepositorySystem;
 
 /**
  * Abstract base class for Versions Mojos.
@@ -80,14 +81,14 @@ public abstract class AbstractVersionsUpdaterMojo extends AbstractMojo {
     protected MavenProject project;
 
     /**
-     * The (injected) {@link RepositorySystem} instance.
+     * The (injected) {@link ArtifactHandlerManager} instance.
      */
-    protected final RepositorySystem repositorySystem;
+    protected final ArtifactHandlerManager artifactHandlerManager;
 
     /**
      * The (injected) {@link org.eclipse.aether.RepositorySystem} instance.
      */
-    protected org.eclipse.aether.RepositorySystem aetherRepositorySystem;
+    protected RepositorySystem repositorySystem;
 
     /**
      * @since 1.0-alpha-1
@@ -203,12 +204,12 @@ public abstract class AbstractVersionsUpdaterMojo extends AbstractMojo {
 
     @Inject
     protected AbstractVersionsUpdaterMojo(
+            ArtifactHandlerManager artifactHandlerManager,
             RepositorySystem repositorySystem,
-            org.eclipse.aether.RepositorySystem aetherRepositorySystem,
             Map<String, Wagon> wagonMap,
             Map<String, ChangeRecorder> changeRecorders) {
+        this.artifactHandlerManager = artifactHandlerManager;
         this.repositorySystem = repositorySystem;
-        this.aetherRepositorySystem = aetherRepositorySystem;
         this.wagonMap = wagonMap;
         this.changeRecorders = changeRecorders;
     }
@@ -216,8 +217,8 @@ public abstract class AbstractVersionsUpdaterMojo extends AbstractMojo {
     public VersionsHelper getHelper() throws MojoExecutionException {
         if (helper == null) {
             helper = new DefaultVersionsHelper.Builder()
+                    .withArtifactHandlerManager(artifactHandlerManager)
                     .withRepositorySystem(repositorySystem)
-                    .withAetherRepositorySystem(aetherRepositorySystem)
                     .withWagonMap(wagonMap)
                     .withServerId(serverId)
                     .withRulesUri(rulesUri)
diff --git a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/CompareDependenciesMojo.java b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/CompareDependenciesMojo.java
index 53e92aa4..cb0c3f80 100644
--- a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/CompareDependenciesMojo.java
+++ b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/CompareDependenciesMojo.java
@@ -28,6 +28,7 @@ import java.util.List;
 import java.util.Map;
 
 import org.apache.maven.artifact.Artifact;
+import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager;
 import org.apache.maven.artifact.resolver.ArtifactResolutionException;
 import org.apache.maven.model.Dependency;
 import org.apache.maven.plugin.MojoExecutionException;
@@ -38,7 +39,6 @@ import org.apache.maven.project.MavenProject;
 import org.apache.maven.project.ProjectBuilder;
 import org.apache.maven.project.ProjectBuildingException;
 import org.apache.maven.project.ProjectBuildingResult;
-import org.apache.maven.repository.RepositorySystem;
 import org.apache.maven.wagon.Wagon;
 import org.codehaus.mojo.versions.api.ArtifactAssociation;
 import org.codehaus.mojo.versions.api.PomHelper;
@@ -49,6 +49,7 @@ import org.codehaus.mojo.versions.api.recording.ChangeRecorder;
 import org.codehaus.mojo.versions.api.recording.DependencyChangeRecord;
 import org.codehaus.mojo.versions.rewriting.ModifiedPomXMLEventReader;
 import org.codehaus.mojo.versions.utils.DependencyBuilder;
+import org.eclipse.aether.RepositorySystem;
 
 import static java.util.Collections.singletonList;
 
@@ -124,12 +125,12 @@ public class CompareDependenciesMojo extends AbstractVersionsDependencyUpdaterMo
 
     @Inject
     public CompareDependenciesMojo(
+            ArtifactHandlerManager artifactHandlerManager,
             RepositorySystem repositorySystem,
-            org.eclipse.aether.RepositorySystem aetherRepositorySystem,
             Map<String, Wagon> wagonMap,
             ProjectBuilder projectBuilder,
             Map<String, ChangeRecorder> changeRecorders) {
-        super(repositorySystem, aetherRepositorySystem, wagonMap, changeRecorders);
+        super(artifactHandlerManager, repositorySystem, wagonMap, changeRecorders);
         this.projectBuilder = projectBuilder;
     }
 
diff --git a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/DependencyUpdatesAggregateReportMojo.java b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/DependencyUpdatesAggregateReportMojo.java
index d7736aa5..14d2928a 100644
--- a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/DependencyUpdatesAggregateReportMojo.java
+++ b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/DependencyUpdatesAggregateReportMojo.java
@@ -22,16 +22,17 @@ import javax.inject.Inject;
 import java.util.Map;
 import java.util.Set;
 
+import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager;
 import org.apache.maven.model.Dependency;
 import org.apache.maven.plugins.annotations.Mojo;
 import org.apache.maven.plugins.annotations.ResolutionScope;
 import org.apache.maven.project.MavenProject;
 import org.apache.maven.reporting.MavenReportException;
-import org.apache.maven.repository.RepositorySystem;
 import org.apache.maven.wagon.Wagon;
 import org.codehaus.mojo.versions.reporting.ReportRendererFactory;
 import org.codehaus.mojo.versions.reporting.util.AggregateReportUtils;
 import org.codehaus.plexus.i18n.I18N;
+import org.eclipse.aether.RepositorySystem;
 
 /**
  * Generates an aggregate report of available updates for the dependencies of a project.
@@ -48,11 +49,11 @@ public class DependencyUpdatesAggregateReportMojo extends AbstractDependencyUpda
     @Inject
     protected DependencyUpdatesAggregateReportMojo(
             I18N i18n,
+            ArtifactHandlerManager artifactHandlerManager,
             RepositorySystem repositorySystem,
-            org.eclipse.aether.RepositorySystem aetherRepositorySystem,
             Map<String, Wagon> wagonMap,
             ReportRendererFactory rendererFactory) {
-        super(i18n, repositorySystem, aetherRepositorySystem, wagonMap, rendererFactory);
+        super(i18n, artifactHandlerManager, repositorySystem, wagonMap, rendererFactory);
     }
 
     /**
diff --git a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/DependencyUpdatesReportMojo.java b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/DependencyUpdatesReportMojo.java
index 76e49a36..f9ee65b2 100644
--- a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/DependencyUpdatesReportMojo.java
+++ b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/DependencyUpdatesReportMojo.java
@@ -24,14 +24,15 @@ import javax.inject.Inject;
 import java.util.Map;
 import java.util.Set;
 
+import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager;
 import org.apache.maven.model.Dependency;
 import org.apache.maven.plugins.annotations.Mojo;
 import org.apache.maven.plugins.annotations.ResolutionScope;
 import org.apache.maven.reporting.MavenReportException;
-import org.apache.maven.repository.RepositorySystem;
 import org.apache.maven.wagon.Wagon;
 import org.codehaus.mojo.versions.reporting.ReportRendererFactory;
 import org.codehaus.plexus.i18n.I18N;
+import org.eclipse.aether.RepositorySystem;
 
 /**
  * Generates a report of available updates for the dependencies of a project.
@@ -45,11 +46,11 @@ public class DependencyUpdatesReportMojo extends AbstractDependencyUpdatesReport
     @Inject
     protected DependencyUpdatesReportMojo(
             I18N i18n,
+            ArtifactHandlerManager artifactHandlerManager,
             RepositorySystem repositorySystem,
-            org.eclipse.aether.RepositorySystem aetherRepositorySystem,
             Map<String, Wagon> wagonMap,
             ReportRendererFactory rendererFactory) {
-        super(i18n, repositorySystem, aetherRepositorySystem, wagonMap, rendererFactory);
+        super(i18n, artifactHandlerManager, repositorySystem, wagonMap, rendererFactory);
     }
 
     /**
diff --git a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/DisplayDependencyUpdatesMojo.java b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/DisplayDependencyUpdatesMojo.java
index 31be5b33..8aedaa4d 100644
--- a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/DisplayDependencyUpdatesMojo.java
+++ b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/DisplayDependencyUpdatesMojo.java
@@ -30,6 +30,7 @@ import java.util.Set;
 import java.util.TreeSet;
 
 import org.apache.maven.artifact.ArtifactUtils;
+import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager;
 import org.apache.maven.artifact.versioning.ArtifactVersion;
 import org.apache.maven.artifact.versioning.Restriction;
 import org.apache.maven.model.Dependency;
@@ -37,7 +38,6 @@ import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.MojoFailureException;
 import org.apache.maven.plugins.annotations.Mojo;
 import org.apache.maven.plugins.annotations.Parameter;
-import org.apache.maven.repository.RepositorySystem;
 import org.apache.maven.wagon.Wagon;
 import org.codehaus.mojo.versions.api.ArtifactVersions;
 import org.codehaus.mojo.versions.api.Segment;
@@ -49,6 +49,7 @@ import org.codehaus.mojo.versions.rewriting.ModifiedPomXMLEventReader;
 import org.codehaus.mojo.versions.utils.DependencyComparator;
 import org.codehaus.mojo.versions.utils.SegmentUtils;
 import org.codehaus.plexus.util.StringUtils;
+import org.eclipse.aether.RepositorySystem;
 
 import static java.util.Collections.emptySet;
 import static java.util.Optional.empty;
@@ -327,11 +328,11 @@ public class DisplayDependencyUpdatesMojo extends AbstractVersionsDisplayMojo {
 
     @Inject
     public DisplayDependencyUpdatesMojo(
+            ArtifactHandlerManager artifactHandlerManager,
             RepositorySystem repositorySystem,
-            org.eclipse.aether.RepositorySystem aetherRepositorySystem,
             Map<String, Wagon> wagonMap,
             Map<String, ChangeRecorder> changeRecorders) {
-        super(repositorySystem, aetherRepositorySystem, wagonMap, changeRecorders);
+        super(artifactHandlerManager, repositorySystem, wagonMap, changeRecorders);
     }
 
     // open for tests
diff --git a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/DisplayExtensionUpdatesMojo.java b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/DisplayExtensionUpdatesMojo.java
index 0df6e166..663cbc05 100644
--- a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/DisplayExtensionUpdatesMojo.java
+++ b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/DisplayExtensionUpdatesMojo.java
@@ -31,6 +31,7 @@ import java.util.stream.Collectors;
 import java.util.stream.Stream;
 
 import org.apache.maven.artifact.ArtifactUtils;
+import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager;
 import org.apache.maven.artifact.versioning.ArtifactVersion;
 import org.apache.maven.model.Build;
 import org.apache.maven.model.Dependency;
@@ -40,7 +41,6 @@ import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.MojoFailureException;
 import org.apache.maven.plugins.annotations.Mojo;
 import org.apache.maven.plugins.annotations.Parameter;
-import org.apache.maven.repository.RepositorySystem;
 import org.apache.maven.wagon.Wagon;
 import org.codehaus.mojo.versions.api.ArtifactVersions;
 import org.codehaus.mojo.versions.api.PomHelper;
@@ -57,6 +57,7 @@ import org.codehaus.mojo.versions.utils.ModelNode;
 import org.codehaus.mojo.versions.utils.SegmentUtils;
 import org.codehaus.plexus.util.StringUtils;
 import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
+import org.eclipse.aether.RepositorySystem;
 
 import static java.util.Optional.of;
 import static org.codehaus.mojo.versions.api.Segment.MAJOR;
@@ -172,11 +173,11 @@ public class DisplayExtensionUpdatesMojo extends AbstractVersionsDisplayMojo {
 
     @Inject
     public DisplayExtensionUpdatesMojo(
+            ArtifactHandlerManager artifactHandlerManager,
             RepositorySystem repositorySystem,
-            org.eclipse.aether.RepositorySystem aetherRepositorySystem,
             Map<String, Wagon> wagonMap,
             Map<String, ChangeRecorder> changeRecorders) {
-        super(repositorySystem, aetherRepositorySystem, wagonMap, changeRecorders);
+        super(artifactHandlerManager, repositorySystem, wagonMap, changeRecorders);
     }
 
     @Override
diff --git a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/DisplayParentUpdatesMojo.java b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/DisplayParentUpdatesMojo.java
index bafe124e..b8ca91b1 100644
--- a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/DisplayParentUpdatesMojo.java
+++ b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/DisplayParentUpdatesMojo.java
@@ -28,6 +28,7 @@ import java.util.Optional;
 import java.util.stream.Collectors;
 
 import org.apache.maven.artifact.Artifact;
+import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager;
 import org.apache.maven.artifact.versioning.ArtifactVersion;
 import org.apache.maven.artifact.versioning.InvalidVersionSpecificationException;
 import org.apache.maven.artifact.versioning.VersionRange;
@@ -35,7 +36,6 @@ import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.MojoFailureException;
 import org.apache.maven.plugins.annotations.Mojo;
 import org.apache.maven.plugins.annotations.Parameter;
-import org.apache.maven.repository.RepositorySystem;
 import org.apache.maven.wagon.Wagon;
 import org.codehaus.mojo.versions.api.ArtifactVersions;
 import org.codehaus.mojo.versions.api.Segment;
@@ -46,6 +46,7 @@ import org.codehaus.mojo.versions.rewriting.ModifiedPomXMLEventReader;
 import org.codehaus.mojo.versions.utils.DefaultArtifactVersionCache;
 import org.codehaus.mojo.versions.utils.DependencyBuilder;
 import org.codehaus.mojo.versions.utils.SegmentUtils;
+import org.eclipse.aether.RepositorySystem;
 
 import static org.apache.commons.lang3.StringUtils.isBlank;
 
@@ -134,11 +135,11 @@ public class DisplayParentUpdatesMojo extends AbstractVersionsDisplayMojo {
 
     @Inject
     public DisplayParentUpdatesMojo(
+            ArtifactHandlerManager artifactHandlerManager,
             RepositorySystem repositorySystem,
-            org.eclipse.aether.RepositorySystem aetherRepositorySystem,
             Map<String, Wagon> wagonMap,
             Map<String, ChangeRecorder> changeRecorders) {
-        super(repositorySystem, aetherRepositorySystem, wagonMap, changeRecorders);
+        super(artifactHandlerManager, repositorySystem, wagonMap, changeRecorders);
     }
 
     @Override
diff --git a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/DisplayPluginUpdatesMojo.java b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/DisplayPluginUpdatesMojo.java
index a7441b97..3b0ba75e 100644
--- a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/DisplayPluginUpdatesMojo.java
+++ b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/DisplayPluginUpdatesMojo.java
@@ -49,6 +49,7 @@ import org.apache.commons.lang3.tuple.ImmutablePair;
 import org.apache.commons.lang3.tuple.Pair;
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.artifact.ArtifactUtils;
+import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager;
 import org.apache.maven.artifact.resolver.ArtifactResolutionException;
 import org.apache.maven.artifact.versioning.ArtifactVersion;
 import org.apache.maven.lifecycle.LifecycleExecutor;
@@ -74,7 +75,6 @@ import org.apache.maven.project.MavenProject;
 import org.apache.maven.project.ProjectBuilder;
 import org.apache.maven.project.ProjectBuildingException;
 import org.apache.maven.project.ProjectBuildingResult;
-import org.apache.maven.repository.RepositorySystem;
 import org.apache.maven.rtinfo.RuntimeInformation;
 import org.apache.maven.wagon.Wagon;
 import org.codehaus.mojo.versions.api.PomHelper;
@@ -87,6 +87,7 @@ import org.codehaus.mojo.versions.utils.DependencyBuilder;
 import org.codehaus.mojo.versions.utils.PluginComparator;
 import org.codehaus.plexus.util.IOUtil;
 import org.codehaus.plexus.util.ReaderFactory;
+import org.eclipse.aether.RepositorySystem;
 
 import static java.util.Collections.emptyMap;
 import static java.util.Optional.ofNullable;
@@ -164,15 +165,15 @@ public class DisplayPluginUpdatesMojo extends AbstractVersionsDisplayMojo {
     @Inject
     @SuppressWarnings("checkstyle:ParameterNumber")
     public DisplayPluginUpdatesMojo(
+            ArtifactHandlerManager artifactHandlerManager,
             RepositorySystem repositorySystem,
-            org.eclipse.aether.RepositorySystem aetherRepositorySystem,
             ProjectBuilder projectBuilder,
             Map<String, Wagon> wagonMap,
             LifecycleExecutor lifecycleExecutor,
             ModelInterpolator modelInterpolator,
             RuntimeInformation runtimeInformation,
             Map<String, ChangeRecorder> changeRecorders) {
-        super(repositorySystem, aetherRepositorySystem, wagonMap, changeRecorders);
+        super(artifactHandlerManager, repositorySystem, wagonMap, changeRecorders);
         this.projectBuilder = projectBuilder;
         this.lifecycleExecutor = lifecycleExecutor;
         this.modelInterpolator = modelInterpolator;
diff --git a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/DisplayPropertyUpdatesMojo.java b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/DisplayPropertyUpdatesMojo.java
index b0d6af68..24990148 100644
--- a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/DisplayPropertyUpdatesMojo.java
+++ b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/DisplayPropertyUpdatesMojo.java
@@ -27,6 +27,7 @@ import java.util.Map;
 import java.util.Optional;
 import java.util.TreeSet;
 
+import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager;
 import org.apache.maven.artifact.versioning.ArtifactVersion;
 import org.apache.maven.artifact.versioning.InvalidVersionSpecificationException;
 import org.apache.maven.plugin.MojoExecutionException;
@@ -34,7 +35,6 @@ import org.apache.maven.plugin.MojoFailureException;
 import org.apache.maven.plugin.logging.Log;
 import org.apache.maven.plugins.annotations.Mojo;
 import org.apache.maven.plugins.annotations.Parameter;
-import org.apache.maven.repository.RepositorySystem;
 import org.apache.maven.wagon.Wagon;
 import org.codehaus.mojo.versions.api.Property;
 import org.codehaus.mojo.versions.api.PropertyVersions;
@@ -43,6 +43,7 @@ import org.codehaus.mojo.versions.api.VersionsHelper;
 import org.codehaus.mojo.versions.api.recording.ChangeRecorder;
 import org.codehaus.mojo.versions.ordering.InvalidSegmentException;
 import org.codehaus.mojo.versions.rewriting.ModifiedPomXMLEventReader;
+import org.eclipse.aether.RepositorySystem;
 
 import static java.util.Optional.empty;
 import static java.util.Optional.of;
@@ -144,11 +145,11 @@ public class DisplayPropertyUpdatesMojo extends AbstractVersionsDisplayMojo {
 
     @Inject
     public DisplayPropertyUpdatesMojo(
+            ArtifactHandlerManager artifactHandlerManager,
             RepositorySystem repositorySystem,
-            org.eclipse.aether.RepositorySystem aetherRepositorySystem,
             Map<String, Wagon> wagonMap,
             Map<String, ChangeRecorder> changeRecorders) {
-        super(repositorySystem, aetherRepositorySystem, wagonMap, changeRecorders);
+        super(artifactHandlerManager, repositorySystem, wagonMap, changeRecorders);
     }
 
     public void execute() throws MojoExecutionException, MojoFailureException {
diff --git a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/DynamicVersioningSCMPlugin.java b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/DynamicVersioningSCMPlugin.java
new file mode 100644
index 00000000..bde84f1d
--- /dev/null
+++ b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/DynamicVersioningSCMPlugin.java
@@ -0,0 +1,240 @@
+package org.codehaus.mojo.versions;
+
+/*
+ * Copyright MojoHaus and Contributors
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+import java.io.File;
+import java.io.IOException;
+import java.util.Comparator;
+import java.util.List;
+import java.util.Optional;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import java.util.stream.Collectors;
+
+import org.apache.maven.artifact.versioning.ComparableVersion;
+import org.apache.maven.plugin.AbstractMojo;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugins.annotations.LifecyclePhase;
+import org.apache.maven.plugins.annotations.Mojo;
+import org.apache.maven.plugins.annotations.Parameter;
+import org.apache.maven.project.MavenProject;
+import org.eclipse.jgit.api.Git;
+import org.eclipse.jgit.api.errors.GitAPIException;
+import org.eclipse.jgit.lib.ObjectId;
+import org.eclipse.jgit.lib.Ref;
+import org.eclipse.jgit.lib.Repository;
+import org.eclipse.jgit.revwalk.RevCommit;
+import org.eclipse.jgit.revwalk.RevWalk;
+import org.eclipse.jgit.storage.file.FileRepositoryBuilder;
+
+/**
+ * Maven plugin that uses SCM/VCS to enable dynamic versioning based on your
+ * version control system. Goal will set the version in a property.
+ *
+ * @author Jimisola Laursen
+ * @since 2.17.0
+ */
+@Mojo(name = "use-dynamic-version-from-scm", defaultPhase = LifecyclePhase.INITIALIZE)
+public class DynamicVersioningSCMPlugin extends AbstractMojo {
+
+    /**
+     * The Maven Project Object
+     *
+     * @since 2.17.0
+     */
+    @Parameter(defaultValue = "${project}", readonly = true, required = true)
+    private MavenProject project;
+
+    /**
+     * The name of the property that will contain the resolved version.
+     *
+     * @since 2.17.0
+     */
+    @Parameter(property = "propertyName", defaultValue = "revision")
+    protected String propertyName;
+
+    /**
+     * Whether the SNAPSHOT qualifier shall be apppended or not.
+     *
+     * @since 2.17.0
+     */
+    @Parameter(property = "appendSnapshot", defaultValue = "true")
+    protected boolean appendSnapshot;
+
+    /**
+     * Use this version instead of resolving from SCM tag information.
+     *
+     * @since 2.17.0
+     */
+    @Parameter(property = "useVersion")
+    protected String useVersion;
+
+    /**
+     * The default version used when SCM repository has no commit or no version
+     * tag.
+     *
+     * @since 2.17.0
+     */
+    @Parameter(property = "defaultVersion", defaultValue = "0.0.1")
+    protected String defaultVersion;
+
+    // standard semantic versioning with an optional 'v' prefix
+    protected static final Pattern TAG_VERSION_PATTERN = Pattern.compile("refs/tags/(?:v)?((\\d+\\.\\d+\\.\\d+)(.*))");
+
+    public void execute() throws MojoExecutionException {
+        // limit JGits excessive logging
+        Logger.getLogger("org.eclipse.jgit").setLevel(Level.INFO);
+
+        VersionInformation vi;
+
+        Optional<String> mayBeVersion = Optional.ofNullable(useVersion);
+
+        if (mayBeVersion.isPresent()) {
+            vi = new VersionInformation(mayBeVersion.get());
+        } else {
+            vi = getVersionFromSCM();
+        }
+
+        project.getProperties().setProperty(propertyName, vi.toString());
+        getLog().info("Property '" + propertyName + "' set to: "
+                + project.getProperties().getProperty(propertyName));
+    }
+
+    /**
+     * Returns the resolved version based on SCM tag information for use with Maven
+     * CI.
+     *
+     * @throws org.apache.maven.plugin.MojoExecutionException Something wrong with
+     *                                                        the
+     *                                                        plugin itself
+     */
+    protected VersionInformation getVersionFromSCM() throws MojoExecutionException {
+        // check for repository
+        try (Repository repository = new FileRepositoryBuilder()
+                .setGitDir(new File(".git"))
+                .readEnvironment() // scan environment GIT_* variables
+                .findGitDir() // scan up the file system tree
+                .build(); ) {
+
+            if (repository.getDirectory() == null) {
+                throw new MojoExecutionException("Directory is not an SCM repository.");
+            }
+
+            // check for latest commit
+            RevCommit latestCommit = getLatestCommit(repository);
+
+            return getVersionFromCommit(repository, latestCommit);
+        } catch (IOException e) {
+            throw new MojoExecutionException("Error reading Git information.", e);
+        }
+    }
+
+    protected RevCommit getLatestCommit(Repository repository) throws MojoExecutionException {
+        try (RevWalk revWalk = new RevWalk(repository)) {
+            ObjectId head = repository.resolve("HEAD");
+
+            if (head == null) {
+                throw new MojoExecutionException("SCM repo has no head/commits.");
+            }
+
+            return revWalk.parseCommit(head);
+        } catch (IOException e) {
+            throw new MojoExecutionException("SCM repo most likely has no commits.", e);
+        }
+    }
+
+    protected VersionInformation getVersionFromCommit(Repository repository, RevCommit latestCommit)
+            throws MojoExecutionException {
+
+        try (Git git = Git.wrap(repository)) {
+
+            List<String> versionTags = getVersionedTagsForCommit(git, latestCommit);
+
+            Optional<VersionInformation> ovi = findHighestVersion(versionTags);
+
+            // latest commit has version tag(s), we use the highest one
+            if (ovi.isPresent()) {
+                return ovi.get();
+            }
+
+            Iterable<RevCommit> commits = git.log().call();
+            int count = 0;
+            for (RevCommit commit : commits) {
+                count++;
+
+                versionTags = getVersionedTagsForCommit(git, commit);
+
+                ovi = findHighestVersion(versionTags);
+
+                if (ovi.isPresent()) {
+                    VersionInformation vi = ovi.get();
+
+                    vi.setPatch(vi.getPatch() + 1);
+                    vi.setBuildNumber(count);
+
+                    return addSnapshotQualifier(vi);
+                }
+            }
+
+            // no version tags in repository
+            return addSnapshotQualifier(new VersionInformation(defaultVersion + "-" + count));
+
+        } catch (GitAPIException e) {
+            throw new MojoExecutionException("Error reading Git information.", e);
+        }
+    }
+
+    protected Optional<VersionInformation> findHighestVersion(List<String> versionTags) {
+        Optional<String> highestVersionString = versionTags.stream().max(this.new VersionComparator());
+
+        return highestVersionString.map(VersionInformation::new);
+    }
+
+    protected List<String> getVersionedTagsForCommit(Git git, RevCommit commit) throws GitAPIException {
+        // get tags directly associated with the commit
+        return git.tagList().call().stream()
+                .filter(tag -> tag.getObjectId().equals(commit.getId()))
+                .map(Ref::getName)
+                .filter(tagName -> {
+                    Matcher matcher = TAG_VERSION_PATTERN.matcher(tagName);
+                    return matcher.matches() && matcher.groupCount() > 0;
+                })
+                .map(tagName -> {
+                    Matcher matcher = TAG_VERSION_PATTERN.matcher(tagName);
+                    matcher.matches();
+                    return matcher.group(1);
+                })
+                .collect(Collectors.toList());
+    }
+
+    protected VersionInformation addSnapshotQualifier(VersionInformation vi) {
+        if (appendSnapshot) {
+            vi.setQualifier("SNAPSHOT");
+        }
+
+        return vi;
+    }
+
+    protected class VersionComparator implements Comparator<String> {
+
+        @Override
+        public int compare(String version1, String version2) {
+            return new ComparableVersion(version1).compareTo(new ComparableVersion(version2));
+        }
+    }
+}
diff --git a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/ForceReleasesMojo.java b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/ForceReleasesMojo.java
index 9586923a..a9d5c0a4 100644
--- a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/ForceReleasesMojo.java
+++ b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/ForceReleasesMojo.java
@@ -24,6 +24,7 @@ import java.util.Map;
 import java.util.regex.Matcher;
 
 import org.apache.maven.artifact.Artifact;
+import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager;
 import org.apache.maven.artifact.versioning.ArtifactVersion;
 import org.apache.maven.artifact.versioning.VersionRange;
 import org.apache.maven.model.Dependency;
@@ -32,7 +33,6 @@ import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.MojoFailureException;
 import org.apache.maven.plugins.annotations.Mojo;
 import org.apache.maven.plugins.annotations.Parameter;
-import org.apache.maven.repository.RepositorySystem;
 import org.apache.maven.wagon.Wagon;
 import org.codehaus.mojo.versions.api.ArtifactVersions;
 import org.codehaus.mojo.versions.api.PomHelper;
@@ -40,6 +40,7 @@ import org.codehaus.mojo.versions.api.VersionRetrievalException;
 import org.codehaus.mojo.versions.api.recording.ChangeRecorder;
 import org.codehaus.mojo.versions.api.recording.DependencyChangeRecord;
 import org.codehaus.mojo.versions.rewriting.ModifiedPomXMLEventReader;
+import org.eclipse.aether.RepositorySystem;
 
 import static java.util.Collections.singletonList;
 
@@ -63,11 +64,11 @@ public class ForceReleasesMojo extends AbstractVersionsDependencyUpdaterMojo {
 
     @Inject
     public ForceReleasesMojo(
+            ArtifactHandlerManager artifactHandlerManager,
             RepositorySystem repositorySystem,
-            org.eclipse.aether.RepositorySystem aetherRepositorySystem,
             Map<String, Wagon> wagonMap,
             Map<String, ChangeRecorder> changeRecorders) {
-        super(repositorySystem, aetherRepositorySystem, wagonMap, changeRecorders);
+        super(artifactHandlerManager, repositorySystem, wagonMap, changeRecorders);
     }
 
     /**
diff --git a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/LockSnapshotsMojo.java b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/LockSnapshotsMojo.java
index d790340a..d00151b8 100644
--- a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/LockSnapshotsMojo.java
+++ b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/LockSnapshotsMojo.java
@@ -31,18 +31,19 @@ import java.util.regex.Pattern;
 
 import org.apache.maven.RepositoryUtils;
 import org.apache.maven.artifact.Artifact;
+import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager;
 import org.apache.maven.model.Dependency;
 import org.apache.maven.model.DependencyManagement;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.MojoFailureException;
 import org.apache.maven.plugins.annotations.Mojo;
 import org.apache.maven.project.MavenProject;
-import org.apache.maven.repository.RepositorySystem;
 import org.apache.maven.wagon.Wagon;
 import org.codehaus.mojo.versions.api.PomHelper;
 import org.codehaus.mojo.versions.api.VersionsHelper;
 import org.codehaus.mojo.versions.api.recording.ChangeRecorder;
 import org.codehaus.mojo.versions.rewriting.ModifiedPomXMLEventReader;
+import org.eclipse.aether.RepositorySystem;
 import org.eclipse.aether.resolution.VersionRequest;
 import org.eclipse.aether.resolution.VersionResolutionException;
 import org.eclipse.aether.resolution.VersionResult;
@@ -70,11 +71,11 @@ public class LockSnapshotsMojo extends AbstractVersionsDependencyUpdaterMojo {
 
     @Inject
     public LockSnapshotsMojo(
+            ArtifactHandlerManager artifactHandlerManager,
             RepositorySystem repositorySystem,
-            org.eclipse.aether.RepositorySystem aetherRepositorySystem,
             Map<String, Wagon> wagonMap,
             Map<String, ChangeRecorder> changeRecorders) {
-        super(repositorySystem, aetherRepositorySystem, wagonMap, changeRecorders);
+        super(artifactHandlerManager, repositorySystem, wagonMap, changeRecorders);
     }
 
     /**
@@ -180,7 +181,7 @@ public class LockSnapshotsMojo extends AbstractVersionsDependencyUpdaterMojo {
      */
     private Optional<String> resolveSnapshotVersion(Artifact artifact) throws VersionResolutionException {
         getLog().debug("Resolving snapshot version for artifact: " + artifact);
-        VersionResult versionResult = aetherRepositorySystem.resolveVersion(
+        VersionResult versionResult = repositorySystem.resolveVersion(
                 session.getRepositorySession(),
                 new VersionRequest(
                         RepositoryUtils.toArtifact(artifact),
diff --git a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/ParentUpdatesReportMojo.java b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/ParentUpdatesReportMojo.java
index 6e46c6f2..3e33ff44 100644
--- a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/ParentUpdatesReportMojo.java
+++ b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/ParentUpdatesReportMojo.java
@@ -25,13 +25,13 @@ import java.util.List;
 import java.util.Locale;
 import java.util.Map;
 
+import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager;
 import org.apache.maven.doxia.sink.Sink;
 import org.apache.maven.plugins.annotations.Mojo;
 import org.apache.maven.plugins.annotations.Parameter;
 import org.apache.maven.plugins.annotations.ResolutionScope;
 import org.apache.maven.project.MavenProject;
 import org.apache.maven.reporting.MavenReportException;
-import org.apache.maven.repository.RepositorySystem;
 import org.apache.maven.wagon.Wagon;
 import org.codehaus.mojo.versions.api.ArtifactVersions;
 import org.codehaus.mojo.versions.api.VersionRetrievalException;
@@ -39,6 +39,7 @@ import org.codehaus.mojo.versions.reporting.ReportRendererFactory;
 import org.codehaus.mojo.versions.reporting.model.ParentUpdatesModel;
 import org.codehaus.mojo.versions.utils.DependencyBuilder;
 import org.codehaus.plexus.i18n.I18N;
+import org.eclipse.aether.RepositorySystem;
 
 /**
  * Generates a report on available updates for parent artifacts
@@ -54,11 +55,11 @@ public class ParentUpdatesReportMojo extends AbstractVersionsReport<ParentUpdate
     @Inject
     protected ParentUpdatesReportMojo(
             I18N i18n,
+            ArtifactHandlerManager artifactHandlerManager,
             RepositorySystem repositorySystem,
-            org.eclipse.aether.RepositorySystem aetherRepositorySystem,
             Map<String, Wagon> wagonMap,
             ReportRendererFactory rendererFactory) {
-        super(i18n, repositorySystem, aetherRepositorySystem, wagonMap, rendererFactory);
+        super(i18n, artifactHandlerManager, repositorySystem, wagonMap, rendererFactory);
     }
 
     /**
diff --git a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/PluginUpdatesAggregateReportMojo.java b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/PluginUpdatesAggregateReportMojo.java
index f11468c4..7f814dc5 100644
--- a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/PluginUpdatesAggregateReportMojo.java
+++ b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/PluginUpdatesAggregateReportMojo.java
@@ -22,15 +22,16 @@ import javax.inject.Inject;
 import java.util.Map;
 import java.util.Set;
 
+import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager;
 import org.apache.maven.model.Plugin;
 import org.apache.maven.plugins.annotations.Mojo;
 import org.apache.maven.plugins.annotations.ResolutionScope;
 import org.apache.maven.project.MavenProject;
-import org.apache.maven.repository.RepositorySystem;
 import org.apache.maven.wagon.Wagon;
 import org.codehaus.mojo.versions.reporting.ReportRendererFactory;
 import org.codehaus.mojo.versions.reporting.util.AggregateReportUtils;
 import org.codehaus.plexus.i18n.I18N;
+import org.eclipse.aether.RepositorySystem;
 
 /**
  * Generates an aggregated report of available updates for the plugins of a project.
@@ -47,11 +48,11 @@ public class PluginUpdatesAggregateReportMojo extends AbstractPluginUpdatesRepor
     @Inject
     protected PluginUpdatesAggregateReportMojo(
             I18N i18n,
+            ArtifactHandlerManager artifactHandlerManager,
             RepositorySystem repositorySystem,
-            org.eclipse.aether.RepositorySystem aetherRepositorySystem,
             Map<String, Wagon> wagonMap,
             ReportRendererFactory rendererFactory) {
-        super(i18n, repositorySystem, aetherRepositorySystem, wagonMap, rendererFactory);
+        super(i18n, artifactHandlerManager, repositorySystem, wagonMap, rendererFactory);
     }
 
     @Override
diff --git a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/PluginUpdatesReportMojo.java b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/PluginUpdatesReportMojo.java
index f1cf564a..87fbfc7d 100644
--- a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/PluginUpdatesReportMojo.java
+++ b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/PluginUpdatesReportMojo.java
@@ -24,13 +24,14 @@ import javax.inject.Inject;
 import java.util.Map;
 import java.util.Set;
 
+import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager;
 import org.apache.maven.model.Plugin;
 import org.apache.maven.plugins.annotations.Mojo;
 import org.apache.maven.plugins.annotations.ResolutionScope;
-import org.apache.maven.repository.RepositorySystem;
 import org.apache.maven.wagon.Wagon;
 import org.codehaus.mojo.versions.reporting.ReportRendererFactory;
 import org.codehaus.plexus.i18n.I18N;
+import org.eclipse.aether.RepositorySystem;
 
 /**
  * Generates a report of available updates for the plugins of a project.
@@ -44,11 +45,11 @@ public class PluginUpdatesReportMojo extends AbstractPluginUpdatesReportMojo {
     @Inject
     protected PluginUpdatesReportMojo(
             I18N i18n,
+            ArtifactHandlerManager artifactHandlerManager,
             RepositorySystem repositorySystem,
-            org.eclipse.aether.RepositorySystem aetherRepositorySystem,
             Map<String, Wagon> wagonMap,
             ReportRendererFactory rendererFactory) {
-        super(i18n, repositorySystem, aetherRepositorySystem, wagonMap, rendererFactory);
+        super(i18n, artifactHandlerManager, repositorySystem, wagonMap, rendererFactory);
     }
 
     /**
diff --git a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/PropertyUpdatesAggregateReportMojo.java b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/PropertyUpdatesAggregateReportMojo.java
index 7230ecf9..61e96b4e 100644
--- a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/PropertyUpdatesAggregateReportMojo.java
+++ b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/PropertyUpdatesAggregateReportMojo.java
@@ -21,12 +21,12 @@ import javax.inject.Inject;
 
 import java.util.Map;
 
+import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugins.annotations.Mojo;
 import org.apache.maven.plugins.annotations.ResolutionScope;
 import org.apache.maven.project.MavenProject;
 import org.apache.maven.reporting.MavenReportException;
-import org.apache.maven.repository.RepositorySystem;
 import org.apache.maven.wagon.Wagon;
 import org.codehaus.mojo.versions.api.Property;
 import org.codehaus.mojo.versions.api.PropertyVersions;
@@ -34,6 +34,7 @@ import org.codehaus.mojo.versions.api.VersionsHelper;
 import org.codehaus.mojo.versions.reporting.ReportRendererFactory;
 import org.codehaus.mojo.versions.reporting.util.AggregateReportUtils;
 import org.codehaus.plexus.i18n.I18N;
+import org.eclipse.aether.RepositorySystem;
 
 /**
  * Generates an aggregate report of available updates for properties of a project which are linked to the dependencies
@@ -51,11 +52,11 @@ public class PropertyUpdatesAggregateReportMojo extends AbstractPropertyUpdatesR
     @Inject
     protected PropertyUpdatesAggregateReportMojo(
             I18N i18n,
+            ArtifactHandlerManager artifactHandlerManager,
             RepositorySystem repositorySystem,
-            org.eclipse.aether.RepositorySystem aetherRepositorySystem,
             Map<String, Wagon> wagonMap,
             ReportRendererFactory rendererFactory) {
-        super(i18n, repositorySystem, aetherRepositorySystem, wagonMap, rendererFactory);
+        super(i18n, artifactHandlerManager, repositorySystem, wagonMap, rendererFactory);
     }
 
     /**
diff --git a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/PropertyUpdatesReportMojo.java b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/PropertyUpdatesReportMojo.java
index 715616d4..6d55e136 100644
--- a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/PropertyUpdatesReportMojo.java
+++ b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/PropertyUpdatesReportMojo.java
@@ -23,16 +23,17 @@ import javax.inject.Inject;
 
 import java.util.Map;
 
+import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugins.annotations.Mojo;
 import org.apache.maven.plugins.annotations.ResolutionScope;
 import org.apache.maven.reporting.MavenReportException;
-import org.apache.maven.repository.RepositorySystem;
 import org.apache.maven.wagon.Wagon;
 import org.codehaus.mojo.versions.api.Property;
 import org.codehaus.mojo.versions.api.PropertyVersions;
 import org.codehaus.mojo.versions.reporting.ReportRendererFactory;
 import org.codehaus.plexus.i18n.I18N;
+import org.eclipse.aether.RepositorySystem;
 
 /**
  * Generates a report of available updates for properties of a project which are linked to the dependencies and/or
@@ -46,11 +47,11 @@ public class PropertyUpdatesReportMojo extends AbstractPropertyUpdatesReportMojo
     @Inject
     protected PropertyUpdatesReportMojo(
             I18N i18n,
+            ArtifactHandlerManager artifactHandlerManager,
             RepositorySystem repositorySystem,
-            org.eclipse.aether.RepositorySystem aetherRepositorySystem,
             Map<String, Wagon> wagonMap,
             ReportRendererFactory rendererFactory) {
-        super(i18n, repositorySystem, aetherRepositorySystem, wagonMap, rendererFactory);
+        super(i18n, artifactHandlerManager, repositorySystem, wagonMap, rendererFactory);
     }
 
     /**
diff --git a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/ResolveRangesMojo.java b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/ResolveRangesMojo.java
index d04db894..8b12b5ca 100644
--- a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/ResolveRangesMojo.java
+++ b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/ResolveRangesMojo.java
@@ -30,6 +30,7 @@ import java.util.regex.Pattern;
 
 import org.apache.commons.lang3.StringUtils;
 import org.apache.maven.artifact.Artifact;
+import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager;
 import org.apache.maven.artifact.versioning.ArtifactVersion;
 import org.apache.maven.artifact.versioning.InvalidVersionSpecificationException;
 import org.apache.maven.model.Dependency;
@@ -38,7 +39,6 @@ import org.apache.maven.plugin.MojoFailureException;
 import org.apache.maven.plugin.logging.Log;
 import org.apache.maven.plugins.annotations.Mojo;
 import org.apache.maven.plugins.annotations.Parameter;
-import org.apache.maven.repository.RepositorySystem;
 import org.apache.maven.wagon.Wagon;
 import org.codehaus.mojo.versions.api.PomHelper;
 import org.codehaus.mojo.versions.api.Property;
@@ -49,6 +49,7 @@ import org.codehaus.mojo.versions.api.VersionsHelper;
 import org.codehaus.mojo.versions.api.recording.ChangeRecorder;
 import org.codehaus.mojo.versions.ordering.InvalidSegmentException;
 import org.codehaus.mojo.versions.rewriting.ModifiedPomXMLEventReader;
+import org.eclipse.aether.RepositorySystem;
 
 import static java.util.Optional.empty;
 import static java.util.Optional.of;
@@ -130,11 +131,11 @@ public class ResolveRangesMojo extends AbstractVersionsDependencyUpdaterMojo {
 
     @Inject
     public ResolveRangesMojo(
+            ArtifactHandlerManager artifactHandlerManager,
             RepositorySystem repositorySystem,
-            org.eclipse.aether.RepositorySystem aetherRepositorySystem,
             Map<String, Wagon> wagonMap,
             Map<String, ChangeRecorder> changeRecorders) {
-        super(repositorySystem, aetherRepositorySystem, wagonMap, changeRecorders);
+        super(artifactHandlerManager, repositorySystem, wagonMap, changeRecorders);
     }
 
     /**
diff --git a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/SetMojo.java b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/SetMojo.java
index 57a0371e..c35ad37a 100644
--- a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/SetMojo.java
+++ b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/SetMojo.java
@@ -43,6 +43,7 @@ import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.lang3.tuple.ImmutablePair;
 import org.apache.commons.lang3.tuple.Pair;
 import org.apache.maven.artifact.ArtifactUtils;
+import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager;
 import org.apache.maven.model.Model;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.MojoFailureException;
@@ -50,7 +51,6 @@ import org.apache.maven.plugins.annotations.Mojo;
 import org.apache.maven.plugins.annotations.Parameter;
 import org.apache.maven.project.MavenProject;
 import org.apache.maven.project.ProjectBuilder;
-import org.apache.maven.repository.RepositorySystem;
 import org.apache.maven.wagon.Wagon;
 import org.codehaus.mojo.versions.api.PomHelper;
 import org.codehaus.mojo.versions.api.recording.ChangeRecorder;
@@ -64,6 +64,7 @@ import org.codehaus.mojo.versions.utils.DelegatingContextualLog;
 import org.codehaus.mojo.versions.utils.RegexUtils;
 import org.codehaus.plexus.components.interactivity.Prompter;
 import org.codehaus.plexus.components.interactivity.PrompterException;
+import org.eclipse.aether.RepositorySystem;
 
 import static org.apache.commons.lang3.StringUtils.isEmpty;
 
@@ -256,13 +257,13 @@ public class SetMojo extends AbstractVersionsUpdaterMojo {
 
     @Inject
     public SetMojo(
+            ArtifactHandlerManager artifactHandlerManager,
             RepositorySystem repositorySystem,
-            org.eclipse.aether.RepositorySystem aetherRepositorySystem,
             ProjectBuilder projectBuilder,
             Map<String, Wagon> wagonMap,
             Map<String, ChangeRecorder> changeRecorders,
             Prompter prompter) {
-        super(repositorySystem, aetherRepositorySystem, wagonMap, changeRecorders);
+        super(artifactHandlerManager, repositorySystem, wagonMap, changeRecorders);
         this.projectBuilder = projectBuilder;
         this.prompter = prompter;
     }
diff --git a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/SetPropertyMojo.java b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/SetPropertyMojo.java
index 4e3d1a75..fecc9716 100644
--- a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/SetPropertyMojo.java
+++ b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/SetPropertyMojo.java
@@ -26,11 +26,11 @@ import java.io.IOException;
 import java.util.Arrays;
 import java.util.Map;
 
+import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.MojoFailureException;
 import org.apache.maven.plugins.annotations.Mojo;
 import org.apache.maven.plugins.annotations.Parameter;
-import org.apache.maven.repository.RepositorySystem;
 import org.apache.maven.wagon.Wagon;
 import org.codehaus.mojo.versions.api.PomHelper;
 import org.codehaus.mojo.versions.api.Property;
@@ -39,6 +39,7 @@ import org.codehaus.mojo.versions.api.VersionsHelper;
 import org.codehaus.mojo.versions.api.recording.ChangeRecorder;
 import org.codehaus.mojo.versions.rewriting.ModifiedPomXMLEventReader;
 import org.codehaus.mojo.versions.utils.PropertiesVersionsFileReader;
+import org.eclipse.aether.RepositorySystem;
 
 import static org.apache.commons.lang3.StringUtils.defaultString;
 import static org.apache.commons.lang3.StringUtils.isEmpty;
@@ -95,11 +96,11 @@ public class SetPropertyMojo extends AbstractVersionsUpdaterMojo {
 
     @Inject
     public SetPropertyMojo(
+            ArtifactHandlerManager artifactHandlerManager,
             RepositorySystem repositorySystem,
-            org.eclipse.aether.RepositorySystem aetherRepositorySystem,
             Map<String, Wagon> wagonMap,
             Map<String, ChangeRecorder> changeRecorders) {
-        super(repositorySystem, aetherRepositorySystem, wagonMap, changeRecorders);
+        super(artifactHandlerManager, repositorySystem, wagonMap, changeRecorders);
     }
 
     /**
diff --git a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/SetScmTagMojo.java b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/SetScmTagMojo.java
index bb1e3b13..9951e29a 100644
--- a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/SetScmTagMojo.java
+++ b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/SetScmTagMojo.java
@@ -8,16 +8,17 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
 
+import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager;
 import org.apache.maven.model.Scm;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.MojoFailureException;
 import org.apache.maven.plugins.annotations.Mojo;
 import org.apache.maven.plugins.annotations.Parameter;
-import org.apache.maven.repository.RepositorySystem;
 import org.apache.maven.wagon.Wagon;
 import org.codehaus.mojo.versions.api.PomHelper;
 import org.codehaus.mojo.versions.api.recording.ChangeRecorder;
 import org.codehaus.mojo.versions.rewriting.ModifiedPomXMLEventReader;
+import org.eclipse.aether.RepositorySystem;
 
 import static org.apache.commons.lang3.StringUtils.isAllBlank;
 import static org.apache.commons.lang3.StringUtils.isBlank;
@@ -65,11 +66,11 @@ public class SetScmTagMojo extends AbstractVersionsUpdaterMojo {
 
     @Inject
     public SetScmTagMojo(
+            ArtifactHandlerManager artifactHandlerManager,
             RepositorySystem repositorySystem,
-            org.eclipse.aether.RepositorySystem aetherRepositorySystem,
             Map<String, Wagon> wagonMap,
             Map<String, ChangeRecorder> changeRecorders) {
-        super(repositorySystem, aetherRepositorySystem, wagonMap, changeRecorders);
+        super(artifactHandlerManager, repositorySystem, wagonMap, changeRecorders);
     }
 
     /**
diff --git a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/UnlockSnapshotsMojo.java b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/UnlockSnapshotsMojo.java
index 2019ea23..1839a52f 100644
--- a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/UnlockSnapshotsMojo.java
+++ b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/UnlockSnapshotsMojo.java
@@ -25,19 +25,20 @@ import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
 import org.apache.maven.artifact.Artifact;
+import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager;
 import org.apache.maven.model.Dependency;
 import org.apache.maven.model.DependencyManagement;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.MojoFailureException;
 import org.apache.maven.plugins.annotations.Mojo;
 import org.apache.maven.project.MavenProject;
-import org.apache.maven.repository.RepositorySystem;
 import org.apache.maven.wagon.Wagon;
 import org.codehaus.mojo.versions.api.PomHelper;
 import org.codehaus.mojo.versions.api.recording.ChangeRecorder;
 import org.codehaus.mojo.versions.api.recording.DependencyChangeRecord;
 import org.codehaus.mojo.versions.recording.DefaultDependencyChangeRecord;
 import org.codehaus.mojo.versions.rewriting.ModifiedPomXMLEventReader;
+import org.eclipse.aether.RepositorySystem;
 
 /**
  * Attempts to resolve unlocked snapshot dependency versions to the locked timestamp versions used in the build. For
@@ -62,11 +63,11 @@ public class UnlockSnapshotsMojo extends AbstractVersionsDependencyUpdaterMojo {
 
     @Inject
     public UnlockSnapshotsMojo(
+            ArtifactHandlerManager artifactHandlerManager,
             RepositorySystem repositorySystem,
-            org.eclipse.aether.RepositorySystem aetherRepositorySystem,
             Map<String, Wagon> wagonMap,
             Map<String, ChangeRecorder> changeRecorders) {
-        super(repositorySystem, aetherRepositorySystem, wagonMap, changeRecorders);
+        super(artifactHandlerManager, repositorySystem, wagonMap, changeRecorders);
     }
 
     /**
diff --git a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/UpdateChildModulesMojo.java b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/UpdateChildModulesMojo.java
index 55d6526c..d8c0a6ae 100644
--- a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/UpdateChildModulesMojo.java
+++ b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/UpdateChildModulesMojo.java
@@ -29,16 +29,17 @@ import java.util.List;
 import java.util.Map;
 
 import org.apache.maven.artifact.ArtifactUtils;
+import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager;
 import org.apache.maven.model.Model;
 import org.apache.maven.model.Parent;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.MojoFailureException;
 import org.apache.maven.plugins.annotations.Mojo;
-import org.apache.maven.repository.RepositorySystem;
 import org.apache.maven.wagon.Wagon;
 import org.codehaus.mojo.versions.api.PomHelper;
 import org.codehaus.mojo.versions.api.recording.ChangeRecorder;
 import org.codehaus.mojo.versions.rewriting.ModifiedPomXMLEventReader;
+import org.eclipse.aether.RepositorySystem;
 
 /**
  * Scans the current projects child modules, updating the versions of any which use the current project to the version
@@ -66,11 +67,11 @@ public class UpdateChildModulesMojo extends AbstractVersionsUpdaterMojo {
 
     @Inject
     public UpdateChildModulesMojo(
+            ArtifactHandlerManager artifactHandlerManager,
             RepositorySystem repositorySystem,
-            org.eclipse.aether.RepositorySystem aetherRepositorySystem,
             Map<String, Wagon> wagonMap,
             Map<String, ChangeRecorder> changeRecorders) {
-        super(repositorySystem, aetherRepositorySystem, wagonMap, changeRecorders);
+        super(artifactHandlerManager, repositorySystem, wagonMap, changeRecorders);
     }
 
     /**
diff --git a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/UpdateParentMojo.java b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/UpdateParentMojo.java
index fd2e5fa9..8f37aa83 100644
--- a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/UpdateParentMojo.java
+++ b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/UpdateParentMojo.java
@@ -25,6 +25,7 @@ import java.util.Optional;
 import java.util.stream.Collectors;
 
 import org.apache.maven.artifact.Artifact;
+import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager;
 import org.apache.maven.artifact.versioning.ArtifactVersion;
 import org.apache.maven.artifact.versioning.InvalidVersionSpecificationException;
 import org.apache.maven.artifact.versioning.VersionRange;
@@ -32,7 +33,6 @@ import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.MojoFailureException;
 import org.apache.maven.plugins.annotations.Mojo;
 import org.apache.maven.plugins.annotations.Parameter;
-import org.apache.maven.repository.RepositorySystem;
 import org.apache.maven.wagon.Wagon;
 import org.codehaus.mojo.versions.api.ArtifactVersions;
 import org.codehaus.mojo.versions.api.PomHelper;
@@ -46,6 +46,7 @@ import org.codehaus.mojo.versions.rewriting.ModifiedPomXMLEventReader;
 import org.codehaus.mojo.versions.utils.DefaultArtifactVersionCache;
 import org.codehaus.mojo.versions.utils.DependencyBuilder;
 import org.codehaus.mojo.versions.utils.SegmentUtils;
+import org.eclipse.aether.RepositorySystem;
 
 import static org.apache.commons.lang3.StringUtils.isBlank;
 
@@ -132,11 +133,11 @@ public class UpdateParentMojo extends AbstractVersionsUpdaterMojo {
 
     @Inject
     public UpdateParentMojo(
+            ArtifactHandlerManager artifactHandlerManager,
             RepositorySystem repositorySystem,
-            org.eclipse.aether.RepositorySystem aetherRepositorySystem,
             Map<String, Wagon> wagonMap,
             Map<String, ChangeRecorder> changeRecorders) {
-        super(repositorySystem, aetherRepositorySystem, wagonMap, changeRecorders);
+        super(artifactHandlerManager, repositorySystem, wagonMap, changeRecorders);
     }
 
     /**
diff --git a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/UpdatePropertiesMojo.java b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/UpdatePropertiesMojo.java
index 12da4e4f..188eeb6d 100644
--- a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/UpdatePropertiesMojo.java
+++ b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/UpdatePropertiesMojo.java
@@ -24,16 +24,17 @@ import javax.xml.stream.XMLStreamException;
 
 import java.util.Map;
 
+import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.MojoFailureException;
 import org.apache.maven.plugins.annotations.Mojo;
 import org.apache.maven.plugins.annotations.Parameter;
-import org.apache.maven.repository.RepositorySystem;
 import org.apache.maven.wagon.Wagon;
 import org.codehaus.mojo.versions.api.Property;
 import org.codehaus.mojo.versions.api.VersionsHelper;
 import org.codehaus.mojo.versions.api.recording.ChangeRecorder;
 import org.codehaus.mojo.versions.rewriting.ModifiedPomXMLEventReader;
+import org.eclipse.aether.RepositorySystem;
 
 /**
  * Sets properties to the latest versions of specific artifacts.
@@ -69,11 +70,11 @@ public class UpdatePropertiesMojo extends UpdatePropertiesMojoBase {
 
     @Inject
     public UpdatePropertiesMojo(
+            ArtifactHandlerManager artifactHandlerManager,
             RepositorySystem repositorySystem,
-            org.eclipse.aether.RepositorySystem aetherRepositorySystem,
             Map<String, Wagon> wagonMap,
             Map<String, ChangeRecorder> changeRecorders) {
-        super(repositorySystem, aetherRepositorySystem, wagonMap, changeRecorders);
+        super(artifactHandlerManager, repositorySystem, wagonMap, changeRecorders);
     }
 
     /**
diff --git a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/UpdatePropertiesMojoBase.java b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/UpdatePropertiesMojoBase.java
index f30b43b6..bd635fe2 100644
--- a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/UpdatePropertiesMojoBase.java
+++ b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/UpdatePropertiesMojoBase.java
@@ -20,12 +20,12 @@ import javax.xml.stream.XMLStreamException;
 import java.util.Map;
 import java.util.Optional;
 
+import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager;
 import org.apache.maven.artifact.versioning.ArtifactVersion;
 import org.apache.maven.artifact.versioning.InvalidVersionSpecificationException;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.logging.Log;
 import org.apache.maven.plugins.annotations.Parameter;
-import org.apache.maven.repository.RepositorySystem;
 import org.apache.maven.wagon.Wagon;
 import org.codehaus.mojo.versions.api.ArtifactAssociation;
 import org.codehaus.mojo.versions.api.Property;
@@ -37,6 +37,7 @@ import org.codehaus.mojo.versions.ordering.InvalidSegmentException;
 import org.codehaus.mojo.versions.recording.DefaultDependencyChangeRecord;
 import org.codehaus.mojo.versions.recording.DefaultPropertyChangeRecord;
 import org.codehaus.mojo.versions.rewriting.ModifiedPomXMLEventReader;
+import org.eclipse.aether.RepositorySystem;
 
 import static java.util.Optional.empty;
 import static java.util.Optional.of;
@@ -107,11 +108,11 @@ public abstract class UpdatePropertiesMojoBase extends AbstractVersionsDependenc
     protected boolean includeParent = true;
 
     public UpdatePropertiesMojoBase(
+            ArtifactHandlerManager artifactHandlerManager,
             RepositorySystem repositorySystem,
-            org.eclipse.aether.RepositorySystem aetherRepositorySystem,
             Map<String, Wagon> wagonMap,
             Map<String, ChangeRecorder> changeRecorders) {
-        super(repositorySystem, aetherRepositorySystem, wagonMap, changeRecorders);
+        super(artifactHandlerManager, repositorySystem, wagonMap, changeRecorders);
     }
 
     protected void update(ModifiedPomXMLEventReader pom, Map<Property, PropertyVersions> propertyVersions)
diff --git a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/UpdatePropertyMojo.java b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/UpdatePropertyMojo.java
index a541fbf1..02088666 100644
--- a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/UpdatePropertyMojo.java
+++ b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/UpdatePropertyMojo.java
@@ -24,16 +24,17 @@ import javax.xml.stream.XMLStreamException;
 
 import java.util.Map;
 
+import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.MojoFailureException;
 import org.apache.maven.plugins.annotations.Mojo;
 import org.apache.maven.plugins.annotations.Parameter;
-import org.apache.maven.repository.RepositorySystem;
 import org.apache.maven.wagon.Wagon;
 import org.codehaus.mojo.versions.api.Property;
 import org.codehaus.mojo.versions.api.VersionsHelper;
 import org.codehaus.mojo.versions.api.recording.ChangeRecorder;
 import org.codehaus.mojo.versions.rewriting.ModifiedPomXMLEventReader;
+import org.eclipse.aether.RepositorySystem;
 
 /**
  * Sets a property to the latest version in a given range of associated artifacts.
@@ -72,11 +73,11 @@ public class UpdatePropertyMojo extends UpdatePropertiesMojoBase {
 
     @Inject
     public UpdatePropertyMojo(
+            ArtifactHandlerManager artifactHandlerManager,
             RepositorySystem repositorySystem,
-            org.eclipse.aether.RepositorySystem aetherRepositorySystem,
             Map<String, Wagon> wagonMap,
             Map<String, ChangeRecorder> changeRecorders) {
-        super(repositorySystem, aetherRepositorySystem, wagonMap, changeRecorders);
+        super(artifactHandlerManager, repositorySystem, wagonMap, changeRecorders);
     }
 
     /**
diff --git a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/UseDepVersionMojo.java b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/UseDepVersionMojo.java
index 33b47ed3..e583031e 100644
--- a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/UseDepVersionMojo.java
+++ b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/UseDepVersionMojo.java
@@ -36,6 +36,7 @@ import java.util.stream.Stream;
 
 import org.apache.commons.lang3.tuple.ImmutablePair;
 import org.apache.maven.artifact.Artifact;
+import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager;
 import org.apache.maven.model.Dependency;
 import org.apache.maven.model.Model;
 import org.apache.maven.model.ModelBase;
@@ -44,7 +45,6 @@ import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.MojoFailureException;
 import org.apache.maven.plugins.annotations.Mojo;
 import org.apache.maven.plugins.annotations.Parameter;
-import org.apache.maven.repository.RepositorySystem;
 import org.apache.maven.wagon.Wagon;
 import org.codehaus.mojo.versions.api.PomHelper;
 import org.codehaus.mojo.versions.api.VersionRetrievalException;
@@ -55,6 +55,7 @@ import org.codehaus.mojo.versions.rewriting.ModifiedPomXMLEventReader;
 import org.codehaus.mojo.versions.utils.DependencyComparator;
 import org.codehaus.mojo.versions.utils.ModelNode;
 import org.codehaus.plexus.util.FileUtils;
+import org.eclipse.aether.RepositorySystem;
 
 import static java.util.Collections.emptyList;
 import static java.util.Collections.singletonList;
@@ -102,11 +103,11 @@ public class UseDepVersionMojo extends AbstractVersionsDependencyUpdaterMojo {
 
     @Inject
     public UseDepVersionMojo(
+            ArtifactHandlerManager artifactHandlerManager,
             RepositorySystem repositorySystem,
-            org.eclipse.aether.RepositorySystem aetherRepositorySystem,
             Map<String, Wagon> wagonMap,
             Map<String, ChangeRecorder> changeRecorders) {
-        super(repositorySystem, aetherRepositorySystem, wagonMap, changeRecorders);
+        super(artifactHandlerManager, repositorySystem, wagonMap, changeRecorders);
     }
 
     @Override
diff --git a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/UseNextReleasesMojo.java b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/UseNextReleasesMojo.java
index ed8bc8de..2fd09ea7 100644
--- a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/UseNextReleasesMojo.java
+++ b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/UseNextReleasesMojo.java
@@ -24,13 +24,13 @@ import java.util.Collection;
 import java.util.Map;
 import java.util.Optional;
 
+import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager;
 import org.apache.maven.model.Dependency;
 import org.apache.maven.model.DependencyManagement;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.MojoFailureException;
 import org.apache.maven.plugins.annotations.Mojo;
 import org.apache.maven.plugins.annotations.Parameter;
-import org.apache.maven.repository.RepositorySystem;
 import org.apache.maven.wagon.Wagon;
 import org.codehaus.mojo.versions.api.PomHelper;
 import org.codehaus.mojo.versions.api.VersionRetrievalException;
@@ -38,6 +38,7 @@ import org.codehaus.mojo.versions.api.recording.ChangeRecorder;
 import org.codehaus.mojo.versions.api.recording.DependencyChangeRecord;
 import org.codehaus.mojo.versions.ordering.InvalidSegmentException;
 import org.codehaus.mojo.versions.rewriting.ModifiedPomXMLEventReader;
+import org.eclipse.aether.RepositorySystem;
 
 import static java.util.Collections.singletonList;
 import static org.codehaus.mojo.versions.api.recording.DependencyChangeRecord.ChangeKind.DEPENDENCY;
@@ -65,11 +66,11 @@ public class UseNextReleasesMojo extends UseLatestVersionsMojoBase {
 
     @Inject
     public UseNextReleasesMojo(
+            ArtifactHandlerManager artifactHandlerManager,
             RepositorySystem repositorySystem,
-            org.eclipse.aether.RepositorySystem aetherRepositorySystem,
             Map<String, Wagon> wagonMap,
             Map<String, ChangeRecorder> changeRecorders) {
-        super(repositorySystem, aetherRepositorySystem, wagonMap, changeRecorders);
+        super(artifactHandlerManager, repositorySystem, wagonMap, changeRecorders);
     }
 
     /**
diff --git a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/UseNextSnapshotsMojo.java b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/UseNextSnapshotsMojo.java
index 1c59d39e..17c78bc6 100644
--- a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/UseNextSnapshotsMojo.java
+++ b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/UseNextSnapshotsMojo.java
@@ -24,6 +24,7 @@ import java.util.Collection;
 import java.util.Map;
 import java.util.Optional;
 
+import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager;
 import org.apache.maven.model.Dependency;
 import org.apache.maven.model.DependencyManagement;
 import org.apache.maven.plugin.MojoExecutionException;
@@ -31,7 +32,6 @@ import org.apache.maven.plugin.MojoFailureException;
 import org.apache.maven.plugin.logging.Log;
 import org.apache.maven.plugins.annotations.Mojo;
 import org.apache.maven.plugins.annotations.Parameter;
-import org.apache.maven.repository.RepositorySystem;
 import org.apache.maven.wagon.Wagon;
 import org.codehaus.mojo.versions.api.PomHelper;
 import org.codehaus.mojo.versions.api.Segment;
@@ -40,6 +40,7 @@ import org.codehaus.mojo.versions.api.recording.ChangeRecorder;
 import org.codehaus.mojo.versions.api.recording.DependencyChangeRecord;
 import org.codehaus.mojo.versions.ordering.InvalidSegmentException;
 import org.codehaus.mojo.versions.rewriting.ModifiedPomXMLEventReader;
+import org.eclipse.aether.RepositorySystem;
 
 import static java.util.Collections.singletonList;
 import static java.util.Optional.empty;
@@ -88,11 +89,11 @@ public class UseNextSnapshotsMojo extends UseLatestVersionsMojoBase {
 
     @Inject
     public UseNextSnapshotsMojo(
+            ArtifactHandlerManager artifactHandlerManager,
             RepositorySystem repositorySystem,
-            org.eclipse.aether.RepositorySystem aetherRepositorySystem,
             Map<String, Wagon> wagonMap,
             Map<String, ChangeRecorder> changeRecorders) {
-        super(repositorySystem, aetherRepositorySystem, wagonMap, changeRecorders);
+        super(artifactHandlerManager, repositorySystem, wagonMap, changeRecorders);
         // the below is necessary for UseLatestVersionsMojoBase.useLatestVersions to select snapshots
         allowSnapshots = true;
     }
diff --git a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/UseNextVersionsMojo.java b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/UseNextVersionsMojo.java
index 0417071f..1b462709 100644
--- a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/UseNextVersionsMojo.java
+++ b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/UseNextVersionsMojo.java
@@ -24,13 +24,13 @@ import java.util.Collection;
 import java.util.Map;
 import java.util.Optional;
 
+import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager;
 import org.apache.maven.model.Dependency;
 import org.apache.maven.model.DependencyManagement;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.MojoFailureException;
 import org.apache.maven.plugins.annotations.Mojo;
 import org.apache.maven.plugins.annotations.Parameter;
-import org.apache.maven.repository.RepositorySystem;
 import org.apache.maven.wagon.Wagon;
 import org.codehaus.mojo.versions.api.PomHelper;
 import org.codehaus.mojo.versions.api.VersionRetrievalException;
@@ -38,6 +38,7 @@ import org.codehaus.mojo.versions.api.recording.ChangeRecorder;
 import org.codehaus.mojo.versions.api.recording.DependencyChangeRecord;
 import org.codehaus.mojo.versions.ordering.InvalidSegmentException;
 import org.codehaus.mojo.versions.rewriting.ModifiedPomXMLEventReader;
+import org.eclipse.aether.RepositorySystem;
 
 import static java.util.Collections.singletonList;
 import static org.codehaus.mojo.versions.api.recording.DependencyChangeRecord.ChangeKind.DEPENDENCY;
@@ -67,11 +68,11 @@ public class UseNextVersionsMojo extends UseLatestVersionsMojoBase {
 
     @Inject
     public UseNextVersionsMojo(
+            ArtifactHandlerManager artifactHandlerManager,
             RepositorySystem repositorySystem,
-            org.eclipse.aether.RepositorySystem aetherRepositorySystem,
             Map<String, Wagon> wagonMap,
             Map<String, ChangeRecorder> changeRecorders) {
-        super(repositorySystem, aetherRepositorySystem, wagonMap, changeRecorders);
+        super(artifactHandlerManager, repositorySystem, wagonMap, changeRecorders);
     }
 
     /**
diff --git a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/UseReactorMojo.java b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/UseReactorMojo.java
index 3ea2f471..8594c2ac 100644
--- a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/UseReactorMojo.java
+++ b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/UseReactorMojo.java
@@ -28,18 +28,19 @@ import java.util.Map;
 
 import org.apache.commons.lang3.StringUtils;
 import org.apache.maven.artifact.Artifact;
+import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager;
 import org.apache.maven.model.Dependency;
 import org.apache.maven.model.DependencyManagement;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.MojoFailureException;
 import org.apache.maven.plugins.annotations.Mojo;
 import org.apache.maven.project.MavenProject;
-import org.apache.maven.repository.RepositorySystem;
 import org.apache.maven.wagon.Wagon;
 import org.codehaus.mojo.versions.api.PomHelper;
 import org.codehaus.mojo.versions.api.VersionRetrievalException;
 import org.codehaus.mojo.versions.api.recording.ChangeRecorder;
 import org.codehaus.mojo.versions.rewriting.ModifiedPomXMLEventReader;
+import org.eclipse.aether.RepositorySystem;
 
 /**
  * Replaces any versions with the corresponding version from the reactor.
@@ -54,11 +55,11 @@ public class UseReactorMojo extends AbstractVersionsDependencyUpdaterMojo {
 
     @Inject
     public UseReactorMojo(
+            ArtifactHandlerManager artifactHandlerManager,
             RepositorySystem repositorySystem,
-            org.eclipse.aether.RepositorySystem aetherRepositorySystem,
             Map<String, Wagon> wagonMap,
             Map<String, ChangeRecorder> changeRecorders) {
-        super(repositorySystem, aetherRepositorySystem, wagonMap, changeRecorders);
+        super(artifactHandlerManager, repositorySystem, wagonMap, changeRecorders);
     }
 
     /**
diff --git a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/UseReleasesMojo.java b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/UseReleasesMojo.java
index 662628c7..a115a84f 100644
--- a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/UseReleasesMojo.java
+++ b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/UseReleasesMojo.java
@@ -26,6 +26,7 @@ import java.util.Optional;
 import java.util.regex.Matcher;
 
 import org.apache.maven.artifact.Artifact;
+import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager;
 import org.apache.maven.artifact.versioning.ArtifactVersion;
 import org.apache.maven.model.Dependency;
 import org.apache.maven.model.DependencyManagement;
@@ -33,7 +34,6 @@ import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.MojoFailureException;
 import org.apache.maven.plugins.annotations.Mojo;
 import org.apache.maven.plugins.annotations.Parameter;
-import org.apache.maven.repository.RepositorySystem;
 import org.apache.maven.wagon.Wagon;
 import org.codehaus.mojo.versions.api.ArtifactVersions;
 import org.codehaus.mojo.versions.api.PomHelper;
@@ -41,6 +41,7 @@ import org.codehaus.mojo.versions.api.VersionRetrievalException;
 import org.codehaus.mojo.versions.api.recording.ChangeRecorder;
 import org.codehaus.mojo.versions.api.recording.DependencyChangeRecord;
 import org.codehaus.mojo.versions.rewriting.ModifiedPomXMLEventReader;
+import org.eclipse.aether.RepositorySystem;
 
 import static java.util.Collections.singletonList;
 
@@ -77,11 +78,11 @@ public class UseReleasesMojo extends AbstractVersionsDependencyUpdaterMojo {
 
     @Inject
     public UseReleasesMojo(
+            ArtifactHandlerManager artifactHandlerManager,
             RepositorySystem repositorySystem,
-            org.eclipse.aether.RepositorySystem aetherRepositorySystem,
             Map<String, Wagon> wagonMap,
             Map<String, ChangeRecorder> changeRecorders) {
-        super(repositorySystem, aetherRepositorySystem, wagonMap, changeRecorders);
+        super(artifactHandlerManager, repositorySystem, wagonMap, changeRecorders);
     }
 
     /**
diff --git a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/VersionInformation.java b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/VersionInformation.java
new file mode 100644
index 00000000..1cfbe492
--- /dev/null
+++ b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/VersionInformation.java
@@ -0,0 +1,176 @@
+package org.codehaus.mojo.versions;
+
+/*
+ * The MIT License
+ *
+ * Copyright (c) 2016, 2017 Karl Heinz Marbaise
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+ * of the Software, and to permit persons to whom the Software is furnished to do
+ * so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * This class will parse the version based on the given pattern in
+ * {@code  org.codehaus.mojo.buildhelper.ParseVersionMojo}.
+ *
+ * @author Karl Heinz Marbaise
+ * <a href="mailto:khmarbaise@apache.org">khmarbaise@apache.org</a>
+ *
+ */
+public class VersionInformation {
+
+    private static final String MAJOR_MINOR_PATCH_PATTERN = "^((\\d+)(\\.(\\d+)(\\.(\\d+))?)?)";
+
+    private static final Pattern MAJOR_MINOR_PATCH = Pattern.compile(MAJOR_MINOR_PATCH_PATTERN);
+
+    private static final Pattern DIGITS = Pattern.compile(MAJOR_MINOR_PATCH_PATTERN + "(.*)$");
+
+    private static final Pattern BUILD_NUMBER = Pattern.compile("(((\\-)(\\d+)(.*))?)|(\\.(.*))|(\\-(.*))|(.*)$");
+
+    private int major;
+
+    private int minor;
+
+    private int patch;
+
+    private long buildNumber;
+
+    private String qualifier;
+
+    private void parseBuildNumber(String buildNumberPart) {
+        Matcher matcher = BUILD_NUMBER.matcher(buildNumberPart);
+        if (matcher.matches()) {
+            String buildNumber = matcher.group(4);
+            String qualifier = matcher.group(5);
+
+            if (buildNumber != null) {
+                setBuildNumber(Long.parseLong(buildNumber));
+            }
+
+            if (matcher.group(7) != null) {
+                qualifier = matcher.group(7);
+            }
+            // Starting with "-"
+            if (matcher.group(9) != null) {
+                qualifier = matcher.group(9);
+            }
+            if (qualifier != null) {
+                if (qualifier.trim().length() == 0) {
+                    setQualifier(null);
+                } else {
+                    setQualifier(qualifier);
+                }
+            } else {
+                setQualifier(null);
+            }
+        }
+    }
+
+    private void parseMajorMinorPatchVersion(String version) {
+        Matcher matcher = MAJOR_MINOR_PATCH.matcher(version);
+        if (matcher.matches()) {
+            String majorString = matcher.group(2);
+            String minorString = matcher.group(4);
+            String patchString = matcher.group(6);
+
+            if (majorString != null) {
+                setMajor(Integer.parseInt(majorString));
+            }
+            if (minorString != null) {
+                setMinor(Integer.parseInt(minorString));
+            }
+            if (patchString != null) {
+                setPatch(Integer.parseInt(patchString));
+            }
+        }
+    }
+
+    public VersionInformation(String version) {
+        Matcher matcherDigits = DIGITS.matcher(version);
+        if (matcherDigits.matches()) {
+            parseMajorMinorPatchVersion(matcherDigits.group(1));
+            parseBuildNumber(matcherDigits.group(7));
+        } else {
+            setQualifier(version);
+        }
+    }
+
+    public int getMajor() {
+        return major;
+    }
+
+    public void setMajor(int major) {
+        this.major = major;
+    }
+
+    public int getMinor() {
+        return minor;
+    }
+
+    public void setMinor(int minor) {
+        this.minor = minor;
+    }
+
+    public int getPatch() {
+        return patch;
+    }
+
+    public void setPatch(int patch) {
+        this.patch = patch;
+    }
+
+    public long getBuildNumber() {
+        return buildNumber;
+    }
+
+    public void setBuildNumber(long buildNumber) {
+        this.buildNumber = buildNumber;
+    }
+
+    public String getQualifier() {
+        return qualifier;
+    }
+
+    public void setQualifier(String qualifier) {
+        this.qualifier = qualifier;
+    }
+
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(this.getMajor());
+        sb.append("." + this.getMinor());
+        sb.append("." + this.getPatch());
+
+        if (this.getQualifier() != null || this.getBuildNumber() != 0) {
+
+            if (this.getBuildNumber() != 0) {
+                sb.append("-");
+                sb.append(this.getBuildNumber());
+            }
+            if (this.getQualifier() != null) {
+                sb.append("-");
+                sb.append(this.getQualifier());
+            }
+        }
+
+        return sb.toString();
+    }
+}
diff --git a/versions-maven-plugin/src/site/markdown/examples/use-dynamic-version-from-scm.md b/versions-maven-plugin/src/site/markdown/examples/use-dynamic-version-from-scm.md
new file mode 100644
index 00000000..895db7eb
--- /dev/null
+++ b/versions-maven-plugin/src/site/markdown/examples/use-dynamic-version-from-scm.md
@@ -0,0 +1,32 @@
+title: Using use-dynamic-version-from-scm goal
+author: Jimisola Laursen
+date: 2024-06-22
+
+<!---
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+https://www.apache.org/licenses/LICENSE-2.0
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+The `use-dynamic-version-from-scm` goal will use scm/vcs (currently, only git) tags to determine the version for the current build and set that in a property (default: `revision`). It is intended to be used with [Maven CI Friendly Versions](https://maven.apache.org/maven-ci-friendly.html). The goal follows [Versions Maven Plugin - Version number rules](https://www.mojohaus.org/versions/versions-maven-plugin/version-rules.html).
+
+* The version tag can be with or without "v" prefix, i.e. "v1.2.3" or "1.2.3".
+* The `-SNAPSHOT` qualifier suffix is optional (appended per default).
+* If the parameter `useVersion` is set then that version will be used irrespective of commits/tags (is typically used for testing).
+* The goal will determine the version for the current build as follows:
+  * latest commit has valid version tag: use the highest version tag for that commit (e.g. 1.2.3 -> 1.2.3)
+  * latest version has _no_ valid version tag: use the highest version tag for the most recent non-latest commit, increase incremental (patch) version with 1 and use the number of commits to that commit (commit count) as build number and `-SNAPSHOT qualifer appended (e.g. 1.2.3 -> 1.2.4-12-SNAPSHOT)
+  * no commit with valid version tag: use 0.0.1 (configurable) and use the number of commits to that commit (commit count) as build number and `-SNAPSHOT qualifer appended (e.g. 1.2.3 -> 1.2.4-12-SNAPSHOT) (e.g. 0.0.1-10-SNAPSHOT)
+  * repository has no commits: build fails with exception `Caused by: org.apache.maven.plugin.MojoExecutionException: SCM repo has no head/commits.`
+
diff --git a/versions-maven-plugin/src/site/markdown/index.md b/versions-maven-plugin/src/site/markdown/index.md
index a0f773e6..48c386d5 100644
--- a/versions-maven-plugin/src/site/markdown/index.md
+++ b/versions-maven-plugin/src/site/markdown/index.md
@@ -73,6 +73,7 @@ have been a newer version and replaces them with the latest version.
 built-in "Poor Man's SCM".
 * [versions:revert](./revert-mojo.html) restores the `pom.xml` files from the `pom.xml.versionsBackup` files.
 Forms one half of the built-in "Poor Man's SCM".
+* [versions:use-dynamic-version-from-scm](./use-dynamic-version-from-scm-mojo.html) uses SCM/VCS tags to enable dynamic versioning and sets the version in a property.
 
 ## Reporting goals overview
 
@@ -135,3 +136,4 @@ you can take a look into the following examples:
 * [Replacing -SNAPSHOT versions with their corresponding releases](./examples/use-releases.html)
 * [Changing the project version](./examples/set.html)
 * [Recording version changes](./examples/recording-changes.html)
+* [Using use-dynamic-version-from-scm goal](./examples/use-dynamic-version-from-scm.html)
diff --git a/versions-model-report/pom.xml b/versions-model-report/pom.xml
index 770aac41..dc64c007 100644
--- a/versions-model-report/pom.xml
+++ b/versions-model-report/pom.xml
@@ -13,10 +13,6 @@
   <description>Modello models used in reports</description>
 
   <dependencies>
-    <dependency>
-      <groupId>org.codehaus.plexus</groupId>
-      <artifactId>plexus-utils</artifactId>
-    </dependency>
     <dependency>
       <groupId>org.codehaus.plexus</groupId>
       <artifactId>plexus-xml</artifactId>
diff --git a/versions-model/pom.xml b/versions-model/pom.xml
index cd14752e..962fd750 100644
--- a/versions-model/pom.xml
+++ b/versions-model/pom.xml
@@ -13,10 +13,6 @@
   <description>Modello models used in plugin</description>
 
   <dependencies>
-    <dependency>
-      <groupId>org.codehaus.plexus</groupId>
-      <artifactId>plexus-utils</artifactId>
-    </dependency>
     <dependency>
       <groupId>org.codehaus.plexus</groupId>
       <artifactId>plexus-xml</artifactId>


Test patch:
diff --git a/versions-common/src/test/java/org/codehaus/mojo/versions/api/DefaultVersionsHelperTest.java b/versions-common/src/test/java/org/codehaus/mojo/versions/api/DefaultVersionsHelperTest.java
index fe230eda..6cdb592d 100644
--- a/versions-common/src/test/java/org/codehaus/mojo/versions/api/DefaultVersionsHelperTest.java
+++ b/versions-common/src/test/java/org/codehaus/mojo/versions/api/DefaultVersionsHelperTest.java
@@ -39,7 +39,6 @@ import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.logging.Log;
 import org.apache.maven.plugin.logging.SystemStreamLog;
 import org.apache.maven.project.MavenProject;
-import org.apache.maven.repository.RepositorySystem;
 import org.apache.maven.wagon.ConnectionException;
 import org.apache.maven.wagon.ResourceDoesNotExistException;
 import org.apache.maven.wagon.TransferFailedException;
@@ -53,6 +52,7 @@ import org.codehaus.mojo.versions.model.Rule;
 import org.codehaus.mojo.versions.model.RuleSet;
 import org.codehaus.mojo.versions.ordering.VersionComparators;
 import org.eclipse.aether.DefaultRepositorySystemSession;
+import org.eclipse.aether.RepositorySystem;
 import org.eclipse.aether.repository.RemoteRepository;
 import org.eclipse.aether.repository.RepositoryPolicy;
 import org.eclipse.aether.resolution.VersionRangeRequest;
@@ -67,6 +67,7 @@ import static java.nio.file.StandardCopyOption.REPLACE_EXISTING;
 import static java.util.Collections.emptyList;
 import static java.util.Collections.singletonList;
 import static java.util.Collections.singletonMap;
+import static org.codehaus.mojo.versions.utils.MockUtils.mockArtifactHandlerManager;
 import static org.hamcrest.MatcherAssert.assertThat;
 import static org.hamcrest.Matchers.containsInAnyOrder;
 import static org.hamcrest.Matchers.equalTo;
@@ -90,7 +91,7 @@ import static org.mockito.Mockito.when;
 class DefaultVersionsHelperTest {
     @Test
     public void testPerRuleVersionsIgnored() throws Exception {
-        final org.eclipse.aether.RepositorySystem repositorySystem = mock(org.eclipse.aether.RepositorySystem.class);
+        final RepositorySystem repositorySystem = mock(org.eclipse.aether.RepositorySystem.class);
         final Artifact artifact = mock(Artifact.class);
         when(artifact.getGroupId()).thenReturn("com.mycompany.maven");
         when(artifact.getArtifactId()).thenReturn("artifact-one");
@@ -119,7 +120,7 @@ class DefaultVersionsHelperTest {
 
     @Test
     public void testGlobalRuleVersionsIgnored() throws Exception {
-        final org.eclipse.aether.RepositorySystem repositorySystem = mock(org.eclipse.aether.RepositorySystem.class);
+        final RepositorySystem repositorySystem = mock(org.eclipse.aether.RepositorySystem.class);
         final Artifact artifact = mock(Artifact.class);
         when(artifact.getGroupId()).thenReturn("other.company");
         when(artifact.getArtifactId()).thenReturn("artifact-two");
@@ -249,8 +250,7 @@ class DefaultVersionsHelperTest {
         return fileWagon;
     }
 
-    private DefaultVersionsHelper createHelper(org.eclipse.aether.RepositorySystem aetherRepositorySystem)
-            throws Exception {
+    private DefaultVersionsHelper createHelper(RepositorySystem repositorySystem) throws Exception {
         final String resourcePath = "/" + getClass().getPackage().getName().replace('.', '/') + "/rules.xml";
         final String rulesUri =
                 Objects.requireNonNull(getClass().getResource(resourcePath)).toExternalForm();
@@ -261,8 +261,7 @@ class DefaultVersionsHelperTest {
         when(mavenSession.getRepositorySession()).thenReturn(new DefaultRepositorySystemSession());
 
         return new DefaultVersionsHelper.Builder()
-                .withRepositorySystem(mock(RepositorySystem.class))
-                .withAetherRepositorySystem(aetherRepositorySystem)
+                .withRepositorySystem(repositorySystem)
                 .withWagonMap(singletonMap("file", mockFileWagon(new URI(rulesUri))))
                 .withServerId("")
                 .withRulesUri(rulesUri)
@@ -380,6 +379,22 @@ class DefaultVersionsHelperTest {
                 equalTo(RepositoryPolicy.UPDATE_POLICY_DAILY));
     }
 
+    @Test
+    void createPluginArtifact() throws Exception {
+
+        DefaultVersionsHelper versionsHelper = new DefaultVersionsHelper.Builder()
+                .withArtifactHandlerManager(mockArtifactHandlerManager())
+                .build();
+
+        Artifact artifact = versionsHelper.createPluginArtifact("groupId", "artifactId", "version");
+        assertEquals("groupId", artifact.getGroupId());
+        assertEquals("artifactId", artifact.getArtifactId());
+        assertEquals("version", artifact.getVersion());
+        assertEquals("maven-plugin", artifact.getType());
+        assertEquals("runtime", artifact.getScope());
+        assertEquals("jar", artifact.getArtifactHandler().getExtension());
+    }
+
     private static Version parseVersion(String version) {
         try {
             return new GenericVersionScheme().parseVersion(version);
diff --git a/versions-enforcer/src/test/java/org/codehaus/mojo/versions/enforcer/MaxDependencyUpdatesTest.java b/versions-enforcer/src/test/java/org/codehaus/mojo/versions/enforcer/MaxDependencyUpdatesTest.java
index b20acbca..7d1df6ab 100644
--- a/versions-enforcer/src/test/java/org/codehaus/mojo/versions/enforcer/MaxDependencyUpdatesTest.java
+++ b/versions-enforcer/src/test/java/org/codehaus/mojo/versions/enforcer/MaxDependencyUpdatesTest.java
@@ -20,13 +20,14 @@ package org.codehaus.mojo.versions.enforcer;
 
 import java.util.HashMap;
 
+import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager;
 import org.apache.maven.enforcer.rule.api.EnforcerLogger;
 import org.apache.maven.enforcer.rule.api.EnforcerRuleException;
 import org.apache.maven.execution.MavenSession;
 import org.apache.maven.project.MavenProject;
-import org.apache.maven.repository.RepositorySystem;
 import org.codehaus.mojo.versions.utils.DependencyBuilder;
 import org.codehaus.mojo.versions.utils.MockUtils;
+import org.eclipse.aether.RepositorySystem;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.extension.ExtendWith;
@@ -37,6 +38,7 @@ import org.mockito.junit.jupiter.MockitoExtension;
 import static java.util.Arrays.asList;
 import static java.util.Collections.singletonList;
 import static java.util.Collections.singletonMap;
+import static org.codehaus.mojo.versions.utils.MockUtils.mockArtifactHandlerManager;
 import static org.hamcrest.MatcherAssert.assertThat;
 import static org.hamcrest.Matchers.containsString;
 import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
@@ -58,8 +60,7 @@ class MaxDependencyUpdatesTest {
     @Mock
     private RepositorySystem repositorySystem;
 
-    @Mock
-    private org.eclipse.aether.RepositorySystem aetherRepositorySystem;
+    private ArtifactHandlerManager artifactHandlerManager = mockArtifactHandlerManager();
 
     @InjectMocks
     private MaxDependencyUpdates maxDependencyUpdates;
@@ -67,7 +68,6 @@ class MaxDependencyUpdatesTest {
     @BeforeEach
     public void setup() {
         maxDependencyUpdates.setLog(enforcerLogger);
-        MockUtils.prepareRepositorySystemMock(repositorySystem);
     }
 
     @Test
@@ -85,13 +85,12 @@ class MaxDependencyUpdatesTest {
                                 .withVersion("1.0.0")
                                 .build()));
 
-        MockUtils.prepareAetherRepositorySystemMockForVersionRange(
-                aetherRepositorySystem, new HashMap<String, String[]>() {
-                    {
-                        put("artifactA", new String[] {"1.0.0", "2.0.0"});
-                        put("artifactB", new String[] {"1.0.0", "2.0.0"});
-                    }
-                });
+        MockUtils.prepareAetherRepositorySystemMockForVersionRange(repositorySystem, new HashMap<String, String[]>() {
+            {
+                put("artifactA", new String[] {"1.0.0", "2.0.0"});
+                put("artifactB", new String[] {"1.0.0", "2.0.0"});
+            }
+        });
 
         maxDependencyUpdates.maxUpdates = 1;
         Exception e = assertThrows(EnforcerRuleException.class, () -> maxDependencyUpdates.execute());
@@ -109,7 +108,7 @@ class MaxDependencyUpdatesTest {
                         .build()));
 
         MockUtils.prepareAetherRepositorySystemMockForVersionRange(
-                aetherRepositorySystem, singletonMap("artifactA", new String[] {"1.0.0", "2.0.0"}));
+                repositorySystem, singletonMap("artifactA", new String[] {"1.0.0", "2.0.0"}));
 
         maxDependencyUpdates.maxUpdates = 1;
         assertDoesNotThrow(() -> maxDependencyUpdates.execute());
@@ -131,13 +130,12 @@ class MaxDependencyUpdatesTest {
                                 .withVersion("1.0.0")
                                 .build()));
 
-        MockUtils.prepareAetherRepositorySystemMockForVersionRange(
-                aetherRepositorySystem, new HashMap<String, String[]>() {
-                    {
-                        put("artifactA", new String[] {"1.0.0", "2.0.0"});
-                        put("artifactB", new String[] {"1.0.0"});
-                    }
-                });
+        MockUtils.prepareAetherRepositorySystemMockForVersionRange(repositorySystem, new HashMap<String, String[]>() {
+            {
+                put("artifactA", new String[] {"1.0.0", "2.0.0"});
+                put("artifactB", new String[] {"1.0.0"});
+            }
+        });
 
         maxDependencyUpdates.dependencyIncludes = singletonList("group:artifactB");
         assertDoesNotThrow(() -> maxDependencyUpdates.execute());
@@ -159,13 +157,12 @@ class MaxDependencyUpdatesTest {
                                 .withVersion("1.0.0")
                                 .build()));
 
-        MockUtils.prepareAetherRepositorySystemMockForVersionRange(
-                aetherRepositorySystem, new HashMap<String, String[]>() {
-                    {
-                        put("artifactA", new String[] {"1.0.0", "2.0.0"});
-                        put("artifactB", new String[] {"1.0.0"});
-                    }
-                });
+        MockUtils.prepareAetherRepositorySystemMockForVersionRange(repositorySystem, new HashMap<String, String[]>() {
+            {
+                put("artifactA", new String[] {"1.0.0", "2.0.0"});
+                put("artifactB", new String[] {"1.0.0"});
+            }
+        });
 
         maxDependencyUpdates.dependencyExcludes = singletonList("group:artifactA");
         assertDoesNotThrow(() -> maxDependencyUpdates.execute());
@@ -187,13 +184,12 @@ class MaxDependencyUpdatesTest {
                                 .withVersion("1.0.0")
                                 .build()));
 
-        MockUtils.prepareAetherRepositorySystemMockForVersionRange(
-                aetherRepositorySystem, new HashMap<String, String[]>() {
-                    {
-                        put("artifactA", new String[] {"1.0.0", "2.0.0"});
-                        put("artifactB", new String[] {"1.0.0"});
-                    }
-                });
+        MockUtils.prepareAetherRepositorySystemMockForVersionRange(repositorySystem, new HashMap<String, String[]>() {
+            {
+                put("artifactA", new String[] {"1.0.0", "2.0.0"});
+                put("artifactB", new String[] {"1.0.0"});
+            }
+        });
 
         maxDependencyUpdates.dependencyIncludes = singletonList("group:*");
         maxDependencyUpdates.dependencyExcludes = singletonList("group:artifactA");
@@ -211,7 +207,7 @@ class MaxDependencyUpdatesTest {
                         .build()));
 
         MockUtils.prepareAetherRepositorySystemMockForVersionRange(
-                aetherRepositorySystem, singletonMap("artifactA", new String[] {"1.0.0", "1.0.0-1"}));
+                repositorySystem, singletonMap("artifactA", new String[] {"1.0.0", "1.0.0-1"}));
 
         maxDependencyUpdates.ignoreSubIncrementalUpdates = true;
         assertDoesNotThrow(() -> maxDependencyUpdates.execute());
@@ -227,7 +223,7 @@ class MaxDependencyUpdatesTest {
                         .build()));
 
         MockUtils.prepareAetherRepositorySystemMockForVersionRange(
-                aetherRepositorySystem, singletonMap("artifactA", new String[] {"1.0.0", "1.0.0-1", "1.0.1"}));
+                repositorySystem, singletonMap("artifactA", new String[] {"1.0.0", "1.0.0-1", "1.0.1"}));
 
         maxDependencyUpdates.ignoreIncrementalUpdates = true;
         assertDoesNotThrow(() -> maxDependencyUpdates.execute());
@@ -244,7 +240,7 @@ class MaxDependencyUpdatesTest {
                         .build()));
 
         MockUtils.prepareAetherRepositorySystemMockForVersionRange(
-                aetherRepositorySystem, singletonMap("artifactA", new String[] {"1.0.0", "1.0.0-1", "1.0.1", "1.1.0"}));
+                repositorySystem, singletonMap("artifactA", new String[] {"1.0.0", "1.0.0-1", "1.0.1", "1.1.0"}));
 
         maxDependencyUpdates.ignoreMinorUpdates = true;
         assertDoesNotThrow(() -> maxDependencyUpdates.execute());
diff --git a/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-latest-commit/invoker.properties b/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-latest-commit/invoker.properties
new file mode 100644
index 00000000..b86b79ee
--- /dev/null
+++ b/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-latest-commit/invoker.properties
@@ -0,0 +1,1 @@
+invoker.goals=${project.groupId}:${project.artifactId}:${project.version}:use-dynamic-version-from-scm
diff --git a/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-latest-commit/pom.xml b/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-latest-commit/pom.xml
new file mode 100644
index 00000000..f5de5973
--- /dev/null
+++ b/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-latest-commit/pom.xml
@@ -0,0 +1,11 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>localhost</groupId>
+  <artifactId>it-dynamic-versioning-scm-tag-latest-commit</artifactId>
+  <version>${revision}</version>
+  <packaging>pom</packaging>
+  <name>ranges-update-report</name>
+  <url>http://localhost/</url>
+</project>
diff --git a/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-latest-commit/selector.groovy b/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-latest-commit/selector.groovy
new file mode 100644
index 00000000..74f82d00
--- /dev/null
+++ b/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-latest-commit/selector.groovy
@@ -0,0 +1,10 @@
+try {
+    // smoke test if we have a needed tools
+    def gitVersion = "git --version".execute()
+    gitVersion.consumeProcessOutput(System.out, System.out)
+    gitVersion.waitFor()
+    return gitVersion.exitValue() == 0
+} catch (Exception e) {
+    // some error occurs - we skip a test
+    return false
+}
diff --git a/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-latest-commit/setup.groovy b/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-latest-commit/setup.groovy
new file mode 100644
index 00000000..a8873ec8
--- /dev/null
+++ b/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-latest-commit/setup.groovy
@@ -0,0 +1,17 @@
+void exec(String command) {
+    def proc = command.execute(null, basedir)
+    proc.consumeProcessOutput(System.out, System.out)
+    proc.waitFor()
+    assert proc.exitValue() == 0 : "Command '${command}' returned status: ${proc.exitValue()}"
+}
+
+def testFile = new File(basedir, 'test.txt')
+testFile << 'content'
+
+exec('git init')
+exec('git config user.email "you@example.com"')
+exec('git config user.name "Your Name"')
+
+exec('git add test.txt')
+exec('git commit -m initial-commit')
+exec('git tag v1.1.1')
diff --git a/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-latest-commit/verify.groovy b/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-latest-commit/verify.groovy
new file mode 100644
index 00000000..86e3aa93
--- /dev/null
+++ b/versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-latest-commit/verify.groovy
@@ -0,0 +1,19 @@
+// check that property was set
+
+def mavenLogFile = new File(basedir, 'build.log')
+assert mavenLogFile.exists() : "Maven log file does not exist"
+
+// Read the log file
+def logContent = mavenLogFile.text
+
+// Define a pattern to match the version output
+def versionPattern = /\[INFO\] Property 'revision' set to: (.+)/ 
+def matcher = (logContent =~ versionPattern)
+assert matcher.find() : "Version information not found in log file"
+
+// Extract the version from the matched group
+def actualVersion = matcher[0][1]
+
+def expectedVersion = '1.1.1'
+
+assert actualVersion == expectedVersion : "Expected version '${expectedVersion}', but found '${actualVersion}'"
diff --git a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/UseLatestReleasesMojo.java b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/UseLatestReleasesMojo.java
index 86938d0a..a4575189 100644
--- a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/UseLatestReleasesMojo.java
+++ b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/UseLatestReleasesMojo.java
@@ -27,6 +27,7 @@ import java.util.Optional;
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.artifact.DefaultArtifact;
 import org.apache.maven.artifact.handler.DefaultArtifactHandler;
+import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager;
 import org.apache.maven.artifact.versioning.ArtifactVersion;
 import org.apache.maven.artifact.versioning.VersionRange;
 import org.apache.maven.model.Dependency;
@@ -36,7 +37,6 @@ import org.apache.maven.plugin.MojoFailureException;
 import org.apache.maven.plugin.logging.Log;
 import org.apache.maven.plugins.annotations.Mojo;
 import org.apache.maven.plugins.annotations.Parameter;
-import org.apache.maven.repository.RepositorySystem;
 import org.apache.maven.wagon.Wagon;
 import org.codehaus.mojo.versions.api.PomHelper;
 import org.codehaus.mojo.versions.api.Segment;
@@ -45,6 +45,7 @@ import org.codehaus.mojo.versions.api.recording.ChangeRecorder;
 import org.codehaus.mojo.versions.api.recording.DependencyChangeRecord;
 import org.codehaus.mojo.versions.ordering.InvalidSegmentException;
 import org.codehaus.mojo.versions.rewriting.ModifiedPomXMLEventReader;
+import org.eclipse.aether.RepositorySystem;
 
 import static java.util.Collections.singletonList;
 import static java.util.Optional.empty;
@@ -110,11 +111,11 @@ public class UseLatestReleasesMojo extends UseLatestVersionsMojoBase {
 
     @Inject
     public UseLatestReleasesMojo(
+            ArtifactHandlerManager artifactHandlerManager,
             RepositorySystem repositorySystem,
-            org.eclipse.aether.RepositorySystem aetherRepositorySystem,
             Map<String, Wagon> wagonMap,
             Map<String, ChangeRecorder> changeRecorders) {
-        super(repositorySystem, aetherRepositorySystem, wagonMap, changeRecorders);
+        super(artifactHandlerManager, repositorySystem, wagonMap, changeRecorders);
     }
 
     /**
diff --git a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/UseLatestSnapshotsMojo.java b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/UseLatestSnapshotsMojo.java
index 2478bede..847fc3c7 100644
--- a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/UseLatestSnapshotsMojo.java
+++ b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/UseLatestSnapshotsMojo.java
@@ -25,6 +25,7 @@ import java.util.Comparator;
 import java.util.Map;
 import java.util.Optional;
 
+import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager;
 import org.apache.maven.model.Dependency;
 import org.apache.maven.model.DependencyManagement;
 import org.apache.maven.plugin.MojoExecutionException;
@@ -32,7 +33,6 @@ import org.apache.maven.plugin.MojoFailureException;
 import org.apache.maven.plugin.logging.Log;
 import org.apache.maven.plugins.annotations.Mojo;
 import org.apache.maven.plugins.annotations.Parameter;
-import org.apache.maven.repository.RepositorySystem;
 import org.apache.maven.wagon.Wagon;
 import org.codehaus.mojo.versions.api.PomHelper;
 import org.codehaus.mojo.versions.api.Segment;
@@ -41,6 +41,7 @@ import org.codehaus.mojo.versions.api.recording.ChangeRecorder;
 import org.codehaus.mojo.versions.api.recording.DependencyChangeRecord;
 import org.codehaus.mojo.versions.ordering.InvalidSegmentException;
 import org.codehaus.mojo.versions.rewriting.ModifiedPomXMLEventReader;
+import org.eclipse.aether.RepositorySystem;
 
 import static java.util.Collections.singletonList;
 import static java.util.Optional.empty;
@@ -89,11 +90,11 @@ public class UseLatestSnapshotsMojo extends UseLatestVersionsMojoBase {
 
     @Inject
     public UseLatestSnapshotsMojo(
+            ArtifactHandlerManager artifactHandlerManager,
             RepositorySystem repositorySystem,
-            org.eclipse.aether.RepositorySystem aetherRepositorySystem,
             Map<String, Wagon> wagonMap,
             Map<String, ChangeRecorder> changeRecorders) {
-        super(repositorySystem, aetherRepositorySystem, wagonMap, changeRecorders);
+        super(artifactHandlerManager, repositorySystem, wagonMap, changeRecorders);
     }
 
     /**
diff --git a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/UseLatestVersionsMojo.java b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/UseLatestVersionsMojo.java
index f74455f5..665b0815 100644
--- a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/UseLatestVersionsMojo.java
+++ b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/UseLatestVersionsMojo.java
@@ -23,6 +23,7 @@ import java.util.Collection;
 import java.util.Map;
 import java.util.Optional;
 
+import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager;
 import org.apache.maven.model.Dependency;
 import org.apache.maven.model.DependencyManagement;
 import org.apache.maven.plugin.MojoExecutionException;
@@ -30,7 +31,6 @@ import org.apache.maven.plugin.MojoFailureException;
 import org.apache.maven.plugin.logging.Log;
 import org.apache.maven.plugins.annotations.Mojo;
 import org.apache.maven.plugins.annotations.Parameter;
-import org.apache.maven.repository.RepositorySystem;
 import org.apache.maven.wagon.Wagon;
 import org.codehaus.mojo.versions.api.PomHelper;
 import org.codehaus.mojo.versions.api.Segment;
@@ -39,6 +39,7 @@ import org.codehaus.mojo.versions.api.recording.ChangeRecorder;
 import org.codehaus.mojo.versions.api.recording.DependencyChangeRecord;
 import org.codehaus.mojo.versions.ordering.InvalidSegmentException;
 import org.codehaus.mojo.versions.rewriting.ModifiedPomXMLEventReader;
+import org.eclipse.aether.RepositorySystem;
 
 import static java.util.Collections.singletonList;
 import static java.util.Optional.empty;
@@ -96,11 +97,11 @@ public class UseLatestVersionsMojo extends UseLatestVersionsMojoBase {
 
     @Inject
     public UseLatestVersionsMojo(
+            ArtifactHandlerManager artifactHandlerManager,
             RepositorySystem repositorySystem,
-            org.eclipse.aether.RepositorySystem aetherRepositorySystem,
             Map<String, Wagon> wagonMap,
             Map<String, ChangeRecorder> changeRecorders) {
-        super(repositorySystem, aetherRepositorySystem, wagonMap, changeRecorders);
+        super(artifactHandlerManager, repositorySystem, wagonMap, changeRecorders);
     }
 
     @Override
diff --git a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/UseLatestVersionsMojoBase.java b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/UseLatestVersionsMojoBase.java
index d9ee7f2d..413fd1ad 100644
--- a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/UseLatestVersionsMojoBase.java
+++ b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/UseLatestVersionsMojoBase.java
@@ -25,10 +25,10 @@ import java.util.function.BiFunction;
 import java.util.function.Predicate;
 
 import org.apache.maven.artifact.Artifact;
+import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager;
 import org.apache.maven.artifact.versioning.ArtifactVersion;
 import org.apache.maven.model.Dependency;
 import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.repository.RepositorySystem;
 import org.apache.maven.wagon.Wagon;
 import org.codehaus.mojo.versions.api.ArtifactVersions;
 import org.codehaus.mojo.versions.api.VersionRetrievalException;
@@ -36,6 +36,7 @@ import org.codehaus.mojo.versions.api.recording.ChangeRecorder;
 import org.codehaus.mojo.versions.api.recording.DependencyChangeRecord;
 import org.codehaus.mojo.versions.rewriting.ModifiedPomXMLEventReader;
 import org.codehaus.mojo.versions.utils.DefaultArtifactVersionCache;
+import org.eclipse.aether.RepositorySystem;
 
 /**
  * Common base class for {@link UseLatestVersionsMojo}
@@ -43,11 +44,11 @@ import org.codehaus.mojo.versions.utils.DefaultArtifactVersionCache;
  */
 public abstract class UseLatestVersionsMojoBase extends AbstractVersionsDependencyUpdaterMojo {
     public UseLatestVersionsMojoBase(
+            ArtifactHandlerManager artifactHandlerManager,
             RepositorySystem repositorySystem,
-            org.eclipse.aether.RepositorySystem aetherRepositorySystem,
             Map<String, Wagon> wagonMap,
             Map<String, ChangeRecorder> changeRecorders) {
-        super(repositorySystem, aetherRepositorySystem, wagonMap, changeRecorders);
+        super(artifactHandlerManager, repositorySystem, wagonMap, changeRecorders);
     }
 
     /**
diff --git a/versions-maven-plugin/src/test/java/org/codehaus/mojo/versions/DependencyUpdatesReportMojoTest.java b/versions-maven-plugin/src/test/java/org/codehaus/mojo/versions/DependencyUpdatesReportMojoTest.java
index 110bf9e1..1795bd5b 100644
--- a/versions-maven-plugin/src/test/java/org/codehaus/mojo/versions/DependencyUpdatesReportMojoTest.java
+++ b/versions-maven-plugin/src/test/java/org/codehaus/mojo/versions/DependencyUpdatesReportMojoTest.java
@@ -40,14 +40,15 @@ import org.codehaus.mojo.versions.reporting.ReportRendererFactoryImpl;
 import org.codehaus.mojo.versions.utils.DependencyBuilder;
 import org.codehaus.mojo.versions.utils.MockUtils;
 import org.codehaus.plexus.i18n.I18N;
+import org.eclipse.aether.RepositorySystem;
 import org.hamcrest.Matchers;
 import org.junit.Test;
 
 import static org.apache.maven.artifact.Artifact.SCOPE_COMPILE;
 import static org.codehaus.mojo.versions.utils.MockUtils.mockAetherRepositorySystem;
+import static org.codehaus.mojo.versions.utils.MockUtils.mockArtifactHandlerManager;
 import static org.codehaus.mojo.versions.utils.MockUtils.mockI18N;
 import static org.codehaus.mojo.versions.utils.MockUtils.mockMavenSession;
-import static org.codehaus.mojo.versions.utils.MockUtils.mockRepositorySystem;
 import static org.hamcrest.CoreMatchers.allOf;
 import static org.hamcrest.CoreMatchers.containsString;
 import static org.hamcrest.CoreMatchers.not;
@@ -67,7 +68,7 @@ public class DependencyUpdatesReportMojoTest {
         TestDependencyUpdatesReportMojo() {
             super(
                     MOCK_I18N,
-                    mockRepositorySystem(),
+                    mockArtifactHandlerManager(),
                     mockAetherRepositorySystem(),
                     null,
                     new ReportRendererFactoryImpl(MOCK_I18N));
@@ -86,9 +87,8 @@ public class DependencyUpdatesReportMojoTest {
             return this;
         }
 
-        public TestDependencyUpdatesReportMojo withAetherRepositorySystem(
-                org.eclipse.aether.RepositorySystem repositorySystem) {
-            this.aetherRepositorySystem = repositorySystem;
+        public TestDependencyUpdatesReportMojo withAetherRepositorySystem(RepositorySystem repositorySystem) {
+            this.repositorySystem = repositorySystem;
             return this;
         }
 
diff --git a/versions-maven-plugin/src/test/java/org/codehaus/mojo/versions/DisplayDependencyUpdatesMojoTest.java b/versions-maven-plugin/src/test/java/org/codehaus/mojo/versions/DisplayDependencyUpdatesMojoTest.java
index c0f83a2b..04b9f3ae 100644
--- a/versions-maven-plugin/src/test/java/org/codehaus/mojo/versions/DisplayDependencyUpdatesMojoTest.java
+++ b/versions-maven-plugin/src/test/java/org/codehaus/mojo/versions/DisplayDependencyUpdatesMojoTest.java
@@ -40,8 +40,8 @@ import static java.util.Collections.singletonList;
 import static org.codehaus.mojo.versions.model.TestIgnoreVersions.TYPE_REGEX;
 import static org.codehaus.mojo.versions.model.TestIgnoreVersions.matches;
 import static org.codehaus.mojo.versions.utils.MockUtils.mockAetherRepositorySystem;
+import static org.codehaus.mojo.versions.utils.MockUtils.mockArtifactHandlerManager;
 import static org.codehaus.mojo.versions.utils.MockUtils.mockMavenSession;
-import static org.codehaus.mojo.versions.utils.MockUtils.mockRepositorySystem;
 import static org.hamcrest.MatcherAssert.assertThat;
 import static org.hamcrest.Matchers.anyOf;
 import static org.hamcrest.Matchers.containsInAnyOrder;
@@ -100,7 +100,7 @@ public class DisplayDependencyUpdatesMojoTest extends AbstractMojoTestCase {
 
             // This is just an example of how to create it-style tests as unit tests; the advantage is easier debugging
             mojo.outputFile = tempFile.getPath().toFile();
-            mojo.aetherRepositorySystem = mockAetherRepositorySystem(new HashMap<String, String[]>() {
+            mojo.repositorySystem = mockAetherRepositorySystem(new HashMap<String, String[]>() {
                 {
                     put("dummy-api", new String[] {"1.0.0", "1.0.1", "1.1.0-M1", "1.2.0-SNAPSHOT"});
                 }
@@ -137,7 +137,7 @@ public class DisplayDependencyUpdatesMojoTest extends AbstractMojoTestCase {
     public void testVersionsWithQualifiersNotConsideredAsMinorUpdates() throws Exception {
         try (CloseableTempFile tempFile = new CloseableTempFile("display-dependency-updates")) {
             new DisplayDependencyUpdatesMojo(
-                    mockRepositorySystem(),
+                    mockArtifactHandlerManager(),
                     mockAetherRepositorySystem(new HashMap<String, String[]>() {
                         {
                             put(
@@ -174,7 +174,7 @@ public class DisplayDependencyUpdatesMojoTest extends AbstractMojoTestCase {
     public void testAllowMajorUpdatesFalse() throws Exception {
         try (CloseableTempFile tempFile = new CloseableTempFile("display-dependency-updates")) {
             new DisplayDependencyUpdatesMojo(
-                    mockRepositorySystem(),
+                    mockArtifactHandlerManager(),
                     mockAetherRepositorySystem(new HashMap<String, String[]>() {
                         {
                             put("default-dependency", new String[] {"1.0.0", "1.1.0", "2.0.0"});
@@ -206,7 +206,7 @@ public class DisplayDependencyUpdatesMojoTest extends AbstractMojoTestCase {
     public void testAllowMinorUpdatesFalse() throws Exception {
         try (CloseableTempFile tempFile = new CloseableTempFile("display-dependency-updates")) {
             new DisplayDependencyUpdatesMojo(
-                    mockRepositorySystem(),
+                    mockArtifactHandlerManager(),
                     mockAetherRepositorySystem(new HashMap<String, String[]>() {
                         {
                             put("default-dependency", new String[] {"1.0.0", "1.0.1", "1.1.0", "2.0.0"});
@@ -239,7 +239,7 @@ public class DisplayDependencyUpdatesMojoTest extends AbstractMojoTestCase {
     public void testAllowIncrementalUpdatesFalse() throws Exception {
         try (CloseableTempFile tempFile = new CloseableTempFile("display-dependency-updates")) {
             new DisplayDependencyUpdatesMojo(
-                    mockRepositorySystem(),
+                    mockArtifactHandlerManager(),
                     mockAetherRepositorySystem(new HashMap<String, String[]>() {
                         {
                             put("default-dependency", new String[] {"1.0.0", "1.0.0-1", "1.0.1", "1.1.0", "2.0.0"});
@@ -273,7 +273,7 @@ public class DisplayDependencyUpdatesMojoTest extends AbstractMojoTestCase {
     public void testVersionsWithQualifiersNotConsideredAsIncrementalUpdates() throws Exception {
         try (CloseableTempFile tempFile = new CloseableTempFile("display-dependency-updates")) {
             new DisplayDependencyUpdatesMojo(
-                    mockRepositorySystem(),
+                    mockArtifactHandlerManager(),
                     mockAetherRepositorySystem(new HashMap<String, String[]>() {
                         {
                             put(
@@ -332,7 +332,7 @@ public class DisplayDependencyUpdatesMojoTest extends AbstractMojoTestCase {
 
             // This is just an example of how to create it-style tests as unit tests; the advantage is easier debugging
             mojo.outputFile = tempFile.getPath().toFile();
-            mojo.aetherRepositorySystem = mockAetherRepositorySystem(new HashMap<String, String[]>() {
+            mojo.repositorySystem = mockAetherRepositorySystem(new HashMap<String, String[]>() {
                 {
                     put("dummy-api", new String[] {"1.0.0", "1.0.1", "1.1.0-M1", "1.2.0-SNAPSHOT"});
                 }
@@ -355,7 +355,7 @@ public class DisplayDependencyUpdatesMojoTest extends AbstractMojoTestCase {
 
             // This is just an example of how to create it-style tests as unit tests; the advantage is easier debugging
             mojo.outputFile = tempFile.getPath().toFile();
-            mojo.aetherRepositorySystem = mockAetherRepositorySystem(new HashMap<String, String[]>() {
+            mojo.repositorySystem = mockAetherRepositorySystem(new HashMap<String, String[]>() {
                 {
                     put("dummy-api", new String[] {"2.0.1"});
                 }
@@ -371,7 +371,7 @@ public class DisplayDependencyUpdatesMojoTest extends AbstractMojoTestCase {
     public void testAllowSnapshots() throws Exception {
         try (CloseableTempFile tempFile = new CloseableTempFile("display-dependency-updates")) {
             new DisplayDependencyUpdatesMojo(
-                    mockRepositorySystem(),
+                    mockArtifactHandlerManager(),
                     mockAetherRepositorySystem(new HashMap<String, String[]>() {
                         {
                             put("default-dependency", new String[] {"2.0.0-SNAPSHOT"});
@@ -401,7 +401,7 @@ public class DisplayDependencyUpdatesMojoTest extends AbstractMojoTestCase {
     private void testAllowUpdatesFromLesserSegments(String availableVersion) throws Exception {
         try (CloseableTempFile tempFile = new CloseableTempFile("display-dependency-updates")) {
             new DisplayDependencyUpdatesMojo(
-                    mockRepositorySystem(),
+                    mockArtifactHandlerManager(),
                     mockAetherRepositorySystem(new HashMap<String, String[]>() {
                         {
                             put("default-dependency", new String[] {availableVersion});
diff --git a/versions-maven-plugin/src/test/java/org/codehaus/mojo/versions/DisplayExtensionUpdatesMojoTest.java b/versions-maven-plugin/src/test/java/org/codehaus/mojo/versions/DisplayExtensionUpdatesMojoTest.java
index 2b8aec91..ed5ecfc6 100644
--- a/versions-maven-plugin/src/test/java/org/codehaus/mojo/versions/DisplayExtensionUpdatesMojoTest.java
+++ b/versions-maven-plugin/src/test/java/org/codehaus/mojo/versions/DisplayExtensionUpdatesMojoTest.java
@@ -40,8 +40,8 @@ import static java.util.Collections.singleton;
 import static java.util.Collections.singletonList;
 import static org.apache.maven.plugin.testing.ArtifactStubFactory.setVariableValueToObject;
 import static org.codehaus.mojo.versions.utils.MockUtils.mockAetherRepositorySystem;
+import static org.codehaus.mojo.versions.utils.MockUtils.mockArtifactHandlerManager;
 import static org.codehaus.mojo.versions.utils.MockUtils.mockMavenSession;
-import static org.codehaus.mojo.versions.utils.MockUtils.mockRepositorySystem;
 import static org.hamcrest.MatcherAssert.assertThat;
 import static org.hamcrest.Matchers.containsString;
 import static org.hamcrest.Matchers.empty;
@@ -59,7 +59,7 @@ public class DisplayExtensionUpdatesMojoTest {
 
     @Before
     public void setUp() throws IllegalAccessException, IOException {
-        mojo = new DisplayExtensionUpdatesMojo(mockRepositorySystem(), mockAetherRepositorySystem(), null, null);
+        mojo = new DisplayExtensionUpdatesMojo(mockArtifactHandlerManager(), mockAetherRepositorySystem(), null, null);
         mojo.project = new MavenProject() {
             {
                 setModel(new Model() {
diff --git a/versions-maven-plugin/src/test/java/org/codehaus/mojo/versions/DisplayParentUpdatesMojoTest.java b/versions-maven-plugin/src/test/java/org/codehaus/mojo/versions/DisplayParentUpdatesMojoTest.java
index c3cc4b3f..5165c50b 100644
--- a/versions-maven-plugin/src/test/java/org/codehaus/mojo/versions/DisplayParentUpdatesMojoTest.java
+++ b/versions-maven-plugin/src/test/java/org/codehaus/mojo/versions/DisplayParentUpdatesMojoTest.java
@@ -25,19 +25,19 @@ import java.util.HashMap;
 
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.artifact.DefaultArtifact;
+import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager;
 import org.apache.maven.artifact.versioning.ArtifactVersion;
 import org.apache.maven.artifact.versioning.InvalidVersionSpecificationException;
 import org.apache.maven.artifact.versioning.VersionRange;
-import org.apache.maven.model.Dependency;
 import org.apache.maven.model.Model;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.MojoFailureException;
 import org.apache.maven.plugin.testing.stubs.DefaultArtifactHandlerStub;
 import org.apache.maven.project.MavenProject;
-import org.apache.maven.repository.RepositorySystem;
 import org.codehaus.mojo.versions.api.VersionRetrievalException;
 import org.codehaus.mojo.versions.ordering.InvalidSegmentException;
 import org.codehaus.mojo.versions.utils.TestUtils;
+import org.eclipse.aether.RepositorySystem;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.BeforeClass;
@@ -47,22 +47,20 @@ import static java.util.Collections.singleton;
 import static org.apache.maven.artifact.Artifact.SCOPE_COMPILE;
 import static org.apache.maven.plugin.testing.ArtifactStubFactory.setVariableValueToObject;
 import static org.codehaus.mojo.versions.utils.MockUtils.mockAetherRepositorySystem;
+import static org.codehaus.mojo.versions.utils.MockUtils.mockArtifactHandlerManager;
 import static org.codehaus.mojo.versions.utils.MockUtils.mockMavenSession;
 import static org.hamcrest.MatcherAssert.assertThat;
 import static org.hamcrest.Matchers.is;
 import static org.hamcrest.Matchers.notNullValue;
 import static org.hamcrest.Matchers.nullValue;
 import static org.hamcrest.Matchers.stringContainsInOrder;
-import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
 
 public class DisplayParentUpdatesMojoTest {
     private DisplayParentUpdatesMojo mojo;
 
-    private static RepositorySystem repositorySystem;
+    private static ArtifactHandlerManager artifactHandlerManager;
 
-    private static org.eclipse.aether.RepositorySystem aetherRepositorySystem;
+    private static RepositorySystem repositorySystem;
 
     private Path tempDir;
 
@@ -70,8 +68,8 @@ public class DisplayParentUpdatesMojoTest {
 
     @BeforeClass
     public static void setUpStatic() {
-        repositorySystem = mockRepositorySystem();
-        aetherRepositorySystem = mockAetherRepositorySystem(new HashMap<String, String[]>() {
+        artifactHandlerManager = mockArtifactHandlerManager();
+        repositorySystem = mockAetherRepositorySystem(new HashMap<String, String[]>() {
             {
                 put("parent-artifact", new String[] {"0.9.0", "1.0.0", "1.0.1-SNAPSHOT"});
                 put("issue-670-artifact", new String[] {"0.0.1-1", "0.0.1-1-impl-SNAPSHOT"});
@@ -86,7 +84,7 @@ public class DisplayParentUpdatesMojoTest {
     public void setUp() throws IllegalAccessException, IOException {
         tempDir = TestUtils.createTempDir("display-property-updates");
         tempFile = Files.createTempFile(tempDir, "output", "");
-        mojo = new DisplayParentUpdatesMojo(repositorySystem, aetherRepositorySystem, null, null) {
+        mojo = new DisplayParentUpdatesMojo(artifactHandlerManager, repositorySystem, null, null) {
             {
                 setProject(createProject());
                 reactorProjects = Collections.emptyList();
@@ -124,22 +122,6 @@ public class DisplayParentUpdatesMojoTest {
         };
     }
 
-    private static RepositorySystem mockRepositorySystem() {
-        RepositorySystem repositorySystem = mock(RepositorySystem.class);
-        when(repositorySystem.createDependencyArtifact(any(Dependency.class))).thenAnswer(invocation -> {
-            Dependency dependency = invocation.getArgument(0);
-            return new DefaultArtifact(
-                    dependency.getGroupId(),
-                    dependency.getArtifactId(),
-                    dependency.getVersion(),
-                    dependency.getScope(),
-                    dependency.getType(),
-                    dependency.getClassifier() != null ? dependency.getClassifier() : "default",
-                    new DefaultArtifactHandlerStub("default"));
-        });
-        return repositorySystem;
-    }
-
     @Test
     public void testArtifactIdDoesNotExist()
             throws MojoExecutionException, InvalidVersionSpecificationException, VersionRetrievalException {
diff --git a/versions-maven-plugin/src/test/java/org/codehaus/mojo/versions/DisplayPluginUpdatesMojoTest.java b/versions-maven-plugin/src/test/java/org/codehaus/mojo/versions/DisplayPluginUpdatesMojoTest.java
index 0d92873a..61c79ac7 100644
--- a/versions-maven-plugin/src/test/java/org/codehaus/mojo/versions/DisplayPluginUpdatesMojoTest.java
+++ b/versions-maven-plugin/src/test/java/org/codehaus/mojo/versions/DisplayPluginUpdatesMojoTest.java
@@ -99,7 +99,7 @@ public class DisplayPluginUpdatesMojoTest extends AbstractMojoTestCase {
         mojo.outputEncoding = UTF_8;
         mojo.outputFile = outputPath.toFile();
         mojo.setPluginContext(new HashMap<>());
-        mojo.aetherRepositorySystem = mockAetherRepositorySystem(new HashMap<String, String[]>() {
+        mojo.repositorySystem = mockAetherRepositorySystem(new HashMap<String, String[]>() {
             {
                 put("default-plugin", new String[] {"1.0.0"});
                 put("maven-enforcer-plugin", new String[] {"3.0.0"});
diff --git a/versions-maven-plugin/src/test/java/org/codehaus/mojo/versions/DisplayPropertyUpdatesMojoTest.java b/versions-maven-plugin/src/test/java/org/codehaus/mojo/versions/DisplayPropertyUpdatesMojoTest.java
index 0e526ef2..f6114ec8 100644
--- a/versions-maven-plugin/src/test/java/org/codehaus/mojo/versions/DisplayPropertyUpdatesMojoTest.java
+++ b/versions-maven-plugin/src/test/java/org/codehaus/mojo/versions/DisplayPropertyUpdatesMojoTest.java
@@ -70,7 +70,7 @@ public class DisplayPropertyUpdatesMojoTest extends AbstractMojoTestCase {
         mojo.outputEncoding = UTF_8;
         mojo.outputFile = tempFile.toFile();
         mojo.setPluginContext(new HashMap<>());
-        mojo.aetherRepositorySystem = mockAetherRepositorySystem();
+        mojo.repositorySystem = mockAetherRepositorySystem();
         mojo.includeParent = true;
         mojo.execute();
 
@@ -88,7 +88,7 @@ public class DisplayPropertyUpdatesMojoTest extends AbstractMojoTestCase {
         mojo.outputEncoding = UTF_8;
         mojo.outputFile = tempFile.toFile();
         mojo.setPluginContext(new HashMap<>());
-        mojo.aetherRepositorySystem = mockAetherRepositorySystem();
+        mojo.repositorySystem = mockAetherRepositorySystem();
         mojo.includeParent = false;
         mojo.execute();
 
@@ -105,7 +105,7 @@ public class DisplayPropertyUpdatesMojoTest extends AbstractMojoTestCase {
         mojo.outputEncoding = UTF_8;
         mojo.outputFile = tempFile.toFile();
         mojo.setPluginContext(new HashMap<>());
-        mojo.aetherRepositorySystem = mockAetherRepositorySystem(new HashMap<String, String[]>() {
+        mojo.repositorySystem = mockAetherRepositorySystem(new HashMap<String, String[]>() {
             {
                 put("artifactA", new String[] {availableVersion, "2"});
             }
diff --git a/versions-maven-plugin/src/test/java/org/codehaus/mojo/versions/ForceReleasesMojoTest.java b/versions-maven-plugin/src/test/java/org/codehaus/mojo/versions/ForceReleasesMojoTest.java
index 4e44888d..6e610b33 100644
--- a/versions-maven-plugin/src/test/java/org/codehaus/mojo/versions/ForceReleasesMojoTest.java
+++ b/versions-maven-plugin/src/test/java/org/codehaus/mojo/versions/ForceReleasesMojoTest.java
@@ -22,8 +22,8 @@ import static java.util.Collections.singletonList;
 import static java.util.Collections.singletonMap;
 import static org.apache.maven.artifact.Artifact.SCOPE_COMPILE;
 import static org.codehaus.mojo.versions.utils.MockUtils.mockAetherRepositorySystem;
+import static org.codehaus.mojo.versions.utils.MockUtils.mockArtifactHandlerManager;
 import static org.codehaus.mojo.versions.utils.MockUtils.mockMavenSession;
-import static org.codehaus.mojo.versions.utils.MockUtils.mockRepositorySystem;
 import static org.hamcrest.MatcherAssert.assertThat;
 import static org.hamcrest.Matchers.hasItem;
 import static org.hamcrest.Matchers.startsWith;
@@ -57,7 +57,7 @@ public class ForceReleasesMojoTest extends AbstractMojoTestCase {
     public void setUp() throws IllegalAccessException {
         changeRecorder = new TestChangeRecorder();
         mojo = new ForceReleasesMojo(
-                mockRepositorySystem(), mockAetherRepositorySystem(), null, changeRecorder.asTestMap());
+                mockArtifactHandlerManager(), mockAetherRepositorySystem(), null, changeRecorder.asTestMap());
         setVariableValueToObject(mojo, "reactorProjects", emptyList());
         mojo.project = new MavenProject() {
             {
@@ -189,7 +189,7 @@ public class ForceReleasesMojoTest extends AbstractMojoTestCase {
     @Test
     public void testFailIfNotReplaced()
             throws MojoExecutionException, XMLStreamException, MojoFailureException, VersionRetrievalException {
-        mojo.aetherRepositorySystem = mockAetherRepositorySystem(singletonMap("test-artifact", new String[] {}));
+        mojo.repositorySystem = mockAetherRepositorySystem(singletonMap("test-artifact", new String[] {}));
         mojo.getProject()
                 .setDependencies(singletonList(DependencyBuilder.newBuilder()
                         .withGroupId("default-group")
diff --git a/versions-maven-plugin/src/test/java/org/codehaus/mojo/versions/ParentUpdatesReportMojoTest.java b/versions-maven-plugin/src/test/java/org/codehaus/mojo/versions/ParentUpdatesReportMojoTest.java
index 78a82608..579aa1d0 100644
--- a/versions-maven-plugin/src/test/java/org/codehaus/mojo/versions/ParentUpdatesReportMojoTest.java
+++ b/versions-maven-plugin/src/test/java/org/codehaus/mojo/versions/ParentUpdatesReportMojoTest.java
@@ -39,9 +39,9 @@ import org.codehaus.plexus.i18n.I18N;
 import org.junit.Test;
 
 import static org.codehaus.mojo.versions.utils.MockUtils.mockAetherRepositorySystem;
+import static org.codehaus.mojo.versions.utils.MockUtils.mockArtifactHandlerManager;
 import static org.codehaus.mojo.versions.utils.MockUtils.mockI18N;
 import static org.codehaus.mojo.versions.utils.MockUtils.mockMavenSession;
-import static org.codehaus.mojo.versions.utils.MockUtils.mockRepositorySystem;
 import static org.hamcrest.CoreMatchers.containsString;
 import static org.hamcrest.MatcherAssert.assertThat;
 import static org.hamcrest.Matchers.allOf;
@@ -60,7 +60,7 @@ public class ParentUpdatesReportMojoTest {
         SinkFactory sinkFactory = new Xhtml5SinkFactory();
         new ParentUpdatesReportMojo(
                 MOCK_I18N,
-                mockRepositorySystem(),
+                mockArtifactHandlerManager(),
                 mockAetherRepositorySystem(new HashMap<String, String[]>() {
                     {
                         put("default-artifact", new String[] {"1.0.0", "1.0.1", "1.1.0", "2.0.0", "2.0.1-SNAPSHOT"});
diff --git a/versions-maven-plugin/src/test/java/org/codehaus/mojo/versions/PluginUpdatesReportMojoTest.java b/versions-maven-plugin/src/test/java/org/codehaus/mojo/versions/PluginUpdatesReportMojoTest.java
index 4a752b08..3040378d 100644
--- a/versions-maven-plugin/src/test/java/org/codehaus/mojo/versions/PluginUpdatesReportMojoTest.java
+++ b/versions-maven-plugin/src/test/java/org/codehaus/mojo/versions/PluginUpdatesReportMojoTest.java
@@ -28,24 +28,22 @@ import java.util.HashMap;
 import java.util.Locale;
 import java.util.Set;
 
-import org.apache.maven.artifact.DefaultArtifact;
 import org.apache.maven.doxia.module.xhtml5.Xhtml5SinkFactory;
 import org.apache.maven.doxia.sink.SinkFactory;
 import org.apache.maven.model.Build;
 import org.apache.maven.model.Plugin;
 import org.apache.maven.model.PluginManagement;
-import org.apache.maven.plugin.testing.stubs.DefaultArtifactHandlerStub;
 import org.apache.maven.project.MavenProject;
 import org.apache.maven.reporting.MavenReportException;
-import org.apache.maven.repository.RepositorySystem;
 import org.codehaus.mojo.versions.model.RuleSet;
 import org.codehaus.mojo.versions.reporting.ReportRendererFactoryImpl;
 import org.codehaus.mojo.versions.utils.MockUtils;
 import org.codehaus.plexus.i18n.I18N;
+import org.eclipse.aether.RepositorySystem;
 import org.junit.Test;
 
-import static org.apache.maven.artifact.Artifact.SCOPE_RUNTIME;
 import static org.codehaus.mojo.versions.utils.MockUtils.mockAetherRepositorySystem;
+import static org.codehaus.mojo.versions.utils.MockUtils.mockArtifactHandlerManager;
 import static org.codehaus.mojo.versions.utils.MockUtils.mockI18N;
 import static org.codehaus.mojo.versions.utils.MockUtils.mockMavenSession;
 import static org.hamcrest.CoreMatchers.containsString;
@@ -53,9 +51,6 @@ import static org.hamcrest.CoreMatchers.not;
 import static org.hamcrest.MatcherAssert.assertThat;
 import static org.hamcrest.Matchers.anyOf;
 import static org.hamcrest.Matchers.matchesPattern;
-import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
 
 /**
  * Basic tests for {@linkplain PluginUpdatesReportMojo}.
@@ -69,7 +64,7 @@ public class PluginUpdatesReportMojoTest {
         TestPluginUpdatesReportMojo() {
             super(
                     MOCK_I18N,
-                    mockRepositorySystem(),
+                    mockArtifactHandlerManager(),
                     mockAetherRepositorySystem(),
                     null,
                     new ReportRendererFactoryImpl(MOCK_I18N));
@@ -87,9 +82,8 @@ public class PluginUpdatesReportMojoTest {
             return this;
         }
 
-        public TestPluginUpdatesReportMojo withAetherRepositorySystem(
-                org.eclipse.aether.RepositorySystem repositorySystem) {
-            this.aetherRepositorySystem = repositorySystem;
+        public TestPluginUpdatesReportMojo withAetherRepositorySystem(RepositorySystem repositorySystem) {
+            this.repositorySystem = repositorySystem;
             return this;
         }
 
@@ -117,22 +111,6 @@ public class PluginUpdatesReportMojoTest {
             this.ignoredVersions = ignoredVersions;
             return this;
         }
-
-        private static RepositorySystem mockRepositorySystem() {
-            RepositorySystem repositorySystem = mock(RepositorySystem.class);
-            when(repositorySystem.createPluginArtifact(any(Plugin.class))).thenAnswer(invocation -> {
-                Plugin plugin = invocation.getArgument(0);
-                return new DefaultArtifact(
-                        plugin.getGroupId(),
-                        plugin.getArtifactId(),
-                        plugin.getVersion(),
-                        SCOPE_RUNTIME,
-                        "maven-plugin",
-                        "jar",
-                        new DefaultArtifactHandlerStub("default"));
-            });
-            return repositorySystem;
-        }
     }
 
     private static Plugin pluginOf(String artifactId) {
diff --git a/versions-maven-plugin/src/test/java/org/codehaus/mojo/versions/PropertyUpdatesReportMojoTest.java b/versions-maven-plugin/src/test/java/org/codehaus/mojo/versions/PropertyUpdatesReportMojoTest.java
index 7dba45d2..a0769942 100644
--- a/versions-maven-plugin/src/test/java/org/codehaus/mojo/versions/PropertyUpdatesReportMojoTest.java
+++ b/versions-maven-plugin/src/test/java/org/codehaus/mojo/versions/PropertyUpdatesReportMojoTest.java
@@ -28,6 +28,7 @@ import org.apache.maven.doxia.sink.SinkFactory;
 import org.apache.maven.doxia.tools.SiteTool;
 import org.apache.maven.plugin.testing.AbstractMojoTestCase;
 import org.apache.maven.plugin.testing.MojoRule;
+import org.eclipse.aether.RepositorySystem;
 import org.junit.Rule;
 import org.junit.Test;
 
@@ -44,7 +45,7 @@ public class PropertyUpdatesReportMojoTest extends AbstractMojoTestCase {
     @Rule
     public MojoRule mojoRule = new MojoRule(this);
 
-    private static final org.eclipse.aether.RepositorySystem AETHER_REPOSITORY_SYSTEM = mockAetherRepositorySystem();
+    private static final RepositorySystem AETHER_REPOSITORY_SYSTEM = mockAetherRepositorySystem();
     private static final SiteTool SITE_TOOL = mockSiteTool();
 
     @Test
@@ -56,7 +57,7 @@ public class PropertyUpdatesReportMojoTest extends AbstractMojoTestCase {
                 new File("src/test/resources/org/codehaus/mojo/display-property-updates/issue-367/child"),
                 "property-updates-report");
         setVariableValueToObject(mojo, "siteTool", SITE_TOOL);
-        setVariableValueToObject(mojo, "aetherRepositorySystem", AETHER_REPOSITORY_SYSTEM);
+        setVariableValueToObject(mojo, "repositorySystem", AETHER_REPOSITORY_SYSTEM);
         setVariableValueToObject(mojo, "includeParent", true);
         mojo.generate(sinkFactory.createSink(os), sinkFactory, Locale.getDefault());
 
@@ -76,7 +77,7 @@ public class PropertyUpdatesReportMojoTest extends AbstractMojoTestCase {
                 new File("src/test/resources/org/codehaus/mojo/display-property-updates/issue-367/child"),
                 "property-updates-report");
         setVariableValueToObject(mojo, "siteTool", SITE_TOOL);
-        setVariableValueToObject(mojo, "aetherRepositorySystem", AETHER_REPOSITORY_SYSTEM);
+        setVariableValueToObject(mojo, "repositorySystem", AETHER_REPOSITORY_SYSTEM);
         setVariableValueToObject(mojo, "includeParent", false);
         mojo.generate(sinkFactory.createSink(os), sinkFactory, Locale.getDefault());
 
diff --git a/versions-maven-plugin/src/test/java/org/codehaus/mojo/versions/SetPropertyMojoTest.java b/versions-maven-plugin/src/test/java/org/codehaus/mojo/versions/SetPropertyMojoTest.java
index 19537af9..b4826170 100644
--- a/versions-maven-plugin/src/test/java/org/codehaus/mojo/versions/SetPropertyMojoTest.java
+++ b/versions-maven-plugin/src/test/java/org/codehaus/mojo/versions/SetPropertyMojoTest.java
@@ -79,8 +79,8 @@ public class SetPropertyMojoTest extends AbstractMojoTestCase {
         copyDir(Paths.get("src/test/resources/org/codehaus/mojo/set-property/null-new-version"), pomDir);
         SetPropertyMojo mojo = (SetPropertyMojo) mojoRule.lookupConfiguredMojo(pomDir.toFile(), "set-property");
 
-        mojo.aetherRepositorySystem = mock(org.eclipse.aether.RepositorySystem.class);
-        when(mojo.aetherRepositorySystem.resolveVersionRange(any(), any(VersionRangeRequest.class)))
+        mojo.repositorySystem = mock(org.eclipse.aether.RepositorySystem.class);
+        when(mojo.repositorySystem.resolveVersionRange(any(), any(VersionRangeRequest.class)))
                 .then(i -> new VersionRangeResult(i.getArgument(1)));
 
         setVariableValueToObject(mojo, "newVersion", null);
@@ -98,8 +98,8 @@ public class SetPropertyMojoTest extends AbstractMojoTestCase {
         copyDir(Paths.get("src/test/resources/org/codehaus/mojo/set-property/null-new-version"), pomDir);
         SetPropertyMojo mojo = (SetPropertyMojo) mojoRule.lookupConfiguredMojo(pomDir.toFile(), "set-property");
 
-        mojo.aetherRepositorySystem = mock(org.eclipse.aether.RepositorySystem.class);
-        when(mojo.aetherRepositorySystem.resolveVersionRange(any(), any(VersionRangeRequest.class)))
+        mojo.repositorySystem = mock(org.eclipse.aether.RepositorySystem.class);
+        when(mojo.repositorySystem.resolveVersionRange(any(), any(VersionRangeRequest.class)))
                 .then(i -> new VersionRangeResult(i.getArgument(1)));
 
         setVariableValueToObject(mojo, "newVersion", "");
@@ -184,8 +184,8 @@ public class SetPropertyMojoTest extends AbstractMojoTestCase {
         copyDir(Paths.get("src/test/resources/org/codehaus/mojo/set-property/profiled-new-version"), pomDir);
         SetPropertyMojo mojo = (SetPropertyMojo) mojoRule.lookupConfiguredMojo(pomDir.toFile(), "set-property");
 
-        mojo.aetherRepositorySystem = mock(org.eclipse.aether.RepositorySystem.class);
-        when(mojo.aetherRepositorySystem.resolveVersionRange(any(), any(VersionRangeRequest.class)))
+        mojo.repositorySystem = mock(org.eclipse.aether.RepositorySystem.class);
+        when(mojo.repositorySystem.resolveVersionRange(any(), any(VersionRangeRequest.class)))
                 .then(i -> new VersionRangeResult(i.getArgument(1)));
 
         setVariableValueToObject(mojo, "newVersion", newVersion);
diff --git a/versions-maven-plugin/src/test/java/org/codehaus/mojo/versions/UpdateParentMojoTest.java b/versions-maven-plugin/src/test/java/org/codehaus/mojo/versions/UpdateParentMojoTest.java
index 49808254..bedfd48b 100644
--- a/versions-maven-plugin/src/test/java/org/codehaus/mojo/versions/UpdateParentMojoTest.java
+++ b/versions-maven-plugin/src/test/java/org/codehaus/mojo/versions/UpdateParentMojoTest.java
@@ -22,21 +22,21 @@ import java.util.HashMap;
 
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.artifact.DefaultArtifact;
+import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager;
 import org.apache.maven.artifact.versioning.ArtifactVersion;
 import org.apache.maven.artifact.versioning.InvalidVersionSpecificationException;
 import org.apache.maven.artifact.versioning.VersionRange;
-import org.apache.maven.model.Dependency;
 import org.apache.maven.model.Model;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.MojoFailureException;
 import org.apache.maven.plugin.testing.stubs.DefaultArtifactHandlerStub;
 import org.apache.maven.project.MavenProject;
-import org.apache.maven.repository.RepositorySystem;
 import org.codehaus.mojo.versions.api.PomHelper;
 import org.codehaus.mojo.versions.api.VersionRetrievalException;
 import org.codehaus.mojo.versions.change.DefaultDependencyVersionChange;
 import org.codehaus.mojo.versions.ordering.InvalidSegmentException;
 import org.codehaus.mojo.versions.utils.TestChangeRecorder;
+import org.eclipse.aether.RepositorySystem;
 import org.junit.Before;
 import org.junit.BeforeClass;
 import org.junit.Test;
@@ -46,6 +46,7 @@ import static java.util.Collections.singleton;
 import static org.apache.maven.artifact.Artifact.SCOPE_COMPILE;
 import static org.apache.maven.plugin.testing.ArtifactStubFactory.setVariableValueToObject;
 import static org.codehaus.mojo.versions.utils.MockUtils.mockAetherRepositorySystem;
+import static org.codehaus.mojo.versions.utils.MockUtils.mockArtifactHandlerManager;
 import static org.codehaus.mojo.versions.utils.MockUtils.mockMavenSession;
 import static org.hamcrest.MatcherAssert.assertThat;
 import static org.hamcrest.Matchers.empty;
@@ -54,23 +55,21 @@ import static org.hamcrest.Matchers.is;
 import static org.hamcrest.Matchers.notNullValue;
 import static org.hamcrest.Matchers.nullValue;
 import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.mockStatic;
-import static org.mockito.Mockito.when;
 
 public class UpdateParentMojoTest {
     private TestChangeRecorder changeRecorder;
 
     private UpdateParentMojo mojo;
 
-    private static RepositorySystem repositorySystem;
+    private static ArtifactHandlerManager artifactHandlerManager;
 
-    private static org.eclipse.aether.RepositorySystem aetherRepositorySystem;
+    private static RepositorySystem repositorySystem;
 
     @BeforeClass
     public static void setUpStatic() {
-        repositorySystem = mockRepositorySystem();
-        aetherRepositorySystem = mockAetherRepositorySystem(new HashMap<String, String[]>() {
+        artifactHandlerManager = mockArtifactHandlerManager();
+        repositorySystem = mockAetherRepositorySystem(new HashMap<String, String[]>() {
             {
                 put("parent-artifact", new String[] {"0.9.0", "1.0.0", "1.0.1-SNAPSHOT"});
                 put("issue-670-artifact", new String[] {"0.0.1-1", "0.0.1-1-impl-SNAPSHOT"});
@@ -85,7 +84,7 @@ public class UpdateParentMojoTest {
     public void setUp() throws IllegalAccessException {
         changeRecorder = new TestChangeRecorder();
 
-        mojo = new UpdateParentMojo(repositorySystem, aetherRepositorySystem, null, changeRecorder.asTestMap()) {
+        mojo = new UpdateParentMojo(artifactHandlerManager, repositorySystem, null, changeRecorder.asTestMap()) {
             {
                 setProject(createProject());
                 reactorProjects = Collections.emptyList();
@@ -116,22 +115,6 @@ public class UpdateParentMojoTest {
         };
     }
 
-    private static RepositorySystem mockRepositorySystem() {
-        RepositorySystem repositorySystem = mock(RepositorySystem.class);
-        when(repositorySystem.createDependencyArtifact(any(Dependency.class))).thenAnswer(invocation -> {
-            Dependency dependency = invocation.getArgument(0);
-            return new DefaultArtifact(
-                    dependency.getGroupId(),
-                    dependency.getArtifactId(),
-                    dependency.getVersion(),
-                    dependency.getScope(),
-                    dependency.getType(),
-                    dependency.getClassifier() != null ? dependency.getClassifier() : "default",
-                    new DefaultArtifactHandlerStub("default"));
-        });
-        return repositorySystem;
-    }
-
     @Test
     @SuppressWarnings("deprecation")
     public void testArtifactIdDoesNotExist()
diff --git a/versions-maven-plugin/src/test/java/org/codehaus/mojo/versions/UpdatePropertiesMojoTest.java b/versions-maven-plugin/src/test/java/org/codehaus/mojo/versions/UpdatePropertiesMojoTest.java
index 220840ed..467cd837 100644
--- a/versions-maven-plugin/src/test/java/org/codehaus/mojo/versions/UpdatePropertiesMojoTest.java
+++ b/versions-maven-plugin/src/test/java/org/codehaus/mojo/versions/UpdatePropertiesMojoTest.java
@@ -97,7 +97,7 @@ public class UpdatePropertiesMojoTest extends UpdatePropertiesMojoTestBase {
         TestUtils.copyDir(Paths.get("src/test/resources/org/codehaus/mojo/update-properties/issue-929"), pomDir);
         UpdatePropertiesMojo mojo = setUpMojo("update-properties");
         mojo.allowMajorUpdates = false;
-        mojo.aetherRepositorySystem = mockAetherRepositorySystem(new HashMap<String, String[]>() {
+        mojo.repositorySystem = mockAetherRepositorySystem(new HashMap<String, String[]>() {
             {
                 put("artifactA", new String[] {"6.2.5.Final", "8.0.0.Final"});
             }
diff --git a/versions-maven-plugin/src/test/java/org/codehaus/mojo/versions/UpdatePropertiesMojoTestBase.java b/versions-maven-plugin/src/test/java/org/codehaus/mojo/versions/UpdatePropertiesMojoTestBase.java
index c4b971f1..b2729099 100644
--- a/versions-maven-plugin/src/test/java/org/codehaus/mojo/versions/UpdatePropertiesMojoTestBase.java
+++ b/versions-maven-plugin/src/test/java/org/codehaus/mojo/versions/UpdatePropertiesMojoTestBase.java
@@ -27,6 +27,7 @@ import org.apache.maven.plugin.testing.AbstractMojoTestCase;
 import org.apache.maven.plugin.testing.MojoRule;
 import org.codehaus.mojo.versions.api.recording.ChangeRecorder;
 import org.codehaus.mojo.versions.utils.TestChangeRecorder;
+import org.eclipse.aether.RepositorySystem;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Rule;
@@ -43,14 +44,14 @@ public abstract class UpdatePropertiesMojoTestBase extends AbstractMojoTestCase
     public MojoRule mojoRule = new MojoRule(this);
 
     protected Path pomDir;
-    protected org.eclipse.aether.RepositorySystem aetherRepositorySystem;
+    protected RepositorySystem repositorySystem;
     protected TestChangeRecorder changeRecorder;
 
     @Before
     public void setUp() throws Exception {
         super.setUp();
         pomDir = createTempDir("update-property");
-        aetherRepositorySystem = mockAetherRepositorySystem(new HashMap<String, String[]>() {
+        repositorySystem = mockAetherRepositorySystem(new HashMap<String, String[]>() {
             {
                 put("default-artifact", new String[] {"1.0.0", "1.0.1-rc1", "1.1.0-alpha", "2.0.0-M1"});
             }
@@ -69,7 +70,7 @@ public abstract class UpdatePropertiesMojoTestBase extends AbstractMojoTestCase
     @SuppressWarnings("unchecked")
     protected <T extends Mojo> T setUpMojo(String goal) throws Exception {
         T mojo = (T) mojoRule.lookupConfiguredMojo(pomDir.toFile(), goal);
-        setVariableValueToObject(mojo, "aetherRepositorySystem", aetherRepositorySystem);
+        setVariableValueToObject(mojo, "repositorySystem", repositorySystem);
         setVariableValueToObject(mojo, "generateBackupPoms", false);
         setVariableValueToObject(mojo, "changeRecorderFormat", "test");
         changeRecorder = (TestChangeRecorder)
diff --git a/versions-maven-plugin/src/test/java/org/codehaus/mojo/versions/UseDepVersionMojoTest.java b/versions-maven-plugin/src/test/java/org/codehaus/mojo/versions/UseDepVersionMojoTest.java
index 74c97210..e8ac9e68 100644
--- a/versions-maven-plugin/src/test/java/org/codehaus/mojo/versions/UseDepVersionMojoTest.java
+++ b/versions-maven-plugin/src/test/java/org/codehaus/mojo/versions/UseDepVersionMojoTest.java
@@ -34,7 +34,6 @@ import org.junit.Rule;
 import org.junit.Test;
 
 import static org.codehaus.mojo.versions.utils.MockUtils.mockAetherRepositorySystem;
-import static org.codehaus.mojo.versions.utils.MockUtils.mockRepositorySystem;
 import static org.hamcrest.MatcherAssert.assertThat;
 import static org.hamcrest.Matchers.containsString;
 import static org.hamcrest.Matchers.empty;
@@ -96,8 +95,7 @@ public class UseDepVersionMojoTest extends AbstractMojoTestCase {
         TestUtils.copyDir(Paths.get("src/test/resources/org/codehaus/mojo/use-dep-version/properties/simple"), tempDir);
         UseDepVersionMojo mojo = (UseDepVersionMojo) mojoRule.lookupConfiguredMojo(tempDir.toFile(), "use-dep-version");
         setVariableValueToObject(mojo, "reactorProjects", Collections.singletonList(mojo.getProject()));
-        setVariableValueToObject(mojo, "repositorySystem", mockRepositorySystem());
-        setVariableValueToObject(mojo, "aetherRepositorySystem", mockAetherRepositorySystem());
+        setVariableValueToObject(mojo, "repositorySystem", mockAetherRepositorySystem());
         setVariableValueToObject(mojo, "log", logger);
 
         mojo.execute();
@@ -124,8 +122,7 @@ public class UseDepVersionMojoTest extends AbstractMojoTestCase {
         TestChangeRecorder changeRecorder = new TestChangeRecorder();
         UseDepVersionMojo mojo = (UseDepVersionMojo) mojoRule.lookupConfiguredMojo(tempDir.toFile(), "use-dep-version");
         setVariableValueToObject(mojo, "reactorProjects", Collections.singletonList(mojo.getProject()));
-        setVariableValueToObject(mojo, "repositorySystem", mockRepositorySystem());
-        setVariableValueToObject(mojo, "aetherRepositorySystem", mockAetherRepositorySystem());
+        setVariableValueToObject(mojo, "repositorySystem", mockAetherRepositorySystem());
         setVariableValueToObject(mojo, "log", logger);
         setVariableValueToObject(mojo, "changeRecorders", changeRecorder.asTestMap());
 
@@ -155,8 +152,7 @@ public class UseDepVersionMojoTest extends AbstractMojoTestCase {
                 Paths.get("src/test/resources/org/codehaus/mojo/use-dep-version/properties/conflict"), tempDir);
         UseDepVersionMojo mojo = (UseDepVersionMojo) mojoRule.lookupConfiguredMojo(tempDir.toFile(), "use-dep-version");
         setVariableValueToObject(mojo, "reactorProjects", Collections.singletonList(mojo.getProject()));
-        setVariableValueToObject(mojo, "repositorySystem", mockRepositorySystem());
-        setVariableValueToObject(mojo, "aetherRepositorySystem", mockAetherRepositorySystem());
+        setVariableValueToObject(mojo, "repositorySystem", mockAetherRepositorySystem());
         setVariableValueToObject(mojo, "changeRecorders", changeRecorder.asTestMap());
         setVariableValueToObject(mojo, "log", logger);
         setVariableValueToObject(mojo, "changeRecorders", changeRecorder.asTestMap());
@@ -183,8 +179,7 @@ public class UseDepVersionMojoTest extends AbstractMojoTestCase {
                 tempDir);
         UseDepVersionMojo mojo = (UseDepVersionMojo) mojoRule.lookupConfiguredMojo(tempDir.toFile(), "use-dep-version");
         setVariableValueToObject(mojo, "reactorProjects", Collections.singletonList(mojo.getProject()));
-        setVariableValueToObject(mojo, "repositorySystem", mockRepositorySystem());
-        setVariableValueToObject(mojo, "aetherRepositorySystem", mockAetherRepositorySystem());
+        setVariableValueToObject(mojo, "repositorySystem", mockAetherRepositorySystem());
         setVariableValueToObject(mojo, "changeRecorders", changeRecorder.asTestMap());
 
         mojo.execute();
@@ -213,8 +208,7 @@ public class UseDepVersionMojoTest extends AbstractMojoTestCase {
                 tempDir);
         UseDepVersionMojo mojo = (UseDepVersionMojo) mojoRule.lookupConfiguredMojo(tempDir.toFile(), "use-dep-version");
         setVariableValueToObject(mojo, "reactorProjects", Collections.singletonList(mojo.getProject()));
-        setVariableValueToObject(mojo, "repositorySystem", mockRepositorySystem());
-        setVariableValueToObject(mojo, "aetherRepositorySystem", mockAetherRepositorySystem());
+        setVariableValueToObject(mojo, "repositorySystem", mockAetherRepositorySystem());
         setVariableValueToObject(mojo, "changeRecorders", changeRecorder.asTestMap());
 
         mojo.execute();
@@ -242,8 +236,7 @@ public class UseDepVersionMojoTest extends AbstractMojoTestCase {
                 tempDir);
         UseDepVersionMojo mojo = (UseDepVersionMojo) mojoRule.lookupConfiguredMojo(tempDir.toFile(), "use-dep-version");
         setVariableValueToObject(mojo, "reactorProjects", Collections.singletonList(mojo.getProject()));
-        setVariableValueToObject(mojo, "repositorySystem", mockRepositorySystem());
-        setVariableValueToObject(mojo, "aetherRepositorySystem", mockAetherRepositorySystem());
+        setVariableValueToObject(mojo, "repositorySystem", mockAetherRepositorySystem());
         setVariableValueToObject(mojo, "changeRecorders", changeRecorder.asTestMap());
 
         mojo.execute();
@@ -276,8 +269,7 @@ public class UseDepVersionMojoTest extends AbstractMojoTestCase {
                 Paths.get("src/test/resources/org/codehaus/mojo/use-dep-version/properties/child-parent"), tempDir);
         UseDepVersionMojo mojo = (UseDepVersionMojo) mojoRule.lookupConfiguredMojo(tempDir.toFile(), "use-dep-version");
         setVariableValueToObject(mojo, "reactorProjects", Collections.singletonList(mojo.getProject()));
-        setVariableValueToObject(mojo, "repositorySystem", mockRepositorySystem());
-        setVariableValueToObject(mojo, "aetherRepositorySystem", mockAetherRepositorySystem());
+        setVariableValueToObject(mojo, "repositorySystem", mockAetherRepositorySystem());
         setVariableValueToObject(mojo, "log", logger);
         setVariableValueToObject(mojo, "changeRecorders", changeRecorder.asTestMap());
 
@@ -303,8 +295,7 @@ public class UseDepVersionMojoTest extends AbstractMojoTestCase {
                 tempDir);
         UseDepVersionMojo mojo = (UseDepVersionMojo) mojoRule.lookupConfiguredMojo(tempDir.toFile(), "use-dep-version");
         setVariableValueToObject(mojo, "reactorProjects", Collections.singletonList(mojo.getProject()));
-        setVariableValueToObject(mojo, "repositorySystem", mockRepositorySystem());
-        setVariableValueToObject(mojo, "aetherRepositorySystem", mockAetherRepositorySystem());
+        setVariableValueToObject(mojo, "repositorySystem", mockAetherRepositorySystem());
         setVariableValueToObject(mojo, "changeRecorders", changeRecorder.asTestMap());
 
         mojo.execute();
@@ -337,8 +328,7 @@ public class UseDepVersionMojoTest extends AbstractMojoTestCase {
         UseDepVersionMojo mojo = (UseDepVersionMojo)
                 mojoRule.lookupConfiguredMojo(tempDir.resolve("child").toFile(), "use-dep-version");
         setVariableValueToObject(mojo, "reactorProjects", Collections.singletonList(mojo.getProject()));
-        setVariableValueToObject(mojo, "repositorySystem", mockRepositorySystem());
-        setVariableValueToObject(mojo, "aetherRepositorySystem", mockAetherRepositorySystem());
+        setVariableValueToObject(mojo, "repositorySystem", mockAetherRepositorySystem());
         setVariableValueToObject(mojo, "changeRecorders", changeRecorder.asTestMap());
         setVariableValueToObject(mojo, "log", logger);
         setVariableValueToObject(mojo, "changeRecorders", changeRecorder.asTestMap());
@@ -359,8 +349,7 @@ public class UseDepVersionMojoTest extends AbstractMojoTestCase {
         TestUtils.copyDir(Paths.get("src/test/resources/org/codehaus/mojo/use-dep-version/issue-925"), tempDir);
         UseDepVersionMojo mojo = (UseDepVersionMojo) mojoRule.lookupConfiguredMojo(tempDir.toFile(), "use-dep-version");
         setVariableValueToObject(mojo, "reactorProjects", Collections.singletonList(mojo.getProject()));
-        setVariableValueToObject(mojo, "repositorySystem", mockRepositorySystem());
-        setVariableValueToObject(mojo, "aetherRepositorySystem", mockAetherRepositorySystem());
+        setVariableValueToObject(mojo, "repositorySystem", mockAetherRepositorySystem());
         setVariableValueToObject(mojo, "changeRecorders", changeRecorder.asTestMap());
         setVariableValueToObject(mojo, "log", logger);
         mojo.depVersion = "2.0.0";
@@ -383,8 +372,7 @@ public class UseDepVersionMojoTest extends AbstractMojoTestCase {
         TestUtils.copyDir(Paths.get("src/test/resources/org/codehaus/mojo/use-dep-version/issue-925"), tempDir);
         UseDepVersionMojo mojo = (UseDepVersionMojo) mojoRule.lookupConfiguredMojo(tempDir.toFile(), "use-dep-version");
         setVariableValueToObject(mojo, "reactorProjects", Collections.singletonList(mojo.getProject()));
-        setVariableValueToObject(mojo, "repositorySystem", mockRepositorySystem());
-        setVariableValueToObject(mojo, "aetherRepositorySystem", mockAetherRepositorySystem());
+        setVariableValueToObject(mojo, "repositorySystem", mockAetherRepositorySystem());
         setVariableValueToObject(mojo, "changeRecorders", changeRecorder.asTestMap());
         mojo.depVersion = "2.0.0";
         mojo.forceVersion = true;
@@ -409,8 +397,7 @@ public class UseDepVersionMojoTest extends AbstractMojoTestCase {
         TestUtils.copyDir(Paths.get("src/test/resources/org/codehaus/mojo/use-dep-version/issue-925"), tempDir);
         UseDepVersionMojo mojo = (UseDepVersionMojo) mojoRule.lookupConfiguredMojo(tempDir.toFile(), "use-dep-version");
         setVariableValueToObject(mojo, "reactorProjects", Collections.singletonList(mojo.getProject()));
-        setVariableValueToObject(mojo, "repositorySystem", mockRepositorySystem());
-        setVariableValueToObject(mojo, "aetherRepositorySystem", mockAetherRepositorySystem());
+        setVariableValueToObject(mojo, "repositorySystem", mockAetherRepositorySystem());
         setVariableValueToObject(mojo, "changeRecorders", changeRecorder.asTestMap());
         setVariableValueToObject(mojo, "log", logger);
         mojo.depVersion = "2.0.0";
diff --git a/versions-maven-plugin/src/test/java/org/codehaus/mojo/versions/UseLatestReleasesMojoTest.java b/versions-maven-plugin/src/test/java/org/codehaus/mojo/versions/UseLatestReleasesMojoTest.java
index d0944400..d04ca85e 100644
--- a/versions-maven-plugin/src/test/java/org/codehaus/mojo/versions/UseLatestReleasesMojoTest.java
+++ b/versions-maven-plugin/src/test/java/org/codehaus/mojo/versions/UseLatestReleasesMojoTest.java
@@ -19,16 +19,17 @@ import javax.xml.stream.XMLStreamException;
 
 import java.util.HashMap;
 
+import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager;
 import org.apache.maven.model.Model;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.MojoFailureException;
 import org.apache.maven.project.MavenProject;
-import org.apache.maven.repository.RepositorySystem;
 import org.codehaus.mojo.versions.api.PomHelper;
 import org.codehaus.mojo.versions.api.VersionRetrievalException;
 import org.codehaus.mojo.versions.change.DefaultDependencyVersionChange;
 import org.codehaus.mojo.versions.utils.DependencyBuilder;
 import org.codehaus.mojo.versions.utils.TestChangeRecorder;
+import org.eclipse.aether.RepositorySystem;
 import org.hamcrest.Matchers;
 import org.junit.Before;
 import org.junit.Test;
@@ -39,8 +40,8 @@ import static java.util.Collections.singletonList;
 import static org.apache.maven.artifact.Artifact.SCOPE_COMPILE;
 import static org.apache.maven.plugin.testing.ArtifactStubFactory.setVariableValueToObject;
 import static org.codehaus.mojo.versions.utils.MockUtils.mockAetherRepositorySystem;
+import static org.codehaus.mojo.versions.utils.MockUtils.mockArtifactHandlerManager;
 import static org.codehaus.mojo.versions.utils.MockUtils.mockMavenSession;
-import static org.codehaus.mojo.versions.utils.MockUtils.mockRepositorySystem;
 import static org.hamcrest.MatcherAssert.assertThat;
 import static org.hamcrest.Matchers.empty;
 import static org.hamcrest.Matchers.hasItem;
@@ -54,46 +55,43 @@ public class UseLatestReleasesMojoTest {
 
     @Before
     public void setUp() throws Exception {
-        RepositorySystem repositorySystemMock = mockRepositorySystem();
-        org.eclipse.aether.RepositorySystem aetherRepositorySystem =
-                mockAetherRepositorySystem(new HashMap<String, String[]>() {
-                    {
-                        put("dependency-artifact", new String[] {"0.9.0", "1.0.0-beta"});
-                    }
-                });
+        ArtifactHandlerManager artifactHandlerManager = mockArtifactHandlerManager();
+        RepositorySystem repositorySystem = mockAetherRepositorySystem(new HashMap<String, String[]>() {
+            {
+                put("dependency-artifact", new String[] {"0.9.0", "1.0.0-beta"});
+            }
+        });
 
         changeRecorder = new TestChangeRecorder();
 
-        mojo =
-                new UseLatestReleasesMojo(
-                        repositorySystemMock, aetherRepositorySystem, null, changeRecorder.asTestMap()) {
+        mojo = new UseLatestReleasesMojo(artifactHandlerManager, repositorySystem, null, changeRecorder.asTestMap()) {
+            {
+                reactorProjects = emptyList();
+                MavenProject project = new MavenProject() {
                     {
-                        reactorProjects = emptyList();
-                        MavenProject project = new MavenProject() {
+                        setModel(new Model() {
                             {
-                                setModel(new Model() {
-                                    {
-                                        setGroupId("default-group");
-                                        setArtifactId("project-artifact");
-                                        setVersion("1.0.0-SNAPSHOT");
-
-                                        setDependencies(singletonList(DependencyBuilder.newBuilder()
-                                                .withGroupId("default-group")
-                                                .withArtifactId("dependency-artifact")
-                                                .withVersion("0.9.0")
-                                                .withScope(SCOPE_COMPILE)
-                                                .withType("jar")
-                                                .withClassifier("default")
-                                                .build()));
-                                    }
-                                });
+                                setGroupId("default-group");
+                                setArtifactId("project-artifact");
+                                setVersion("1.0.0-SNAPSHOT");
+
+                                setDependencies(singletonList(DependencyBuilder.newBuilder()
+                                        .withGroupId("default-group")
+                                        .withArtifactId("dependency-artifact")
+                                        .withVersion("0.9.0")
+                                        .withScope(SCOPE_COMPILE)
+                                        .withType("jar")
+                                        .withClassifier("default")
+                                        .build()));
                             }
-                        };
-                        setProject(project);
-
-                        session = mockMavenSession();
+                        });
                     }
                 };
+                setProject(project);
+
+                session = mockMavenSession();
+            }
+        };
     }
 
     @Test
@@ -121,7 +119,7 @@ public class UseLatestReleasesMojoTest {
     @Test
     public void testAllowDowngrade()
             throws MojoExecutionException, XMLStreamException, MojoFailureException, VersionRetrievalException {
-        mojo.aetherRepositorySystem = mockAetherRepositorySystem(new HashMap<String, String[]>() {
+        mojo.repositorySystem = mockAetherRepositorySystem(new HashMap<String, String[]>() {
             {
                 put("artifactA", new String[] {"1.0.0", "1.0.1-SNAPSHOT"});
             }
@@ -154,7 +152,7 @@ public class UseLatestReleasesMojoTest {
     @Test
     public void testDisallowDowngrade()
             throws MojoExecutionException, XMLStreamException, MojoFailureException, VersionRetrievalException {
-        mojo.aetherRepositorySystem = mockAetherRepositorySystem(new HashMap<String, String[]>() {
+        mojo.repositorySystem = mockAetherRepositorySystem(new HashMap<String, String[]>() {
             {
                 put("artifactA", new String[] {"1.0.0", "1.0.1-SNAPSHOT"});
             }
diff --git a/versions-maven-plugin/src/test/java/org/codehaus/mojo/versions/UseLatestVersionsMojoTest.java b/versions-maven-plugin/src/test/java/org/codehaus/mojo/versions/UseLatestVersionsMojoTest.java
index ab5f622b..6c11c148 100644
--- a/versions-maven-plugin/src/test/java/org/codehaus/mojo/versions/UseLatestVersionsMojoTest.java
+++ b/versions-maven-plugin/src/test/java/org/codehaus/mojo/versions/UseLatestVersionsMojoTest.java
@@ -27,12 +27,12 @@ import org.apache.maven.model.Model;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.MojoFailureException;
 import org.apache.maven.project.MavenProject;
-import org.apache.maven.repository.RepositorySystem;
 import org.codehaus.mojo.versions.api.PomHelper;
 import org.codehaus.mojo.versions.api.VersionRetrievalException;
 import org.codehaus.mojo.versions.change.DefaultDependencyVersionChange;
 import org.codehaus.mojo.versions.utils.DependencyBuilder;
 import org.codehaus.mojo.versions.utils.TestChangeRecorder;
+import org.eclipse.aether.RepositorySystem;
 import org.hamcrest.core.Is;
 import org.junit.Before;
 import org.junit.Test;
@@ -43,8 +43,8 @@ import static java.util.Collections.singleton;
 import static org.apache.maven.artifact.Artifact.SCOPE_COMPILE;
 import static org.apache.maven.plugin.testing.ArtifactStubFactory.setVariableValueToObject;
 import static org.codehaus.mojo.versions.utils.MockUtils.mockAetherRepositorySystem;
+import static org.codehaus.mojo.versions.utils.MockUtils.mockArtifactHandlerManager;
 import static org.codehaus.mojo.versions.utils.MockUtils.mockMavenSession;
-import static org.codehaus.mojo.versions.utils.MockUtils.mockRepositorySystem;
 import static org.hamcrest.MatcherAssert.assertThat;
 import static org.hamcrest.Matchers.empty;
 import static org.hamcrest.Matchers.hasItem;
@@ -59,25 +59,23 @@ public class UseLatestVersionsMojoTest {
 
     @Before
     public void setUp() throws Exception {
-        RepositorySystem repositorySystemMock = mockRepositorySystem();
-        org.eclipse.aether.RepositorySystem aetherRepositorySystem =
-                mockAetherRepositorySystem(new HashMap<String, String[]>() {
-                    {
-                        put("dependency-artifact", new String[] {
-                            "1.1.1-SNAPSHOT", "1.1.0", "1.1.0-SNAPSHOT", "1.0.0", "1.0.0-SNAPSHOT", "0.9.0"
-                        });
-                        put("poison-artifact", new String[] {
-                            "1.1.1.1-SNAPSHOT", "1.1.1.0", "1.1.1.0-SNAPSHOT", "1.0.0.0", "1.0.0.0-SNAPSHOT", "0.9.0.0"
-                        });
-                        put("other-artifact", new String[] {"1.0", "2.0"});
-                    }
+        RepositorySystem repositorySystem = mockAetherRepositorySystem(new HashMap<String, String[]>() {
+            {
+                put(
+                        "dependency-artifact",
+                        new String[] {"1.1.1-SNAPSHOT", "1.1.0", "1.1.0-SNAPSHOT", "1.0.0", "1.0.0-SNAPSHOT", "0.9.0"});
+                put("poison-artifact", new String[] {
+                    "1.1.1.1-SNAPSHOT", "1.1.1.0", "1.1.1.0-SNAPSHOT", "1.0.0.0", "1.0.0.0-SNAPSHOT", "0.9.0.0"
                 });
+                put("other-artifact", new String[] {"1.0", "2.0"});
+            }
+        });
 
         changeRecorder = new TestChangeRecorder();
 
         mojo =
                 new UseLatestVersionsMojo(
-                        repositorySystemMock, aetherRepositorySystem, null, changeRecorder.asTestMap()) {
+                        mockArtifactHandlerManager(), repositorySystem, null, changeRecorder.asTestMap()) {
                     {
                         reactorProjects = emptyList();
                         MavenProject project = new MavenProject() {
diff --git a/versions-maven-plugin/src/test/java/org/codehaus/mojo/versions/UseNextReleasesMojoTest.java b/versions-maven-plugin/src/test/java/org/codehaus/mojo/versions/UseNextReleasesMojoTest.java
index 94636755..75d170c2 100644
--- a/versions-maven-plugin/src/test/java/org/codehaus/mojo/versions/UseNextReleasesMojoTest.java
+++ b/versions-maven-plugin/src/test/java/org/codehaus/mojo/versions/UseNextReleasesMojoTest.java
@@ -20,16 +20,17 @@ import javax.xml.stream.XMLStreamException;
 import java.util.Collections;
 import java.util.HashMap;
 
+import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager;
 import org.apache.maven.model.Model;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.MojoFailureException;
 import org.apache.maven.project.MavenProject;
-import org.apache.maven.repository.RepositorySystem;
 import org.codehaus.mojo.versions.api.PomHelper;
 import org.codehaus.mojo.versions.api.VersionRetrievalException;
 import org.codehaus.mojo.versions.change.DefaultDependencyVersionChange;
 import org.codehaus.mojo.versions.utils.DependencyBuilder;
 import org.codehaus.mojo.versions.utils.TestChangeRecorder;
+import org.eclipse.aether.RepositorySystem;
 import org.hamcrest.Matchers;
 import org.junit.Before;
 import org.junit.Test;
@@ -40,8 +41,8 @@ import static java.util.Collections.singletonList;
 import static org.apache.maven.artifact.Artifact.SCOPE_COMPILE;
 import static org.apache.maven.plugin.testing.ArtifactStubFactory.setVariableValueToObject;
 import static org.codehaus.mojo.versions.utils.MockUtils.mockAetherRepositorySystem;
+import static org.codehaus.mojo.versions.utils.MockUtils.mockArtifactHandlerManager;
 import static org.codehaus.mojo.versions.utils.MockUtils.mockMavenSession;
-import static org.codehaus.mojo.versions.utils.MockUtils.mockRepositorySystem;
 import static org.hamcrest.MatcherAssert.assertThat;
 import static org.hamcrest.Matchers.empty;
 import static org.hamcrest.Matchers.hasItem;
@@ -59,15 +60,14 @@ public class UseNextReleasesMojoTest {
 
     @Before
     public void setUp() throws Exception {
-        RepositorySystem repositorySystemMock = mockRepositorySystem();
-        org.eclipse.aether.RepositorySystem aetherRepositorySystem =
-                mockAetherRepositorySystem(new HashMap<String, String[]>() {
-                    {
-                        put("dependency-artifact", new String[] {"1.0.0", "1.1.0", "1.1.1-SNAPSHOT"});
-                    }
-                });
+        ArtifactHandlerManager artifactHandlerManager = mockArtifactHandlerManager();
+        RepositorySystem repositorySystem = mockAetherRepositorySystem(new HashMap<String, String[]>() {
+            {
+                put("dependency-artifact", new String[] {"1.0.0", "1.1.0", "1.1.1-SNAPSHOT"});
+            }
+        });
         changeRecorder = new TestChangeRecorder();
-        mojo = new UseNextReleasesMojo(repositorySystemMock, aetherRepositorySystem, null, changeRecorder.asTestMap()) {
+        mojo = new UseNextReleasesMojo(artifactHandlerManager, repositorySystem, null, changeRecorder.asTestMap()) {
             {
                 reactorProjects = emptyList();
                 session = mockMavenSession();
@@ -107,12 +107,11 @@ public class UseNextReleasesMojoTest {
 
     @Test
     public void testFindANewerRelease() throws IllegalAccessException {
-        setVariableValueToObject(
-                mojo, "aetherRepositorySystem", mockAetherRepositorySystem(new HashMap<String, String[]>() {
-                    {
-                        put("dependency-artifact", new String[] {"1.0.0", "1.1.0", "1.1.1", "2.0.0"});
-                    }
-                }));
+        setVariableValueToObject(mojo, "repositorySystem", mockAetherRepositorySystem(new HashMap<String, String[]>() {
+            {
+                put("dependency-artifact", new String[] {"1.0.0", "1.1.0", "1.1.1", "2.0.0"});
+            }
+        }));
         try (MockedStatic<PomHelper> pomHelper = mockStatic(PomHelper.class)) {
             pomHelper
                     .when(() -> PomHelper.setDependencyVersion(any(), any(), any(), any(), any(), any()))
@@ -132,7 +131,7 @@ public class UseNextReleasesMojoTest {
     @Test
     public void testAllowDowngrade()
             throws MojoExecutionException, XMLStreamException, MojoFailureException, VersionRetrievalException {
-        mojo.aetherRepositorySystem = mockAetherRepositorySystem(new HashMap<String, String[]>() {
+        mojo.repositorySystem = mockAetherRepositorySystem(new HashMap<String, String[]>() {
             {
                 put("artifactA", new String[] {"1.0.0", "1.0.1-SNAPSHOT"});
             }
@@ -165,7 +164,7 @@ public class UseNextReleasesMojoTest {
     @Test
     public void testDisallowDowngrade()
             throws MojoExecutionException, XMLStreamException, MojoFailureException, VersionRetrievalException {
-        mojo.aetherRepositorySystem = mockAetherRepositorySystem(new HashMap<String, String[]>() {
+        mojo.repositorySystem = mockAetherRepositorySystem(new HashMap<String, String[]>() {
             {
                 put("artifactA", new String[] {"1.0.0", "1.0.1-SNAPSHOT"});
             }
diff --git a/versions-maven-plugin/src/test/java/org/codehaus/mojo/versions/UseNextVersionsMojoTest.java b/versions-maven-plugin/src/test/java/org/codehaus/mojo/versions/UseNextVersionsMojoTest.java
index 7bed7f92..533e2cdb 100644
--- a/versions-maven-plugin/src/test/java/org/codehaus/mojo/versions/UseNextVersionsMojoTest.java
+++ b/versions-maven-plugin/src/test/java/org/codehaus/mojo/versions/UseNextVersionsMojoTest.java
@@ -20,16 +20,17 @@ import javax.xml.stream.XMLStreamException;
 import java.util.Collections;
 import java.util.HashMap;
 
+import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager;
 import org.apache.maven.model.Model;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.MojoFailureException;
 import org.apache.maven.project.MavenProject;
-import org.apache.maven.repository.RepositorySystem;
 import org.codehaus.mojo.versions.api.PomHelper;
 import org.codehaus.mojo.versions.api.VersionRetrievalException;
 import org.codehaus.mojo.versions.change.DefaultDependencyVersionChange;
 import org.codehaus.mojo.versions.utils.DependencyBuilder;
 import org.codehaus.mojo.versions.utils.TestChangeRecorder;
+import org.eclipse.aether.RepositorySystem;
 import org.hamcrest.Matchers;
 import org.junit.Before;
 import org.junit.Test;
@@ -40,8 +41,8 @@ import static java.util.Collections.singletonList;
 import static org.apache.maven.artifact.Artifact.SCOPE_COMPILE;
 import static org.apache.maven.plugin.testing.ArtifactStubFactory.setVariableValueToObject;
 import static org.codehaus.mojo.versions.utils.MockUtils.mockAetherRepositorySystem;
+import static org.codehaus.mojo.versions.utils.MockUtils.mockArtifactHandlerManager;
 import static org.codehaus.mojo.versions.utils.MockUtils.mockMavenSession;
-import static org.codehaus.mojo.versions.utils.MockUtils.mockRepositorySystem;
 import static org.hamcrest.MatcherAssert.assertThat;
 import static org.hamcrest.Matchers.empty;
 import static org.hamcrest.Matchers.hasItem;
@@ -59,15 +60,14 @@ public class UseNextVersionsMojoTest {
 
     @Before
     public void setUp() throws Exception {
-        RepositorySystem repositorySystemMock = mockRepositorySystem();
-        org.eclipse.aether.RepositorySystem aetherRepositorySystem =
-                mockAetherRepositorySystem(new HashMap<String, String[]>() {
-                    {
-                        put("dependency-artifact", new String[] {"1.0.0", "1.1.0-SNAPSHOT"});
-                    }
-                });
+        ArtifactHandlerManager artifactHandlerManager = mockArtifactHandlerManager();
+        RepositorySystem repositorySystem = mockAetherRepositorySystem(new HashMap<String, String[]>() {
+            {
+                put("dependency-artifact", new String[] {"1.0.0", "1.1.0-SNAPSHOT"});
+            }
+        });
         changeRecorder = new TestChangeRecorder();
-        mojo = new UseNextVersionsMojo(repositorySystemMock, aetherRepositorySystem, null, changeRecorder.asTestMap()) {
+        mojo = new UseNextVersionsMojo(artifactHandlerManager, repositorySystem, null, changeRecorder.asTestMap()) {
             {
                 reactorProjects = emptyList();
                 session = mockMavenSession();
@@ -113,12 +113,11 @@ public class UseNextVersionsMojoTest {
 
     @Test
     public void testFindANewerVersion() throws IllegalAccessException {
-        setVariableValueToObject(
-                mojo, "aetherRepositorySystem", mockAetherRepositorySystem(new HashMap<String, String[]>() {
-                    {
-                        put("dependency-artifact", new String[] {"1.0.0", "1.1.0-SNAPSHOT", "1.1.1", "2.0.0"});
-                    }
-                }));
+        setVariableValueToObject(mojo, "repositorySystem", mockAetherRepositorySystem(new HashMap<String, String[]>() {
+            {
+                put("dependency-artifact", new String[] {"1.0.0", "1.1.0-SNAPSHOT", "1.1.1", "2.0.0"});
+            }
+        }));
         try (MockedStatic<PomHelper> pomHelper = mockStatic(PomHelper.class)) {
             pomHelper
                     .when(() -> PomHelper.setDependencyVersion(any(), any(), any(), any(), any(), any()))
@@ -139,7 +138,7 @@ public class UseNextVersionsMojoTest {
     @Test
     public void testAllowDowngrade()
             throws MojoExecutionException, XMLStreamException, MojoFailureException, VersionRetrievalException {
-        mojo.aetherRepositorySystem = mockAetherRepositorySystem(new HashMap<String, String[]>() {
+        mojo.repositorySystem = mockAetherRepositorySystem(new HashMap<String, String[]>() {
             {
                 put("artifactA", new String[] {"1.0.0", "1.0.1-SNAPSHOT"});
             }
@@ -172,7 +171,7 @@ public class UseNextVersionsMojoTest {
     @Test
     public void testDisallowDowngrade()
             throws MojoExecutionException, XMLStreamException, MojoFailureException, VersionRetrievalException {
-        mojo.aetherRepositorySystem = mockAetherRepositorySystem(new HashMap<String, String[]>() {
+        mojo.repositorySystem = mockAetherRepositorySystem(new HashMap<String, String[]>() {
             {
                 put("artifactA", new String[] {"1.0.0", "1.0.1-SNAPSHOT"});
             }
diff --git a/versions-maven-plugin/src/test/java/org/codehaus/mojo/versions/UseReleasesMojoTest.java b/versions-maven-plugin/src/test/java/org/codehaus/mojo/versions/UseReleasesMojoTest.java
index e05be7f2..0748a87b 100644
--- a/versions-maven-plugin/src/test/java/org/codehaus/mojo/versions/UseReleasesMojoTest.java
+++ b/versions-maven-plugin/src/test/java/org/codehaus/mojo/versions/UseReleasesMojoTest.java
@@ -22,8 +22,8 @@ import static java.util.Collections.singletonList;
 import static java.util.Collections.singletonMap;
 import static org.apache.maven.artifact.Artifact.SCOPE_COMPILE;
 import static org.codehaus.mojo.versions.utils.MockUtils.mockAetherRepositorySystem;
+import static org.codehaus.mojo.versions.utils.MockUtils.mockArtifactHandlerManager;
 import static org.codehaus.mojo.versions.utils.MockUtils.mockMavenSession;
-import static org.codehaus.mojo.versions.utils.MockUtils.mockRepositorySystem;
 import static org.hamcrest.MatcherAssert.assertThat;
 import static org.hamcrest.Matchers.hasItem;
 import static org.hamcrest.Matchers.startsWith;
@@ -57,7 +57,7 @@ public class UseReleasesMojoTest extends AbstractMojoTestCase {
     public void setUp() throws IllegalAccessException {
         changeRecorder = new TestChangeRecorder();
         mojo = new UseReleasesMojo(
-                mockRepositorySystem(), mockAetherRepositorySystem(), null, changeRecorder.asTestMap());
+                mockArtifactHandlerManager(), mockAetherRepositorySystem(), null, changeRecorder.asTestMap());
         setVariableValueToObject(mojo, "reactorProjects", emptyList());
         mojo.project = new MavenProject() {
             {
@@ -178,7 +178,7 @@ public class UseReleasesMojoTest extends AbstractMojoTestCase {
     @Test
     public void testFailIfNotReplaced()
             throws MojoExecutionException, XMLStreamException, MojoFailureException, VersionRetrievalException {
-        mojo.aetherRepositorySystem = mockAetherRepositorySystem(singletonMap("test-artifact", new String[] {}));
+        mojo.repositorySystem = mockAetherRepositorySystem(singletonMap("test-artifact", new String[] {}));
         mojo.getProject()
                 .setDependencies(singletonList(DependencyBuilder.newBuilder()
                         .withGroupId("default-group")
diff --git a/versions-test/pom.xml b/versions-test/pom.xml
index 22e6de24..217f99fd 100644
--- a/versions-test/pom.xml
+++ b/versions-test/pom.xml
@@ -44,10 +44,6 @@
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-core</artifactId>
     </dependency>
-    <dependency>
-      <groupId>org.apache.maven</groupId>
-      <artifactId>maven-model</artifactId>
-    </dependency>
     <dependency>
       <groupId>org.apache.maven.resolver</groupId>
       <artifactId>maven-resolver-api</artifactId>
@@ -76,10 +72,6 @@
       <groupId>org.mockito</groupId>
       <artifactId>mockito-core</artifactId>
     </dependency>
-    <dependency>
-      <groupId>org.apache.maven.plugin-testing</groupId>
-      <artifactId>maven-plugin-testing-harness</artifactId>
-    </dependency>
   </dependencies>
 
 </project>
diff --git a/versions-test/src/main/java/org/codehaus/mojo/versions/utils/MockUtils.java b/versions-test/src/main/java/org/codehaus/mojo/versions/utils/MockUtils.java
index b8d248da..39b48500 100644
--- a/versions-test/src/main/java/org/codehaus/mojo/versions/utils/MockUtils.java
+++ b/versions-test/src/main/java/org/codehaus/mojo/versions/utils/MockUtils.java
@@ -22,15 +22,14 @@ import java.util.HashMap;
 import java.util.Map;
 
 import org.apache.maven.artifact.Artifact;
-import org.apache.maven.artifact.DefaultArtifact;
+import org.apache.maven.artifact.handler.DefaultArtifactHandler;
+import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager;
 import org.apache.maven.doxia.tools.SiteTool;
 import org.apache.maven.doxia.tools.SiteToolException;
 import org.apache.maven.execution.MavenSession;
-import org.apache.maven.model.Dependency;
-import org.apache.maven.plugin.testing.stubs.DefaultArtifactHandlerStub;
 import org.apache.maven.project.MavenProject;
-import org.apache.maven.repository.RepositorySystem;
 import org.codehaus.plexus.i18n.I18N;
+import org.eclipse.aether.RepositorySystem;
 import org.eclipse.aether.RepositorySystemSession;
 import org.eclipse.aether.resolution.ArtifactRequest;
 import org.eclipse.aether.resolution.ArtifactResolutionException;
@@ -62,20 +61,22 @@ public class MockUtils {
 
     /**
      * Creates a mocked  {@linkplain org.eclipse.aether.RepositorySystem}, providing the default version set
+     *
      * @return mocked {@linkplain org.eclipse.aether.RepositorySystem}
      */
-    public static org.eclipse.aether.RepositorySystem mockAetherRepositorySystem() {
+    public static RepositorySystem mockAetherRepositorySystem() {
         return mockAetherRepositorySystem(DEFAULT_VERSION_MAP);
     }
 
     /**
      * Creates a mocked  {@linkplain org.eclipse.aether.RepositorySystem}, providing the version map given in
      * the argument.
+     *
      * @param versionMap requested version map
      * @return mocked {@linkplain org.eclipse.aether.RepositorySystem}
      */
-    public static org.eclipse.aether.RepositorySystem mockAetherRepositorySystem(Map<String, String[]> versionMap) {
-        org.eclipse.aether.RepositorySystem repositorySystem = mock(org.eclipse.aether.RepositorySystem.class);
+    public static RepositorySystem mockAetherRepositorySystem(Map<String, String[]> versionMap) {
+        RepositorySystem repositorySystem = mock(org.eclipse.aether.RepositorySystem.class);
         prepareAetherRepositorySystemMockForVersionRange(repositorySystem, versionMap);
 
         try {
@@ -100,7 +101,7 @@ public class MockUtils {
     }
 
     public static void prepareAetherRepositorySystemMockForVersionRange(
-            org.eclipse.aether.RepositorySystem repositorySystem, Map<String, String[]> versionMap) {
+            RepositorySystem repositorySystem, Map<String, String[]> versionMap) {
         try {
             when(repositorySystem.resolveVersionRange(any(), any(VersionRangeRequest.class)))
                     .then(invocation -> {
@@ -146,29 +147,23 @@ public class MockUtils {
         return siteTool;
     }
 
-    public static RepositorySystem mockRepositorySystem() {
-        RepositorySystem repositorySystem = mock(RepositorySystem.class);
-        prepareRepositorySystemMock(repositorySystem);
-        return repositorySystem;
-    }
-
-    public static void prepareRepositorySystemMock(RepositorySystem repositorySystem) {
-        when(repositorySystem.createDependencyArtifact(any(Dependency.class))).thenAnswer(invocation -> {
-            Dependency dependency = invocation.getArgument(0);
-            return new DefaultArtifact(
-                    dependency.getGroupId(),
-                    dependency.getArtifactId(),
-                    dependency.getVersion(),
-                    dependency.getScope(),
-                    dependency.getType(),
-                    dependency.getClassifier(),
-                    new DefaultArtifactHandlerStub("default"));
+    public static ArtifactHandlerManager mockArtifactHandlerManager() {
+        ArtifactHandlerManager artifactHandlerManager = mock(ArtifactHandlerManager.class);
+        when(artifactHandlerManager.getArtifactHandler(anyString())).thenAnswer(i -> {
+            String type = i.getArgument(0);
+            DefaultArtifactHandler artifactHandler = new DefaultArtifactHandler(type);
+            if (type.equals("maven-plugin")) {
+                artifactHandler.setExtension("jar");
+            }
+            return artifactHandler;
         });
+        return artifactHandlerManager;
     }
 
     /**
      * Creates a very simple mock of {@link MavenSession}
      * by providing only a non-{@code null} implementation of its {@link MavenSession#getRepositorySession()} method.
+     *
      * @return mocked {@link MavenSession}
      */
     public static MavenSession mockMavenSession() {
@@ -181,6 +176,7 @@ public class MockUtils {
     /**
      * Creates a very simple mock of {@link MavenSession}
      * by providing only a non-{@code null} implementation of its {@link MavenSession#getRepositorySession()} method.
+     *
      * @param project {@link MavenProject} to link to
      * @return mocked {@link MavenSession}
      */