Skip to content

Commit

Permalink
fixes #426
Browse files Browse the repository at this point in the history
  • Loading branch information
Riduidel committed Mar 13, 2024
1 parent 1b48fe4 commit 82322ef
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.ndx.aadarchi.inferer.maven.technologies;

import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
Expand Down Expand Up @@ -72,7 +73,14 @@ public void decorateTechnology(Element element, MavenProject project) {
List<Dependency> popularDependencies = ((List<Dependency>) mavenProject.getDependencies()).stream()
.filter(d -> mvnRepositoryArtifacts.containsKey(d.getGroupId()+"."+d.getArtifactId()))
.collect(Collectors.toList());
dependencies.putAll(popularDependencies.stream().collect(Collectors.toMap(d -> d.getGroupId()+"."+d.getArtifactId(), d -> d.getVersion()==null ? "":d.getVersion())));
dependencies.putAll(
popularDependencies.stream()
.collect(Collectors.toMap(
d -> d.getGroupId()+"."+d.getArtifactId(),
d -> d.getVersion()==null ? "":d.getVersion(),
(a, b) -> a,
() -> new LinkedHashMap<>()
)));
doDecorateTechnologies(popularDependencies, element);
// We should explore all parent poms
return true;
Expand Down

0 comments on commit 82322ef

Please sign in to comment.