|
|
@ -18,7 +18,6 @@ package org.springframework.boot.build.classpath;
|
|
|
|
|
|
|
|
|
|
|
|
import java.util.Collections;
|
|
|
|
import java.util.Collections;
|
|
|
|
import java.util.HashMap;
|
|
|
|
import java.util.HashMap;
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
import java.util.Map;
|
|
|
|
import java.util.Map;
|
|
|
|
import java.util.Map.Entry;
|
|
|
|
import java.util.Map.Entry;
|
|
|
|
import java.util.Set;
|
|
|
|
import java.util.Set;
|
|
|
@ -107,14 +106,13 @@ public class CheckClasspathForUnnecessaryExclusions extends DefaultTask {
|
|
|
|
this.exclusionsByDependencyId.forEach((dependencyId, exclusions) -> {
|
|
|
|
this.exclusionsByDependencyId.forEach((dependencyId, exclusions) -> {
|
|
|
|
if (!exclusions.isEmpty()) {
|
|
|
|
if (!exclusions.isEmpty()) {
|
|
|
|
Dependency toCheck = this.dependencyById.get(dependencyId);
|
|
|
|
Dependency toCheck = this.dependencyById.get(dependencyId);
|
|
|
|
List<String> dependencies = this.configurations.detachedConfiguration(toCheck, this.platform)
|
|
|
|
this.configurations.detachedConfiguration(toCheck, this.platform)
|
|
|
|
.getIncoming()
|
|
|
|
.getIncoming()
|
|
|
|
.getArtifacts()
|
|
|
|
.getArtifacts()
|
|
|
|
.getArtifacts()
|
|
|
|
.getArtifacts()
|
|
|
|
.stream()
|
|
|
|
.stream()
|
|
|
|
.map(this::getId)
|
|
|
|
.map(this::getId)
|
|
|
|
.toList();
|
|
|
|
.forEach(exclusions::remove);
|
|
|
|
exclusions.removeAll(dependencies);
|
|
|
|
|
|
|
|
removeProfileExclusions(dependencyId, exclusions);
|
|
|
|
removeProfileExclusions(dependencyId, exclusions);
|
|
|
|
if (!exclusions.isEmpty()) {
|
|
|
|
if (!exclusions.isEmpty()) {
|
|
|
|
unnecessaryExclusions.put(dependencyId, exclusions);
|
|
|
|
unnecessaryExclusions.put(dependencyId, exclusions);
|
|
|
|