Class ManagedScopeDeriver
java.lang.Object
org.eclipse.aether.util.graph.transformer.ConflictResolver.ScopeDeriver
org.eclipse.aether.internal.impl.scope.ManagedScopeDeriver
A scope deriver for use with
ConflictResolver
that supports the scopes from ScopeManager
. It basically
chooses "narrowest" scope, based on parent and child scopes.
This class also "bridges" between DependencyScope
and Resolver that uses plain string labels for scopes.
- Since:
- 4.0.0
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
deriveScope
(ConflictResolver.ScopeContext context) Determines the scope of a dependency in relation to the scope of its parent.getDerivedScope
(String parentScope, String childScope) Visible for testing.Methods inherited from class org.eclipse.aether.util.graph.transformer.ConflictResolver.ScopeDeriver
getInstance
-
Constructor Details
-
ManagedScopeDeriver
-
-
Method Details
-
deriveScope
Description copied from class:ConflictResolver.ScopeDeriver
Determines the scope of a dependency in relation to the scope of its parent. Implementors need to callConflictResolver.ScopeContext.setDerivedScope(String)
to deliver the result of their calculation. If said method is not invoked, the conflict resolver will assume the scope of the child dependency remains unchanged.- Specified by:
deriveScope
in classConflictResolver.ScopeDeriver
- Parameters:
context
- The scope context, must not benull
.
-
getDerivedScope
Visible for testing. It chooses "narrowest" scope out of parent or child, unless child is system scope.
-