Class ConflictResolver.ScopeDeriver
- java.lang.Object
-
- org.eclipse.aether.util.graph.transformer.ConflictResolver.ScopeDeriver
-
- Direct Known Subclasses:
JavaScopeDeriver
- Enclosing class:
- ConflictResolver
public abstract static class ConflictResolver.ScopeDeriver extends Object
An extension point ofConflictResolver
that determines the scope of a dependency in relation to the scope of its parent.Note: Implementations must be stateless.
-
-
Constructor Summary
Constructors Constructor Description ScopeDeriver()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract void
deriveScope(ConflictResolver.ScopeContext context)
Determines the scope of a dependency in relation to the scope of its parent.ConflictResolver.ScopeDeriver
getInstance(DependencyNode root, DependencyGraphTransformationContext context)
Retrieves the scope deriver for use during the specified graph transformation.
-
-
-
Constructor Detail
-
ScopeDeriver
public ScopeDeriver()
-
-
Method Detail
-
getInstance
public ConflictResolver.ScopeDeriver getInstance(DependencyNode root, DependencyGraphTransformationContext context) throws RepositoryException
Retrieves the scope deriver for use during the specified graph transformation. The conflict resolver calls this method once perConflictResolver.transformGraph(DependencyNode, DependencyGraphTransformationContext)
invocation to allow implementations to prepare any auxiliary data that is needed for their operation. Given that implementations must be stateless, a new instance needs to be returned to hold such auxiliary data. The default implementation simply returns the current instance which is appropriate for implementations which do not require auxiliary data.- Parameters:
root
- The root node of the (possibly cyclic!) graph to transform, must not benull
.context
- The graph transformation context, must not benull
.- Returns:
- The scope deriver to use for the given graph transformation, never
null
. - Throws:
RepositoryException
- If the instance could not be retrieved.
-
deriveScope
public abstract void deriveScope(ConflictResolver.ScopeContext context) throws RepositoryException
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.- Parameters:
context
- The scope context, must not benull
.- Throws:
RepositoryException
- If the scope deriviation failed.
-
-