Interface ScopeManager


public interface ScopeManager
Scope manager.
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 Details

    • getId

      The label.
      Returns:
      The identifier of this scope manager, never null.
    • 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 be null.
      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 be null.
      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

      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 the ScopeManager has to be asked to create selector based on scope configuration.

      Parameters:
      session - The repository system session, must not be null.
      resolutionScope - The resolution scope to create the selector for, must not be null.
      Returns:
      The dependency selector supporting the given resolution scope, never null.
    • getDependencyFilter

      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 the ScopeManager has to be asked to create filter based on scope configuration.

      Parameters:
      session - The repository system session, must not be null.
      resolutionScope - The resolution scope to create the filter for, must not be null.
      Returns:
      The dependency filter supporting the given resolution scope, never null.