Interface RemoteRepositoryManager

All Known Implementing Classes:
DefaultRemoteRepositoryManager

public interface RemoteRepositoryManager
Helps dealing with remote repository definitions.
Restriction:
This interface is not intended to be extended by clients.
Restriction:
This interface is not intended to be implemented by clients.
Provisional:
This type is provisional and can be changed, moved or removed without prior notice.
  • Method Details

    • aggregateRepositories

      List<RemoteRepository> aggregateRepositories(RepositorySystemSession session, List<RemoteRepository> dominantRepositories, List<RemoteRepository> recessiveRepositories, boolean recessiveIsRaw)
      Aggregates repository definitions by merging duplicate repositories and optionally applies mirror, proxy and authentication settings from the supplied session.
      Parameters:
      session - The repository session during which the repositories will be accessed, must not be null.
      dominantRepositories - The current list of remote repositories to merge the new definitions into, must not be null.
      recessiveRepositories - The remote repositories to merge into the existing list, must not be null.
      recessiveIsRaw - true if the recessive repository definitions have not yet been subjected to mirror, proxy and authentication settings, false otherwise.
      Returns:
      The aggregated list of remote repositories, never null.
      See Also:
    • aggregateRepositories

      default List<RemoteRepository> aggregateRepositories(RepositorySystemSession session, List<RemoteRepository> dominantRepositories, List<RemoteRepository> recessiveRepositories, boolean recessiveIsRaw, boolean recessiveIsFromDescriptor)
      Aggregates repository definitions by merging duplicate repositories and optionally applies mirror, proxy and authentication settings from the supplied session, additionally distinguishing the provenance of the recessive repository definitions. Repository definitions that originate from a remote artifact descriptor (i.e. a POM downloaded during dependency collection) are remotely supplied input: implementations may withhold session authentication from them unless an operator-defined mirror has been selected for them, so that session authentication is applied only to repositories the operator configured. Repository definitions supplied by the build itself (e.g. via RepositorySystem#newResolutionRepositories) must keep receiving mirror, proxy and authentication settings as documented for aggregateRepositories(RepositorySystemSession, List, List, boolean).

      The default implementation ignores the provenance hint and delegates to aggregateRepositories(RepositorySystemSession, List, List, boolean).

      Parameters:
      session - The repository session during which the repositories will be accessed, must not be null.
      dominantRepositories - The current list of remote repositories to merge the new definitions into, must not be null.
      recessiveRepositories - The remote repositories to merge into the existing list, must not be null.
      recessiveIsRaw - true if the recessive repository definitions have not yet been subjected to mirror, proxy and authentication settings, false otherwise.
      recessiveIsFromDescriptor - true if the recessive repository definitions were declared by a remote artifact descriptor (POM) rather than by the build itself, false otherwise.
      Returns:
      The aggregated list of remote repositories, never null.
      Since:
      2.0.23
      See Also:
    • getPolicy

      RepositoryPolicy getPolicy(RepositorySystemSession session, RemoteRepository repository, boolean releases, boolean snapshots)
      Gets the effective repository policy for the specified remote repository by merging the applicable snapshot/release policy of the repository with global settings from the supplied session.
      Parameters:
      session - The repository session during which the repository will be accessed, must not be null.
      repository - The remote repository to determine the effective policy for, must not be null.
      releases - true if the policy for release artifacts needs to be considered, false if not.
      snapshots - true if the policy for snapshot artifacts needs to be considered, false if not.
      Returns:
      The effective repository policy, never null.
      See Also: