Interface ScopeManager

    • Method Detail

      • getId

        java.lang.String getId()
        The label.
      • getSystemDependencyScope

        java.util.Optional<SystemDependencyScopegetSystemDependencyScope()
        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.

      • getDependencyScope

        java.util.Optional<DependencyScopegetDependencyScope​(java.lang.String id)
        Returns a specific dependency scope by label.

        Note: despite returns optional, this method may throw as well, if manager set in "strict" mode.

      • getResolutionScope

        java.util.Optional<ResolutionScopegetResolutionScope​(java.lang.String id)
        Returns a specific resolution scope by label.

        Note: despite returns optional, this method may throw as well, if manager set in "strict" mode.

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

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