This is an automated email from the ASF dual-hosted git repository.

elharo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-dependency-plugin.git


The following commit(s) were added to refs/heads/master by this push:
     new 15a3f52e [MNG-2961] Remove workaround for fixed bug (#441)
15a3f52e is described below

commit 15a3f52e010a7dcd7861b1460e58a7c1a49e5523
Author: Elliotte Rusty Harold <elh...@users.noreply.github.com>
AuthorDate: Sat Oct 19 15:53:17 2024 +0000

    [MNG-2961] Remove workaround for fixed bug (#441)
    
    * Remove workaround for fixed bug
---
 .../maven/plugins/dependency/analyze/AbstractAnalyzeMojo.java    | 3 ---
 .../apache/maven/plugins/dependency/analyze/AnalyzeDepMgt.java   | 9 +++------
 2 files changed, 3 insertions(+), 9 deletions(-)

diff --git 
a/src/main/java/org/apache/maven/plugins/dependency/analyze/AbstractAnalyzeMojo.java
 
b/src/main/java/org/apache/maven/plugins/dependency/analyze/AbstractAnalyzeMojo.java
index 00d3135e..ebff3dce 100644
--- 
a/src/main/java/org/apache/maven/plugins/dependency/analyze/AbstractAnalyzeMojo.java
+++ 
b/src/main/java/org/apache/maven/plugins/dependency/analyze/AbstractAnalyzeMojo.java
@@ -502,9 +502,6 @@ public abstract class AbstractAnalyzeMojo extends 
AbstractMojo {
             PrettyPrintXMLWriter writer = new PrettyPrintXMLWriter(out);
 
             for (Artifact artifact : artifacts) {
-                // called because artifact will set the version to -SNAPSHOT 
only if I do this. MNG-2961
-                artifact.isSnapshot();
-
                 writer.startElement("dependency");
                 writer.startElement("groupId");
                 writer.writeText(artifact.getGroupId());
diff --git 
a/src/main/java/org/apache/maven/plugins/dependency/analyze/AnalyzeDepMgt.java 
b/src/main/java/org/apache/maven/plugins/dependency/analyze/AnalyzeDepMgt.java
index 079c95d9..b118183e 100644
--- 
a/src/main/java/org/apache/maven/plugins/dependency/analyze/AnalyzeDepMgt.java
+++ 
b/src/main/java/org/apache/maven/plugins/dependency/analyze/AnalyzeDepMgt.java
@@ -212,9 +212,9 @@ public class AnalyzeDepMgt extends AbstractMojo {
     /**
      * Calculate the mismatches between the DependencyManagement and resolved 
artifacts
      *
-     * @param depMgtMap contains the Dependency.GetManagementKey as the keyset 
for quick lookup.
-     * @param allDependencyArtifacts contains the set of all artifacts to 
compare.
-     * @return a map containing the resolved artifact as the key and the 
listed dependency as the value.
+     * @param depMgtMap a keyset of the Dependency.GetManagementKey for quick 
lookup
+     * @param allDependencyArtifacts the set of all artifacts to compare
+     * @return a map containing the resolved artifact as the key and the 
listed dependency as the value
      */
     public Map<Artifact, Dependency> getMismatch(
             Map<String, Dependency> depMgtMap, Set<Artifact> 
allDependencyArtifacts) {
@@ -223,9 +223,6 @@ public class AnalyzeDepMgt extends AbstractMojo {
         for (Artifact dependencyArtifact : allDependencyArtifacts) {
             Dependency depFromDepMgt = 
depMgtMap.get(getArtifactManagementKey(dependencyArtifact));
             if (depFromDepMgt != null) {
-                // workaround for MNG-2961
-                dependencyArtifact.isSnapshot();
-
                 if (depFromDepMgt.getVersion() != null
                         && 
!depFromDepMgt.getVersion().equals(dependencyArtifact.getBaseVersion())) {
                     mismatchMap.put(dependencyArtifact, depFromDepMgt);

Reply via email to