Skip to content

Commit

Permalink
[MNG-8295] Dependency Manager Transitivity (now default) handles depe…
Browse files Browse the repository at this point in the history
…ndency management inconsistently

Actually use TransitiveDependencyManager when maven.resolver.dependencyManagerTransitivity=true
  • Loading branch information
DidierLoiseau committed Oct 7, 2024
1 parent e369ce5 commit b7a6a72
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
import org.eclipse.aether.resolution.ArtifactDescriptorPolicy;
import org.eclipse.aether.util.artifact.DefaultArtifactTypeRegistry;
import org.eclipse.aether.util.graph.manager.ClassicDependencyManager;
import org.eclipse.aether.util.graph.manager.TransitiveDependencyManager;
import org.eclipse.aether.util.graph.selector.AndDependencySelector;
import org.eclipse.aether.util.graph.selector.ExclusionDependencySelector;
import org.eclipse.aether.util.graph.transformer.ChainedDependencyGraphTransformer;
Expand Down Expand Up @@ -84,7 +85,10 @@ protected DependencyManager getDependencyManager() {
}

public DependencyManager getDependencyManager(boolean transitive) {
return new ClassicDependencyManager(transitive, getScopeManager());
if (transitive) {
return new TransitiveDependencyManager(getScopeManager());
}
return new ClassicDependencyManager(getScopeManager());
}

protected DependencySelector getDependencySelector() {
Expand Down

0 comments on commit b7a6a72

Please sign in to comment.