mirror of https://github.com/apache/maven.git
Split the two
This commit is contained in:
parent
f469391ee2
commit
c3007ad151
|
@ -232,14 +232,17 @@ public class DefaultPluginDependenciesResolver implements PluginDependenciesReso
|
||||||
org.eclipse.aether.graph.Dependency managedDep =
|
org.eclipse.aether.graph.Dependency managedDep =
|
||||||
core.get(pluginDep.getArtifact().getGroupId() + ":"
|
core.get(pluginDep.getArtifact().getGroupId() + ":"
|
||||||
+ pluginDep.getArtifact().getArtifactId());
|
+ pluginDep.getArtifact().getArtifactId());
|
||||||
if (managedDep != null
|
if (managedDep != null) {
|
||||||
&& !Objects.equals(
|
// align version if needed
|
||||||
pluginDep.getArtifact().getVersion(),
|
if (!Objects.equals(
|
||||||
managedDep.getArtifact().getVersion())) {
|
pluginDep.getArtifact().getVersion(),
|
||||||
pluginDep = pluginDep.setArtifact(pluginDep
|
managedDep.getArtifact().getVersion())) {
|
||||||
.getArtifact()
|
pluginDep = pluginDep.setArtifact(pluginDep
|
||||||
.setVersion(managedDep.getArtifact().getVersion()));
|
.getArtifact()
|
||||||
pluginDep = pluginDep.setScope(DependencyScope.PROVIDED.id());
|
.setVersion(managedDep.getArtifact().getVersion()));
|
||||||
|
}
|
||||||
|
// align scope
|
||||||
|
pluginDep = pluginDep.setScope(managedDep.getScope());
|
||||||
}
|
}
|
||||||
request.addDependency(pluginDep);
|
request.addDependency(pluginDep);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue