Skip to content

Commit

Permalink
Split the two
Browse files Browse the repository at this point in the history
  • Loading branch information
cstamas committed Dec 19, 2024
1 parent f469391 commit c3007ad
Showing 1 changed file with 11 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -232,14 +232,17 @@ private DependencyResult resolveInternal(
org.eclipse.aether.graph.Dependency managedDep =
core.get(pluginDep.getArtifact().getGroupId() + ":"
+ pluginDep.getArtifact().getArtifactId());
if (managedDep != null
&& !Objects.equals(
pluginDep.getArtifact().getVersion(),
managedDep.getArtifact().getVersion())) {
pluginDep = pluginDep.setArtifact(pluginDep
.getArtifact()
.setVersion(managedDep.getArtifact().getVersion()));
pluginDep = pluginDep.setScope(DependencyScope.PROVIDED.id());
if (managedDep != null) {
// align version if needed
if (!Objects.equals(
pluginDep.getArtifact().getVersion(),
managedDep.getArtifact().getVersion())) {
pluginDep = pluginDep.setArtifact(pluginDep
.getArtifact()
.setVersion(managedDep.getArtifact().getVersion()));
}
// align scope
pluginDep = pluginDep.setScope(managedDep.getScope());
}
request.addDependency(pluginDep);
}
Expand Down

0 comments on commit c3007ad

Please sign in to comment.