|
|
@ -19,8 +19,9 @@ package org.springframework.boot.dependency.tools;
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.Iterator;
|
|
|
|
import java.util.Iterator;
|
|
|
|
import java.util.LinkedHashMap;
|
|
|
|
import java.util.LinkedHashMap;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.LinkedHashSet;
|
|
|
|
import java.util.Map;
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
import java.util.Set;
|
|
|
|
|
|
|
|
|
|
|
|
import org.springframework.boot.dependency.tools.Dependency.Exclusion;
|
|
|
|
import org.springframework.boot.dependency.tools.Dependency.Exclusion;
|
|
|
|
|
|
|
|
|
|
|
@ -68,12 +69,11 @@ abstract class AbstractDependencies implements Dependencies {
|
|
|
|
|
|
|
|
|
|
|
|
private Dependency mergeDependencies(Dependency existingDependency,
|
|
|
|
private Dependency mergeDependencies(Dependency existingDependency,
|
|
|
|
Dependency newDependency) {
|
|
|
|
Dependency newDependency) {
|
|
|
|
List<Exclusion> combinedExclusions = new ArrayList<Exclusion>();
|
|
|
|
Set<Exclusion> combinedExclusions = new LinkedHashSet<Exclusion>();
|
|
|
|
combinedExclusions.addAll(existingDependency.getExclusions());
|
|
|
|
combinedExclusions.addAll(existingDependency.getExclusions());
|
|
|
|
combinedExclusions.addAll(newDependency.getExclusions());
|
|
|
|
combinedExclusions.addAll(newDependency.getExclusions());
|
|
|
|
|
|
|
|
|
|
|
|
return new Dependency(newDependency.getGroupId(), newDependency.getArtifactId(),
|
|
|
|
return new Dependency(newDependency.getGroupId(), newDependency.getArtifactId(),
|
|
|
|
newDependency.getVersion(), combinedExclusions);
|
|
|
|
newDependency.getVersion(), new ArrayList<Exclusion>(combinedExclusions));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|