Interface ScopeManager
- Since:
- 2.0.0
- Restriction:
- This interface is not intended to be extended by clients.
- Restriction:
- This interface is not intended to be implemented by clients.
-
Method Summary
Modifier and TypeMethodDescriptiongetDependencyFilter(RepositorySystemSession session, ResolutionScope resolutionScope) Resolver scope configuration specific: dependency filter to be used to support this scope (with its dependency and resolution scopes).Returns a specific dependency scope by label.Returns the "universe" (all) of dependency scopes as immutable collection.getDependencySelector(RepositorySystemSession session, ResolutionScope resolutionScope) Resolver scope configuration specific: dependency selector to be used to support this scope (with its dependency and resolution scopes).getId()The label.Returns a specific resolution scope by label.Returns the "universe" (all) of resolution scopes as immutable collection.Returns the "system" scope, if exists.
-
Method Details
-
getId
-
getSystemDependencyScope
Returns the "system" scope, if exists.This is a special scope. In this scope case, Resolver should handle it specially, as it has no POM (so is always a leaf on graph), is not in any repository, but is actually hosted on host OS file system. On resolution resolver merely checks is file present or not.
- Returns:
- The system dependency scope, or an empty optional if this manager has no such scope.
-
getDependencyScope
Returns a specific dependency scope by label.Note: despite returns optional, this method may throw as well, if manager set in "strict" mode.
- Parameters:
id- The label of the dependency scope, must not benull.- Returns:
- The dependency scope with the given label, or an empty optional if no such scope exists.
-
getDependencyScopeUniverse
Returns the "universe" (all) of dependency scopes as immutable collection.- Returns:
- The immutable collection of all known dependency scopes, never
null.
-
getResolutionScope
Returns a specific resolution scope by label.Note: despite returns optional, this method may throw as well, if manager set in "strict" mode.
- Parameters:
id- The label of the resolution scope, must not benull.- Returns:
- The resolution scope with the given label, or an empty optional if no such scope exists.
-
getResolutionScopeUniverse
Returns the "universe" (all) of resolution scopes as immutable collection.- Returns:
- The immutable collection of all known resolution scopes, never
null.
-
getDependencySelector
DependencySelector getDependencySelector(RepositorySystemSession session, ResolutionScope resolutionScope) Resolver scope configuration specific: dependency selector to be used to support this scope (with its dependency and resolution scopes).Important: Resolver 2.x when used with
ScopeManager, the scope semantics is defined by client code. Hence, the scopes cannot be interpreted with fixed logic as it was the case in Maven 3.9 and before, instead theScopeManagerhas to be asked to create selector based on scope configuration.- Parameters:
session- The repository system session, must not benull.resolutionScope- The resolution scope to create the selector for, must not benull.- Returns:
- The dependency selector supporting the given resolution scope, never
null.
-
getDependencyFilter
DependencyFilter getDependencyFilter(RepositorySystemSession session, ResolutionScope resolutionScope) Resolver scope configuration specific: dependency filter to be used to support this scope (with its dependency and resolution scopes).Important: Resolver 2.x when used with
ScopeManager, the scope semantics is defined by client code. Hence, the scopes cannot be interpreted with fixed logic as it was the case in Maven 3.9 and before, instead theScopeManagerhas to be asked to create filter based on scope configuration.- Parameters:
session- The repository system session, must not benull.resolutionScope- The resolution scope to create the filter for, must not benull.- Returns:
- The dependency filter supporting the given resolution scope, never
null.
-