Skip to content

Commit

Permalink
[MNG-2961] Remove workaround for fixed bug (#441)
Browse files Browse the repository at this point in the history
* Remove workaround for fixed bug
  • Loading branch information
elharo authored Oct 19, 2024
1 parent 6da7a1d commit 15a3f52
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -502,9 +502,6 @@ private void writeDependencyXML(Set<Artifact> artifacts) {
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());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,9 +212,9 @@ public String getExclusionKey(Exclusion ex) {
/**
* 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) {
Expand All @@ -223,9 +223,6 @@ public Map<Artifact, Dependency> getMismatch(
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);
Expand Down

0 comments on commit 15a3f52

Please sign in to comment.