public interface RepositorySystem
Modifier and Type | Method and Description |
---|---|
CollectResult |
collectDependencies(RepositorySystemSession session,
CollectRequest request)
Collects the transitive dependencies of an artifact and builds a dependency graph.
|
DeployResult |
deploy(RepositorySystemSession session,
DeployRequest request)
Uploads a collection of artifacts and their accompanying metadata to a remote repository.
|
InstallResult |
install(RepositorySystemSession session,
InstallRequest request)
Installs a collection of artifacts and their accompanying metadata to the local repository.
|
RemoteRepository |
newDeploymentRepository(RepositorySystemSession session,
RemoteRepository repository)
Forms a remote repository suitable for artifact deployment by applying the session's authentication selector and
similar network configuration to the given repository prototype.
|
LocalRepositoryManager |
newLocalRepositoryManager(RepositorySystemSession session,
LocalRepository localRepository)
Creates a new manager for the specified local repository.
|
List<RemoteRepository> |
newResolutionRepositories(RepositorySystemSession session,
List<RemoteRepository> repositories)
Forms remote repositories suitable for artifact resolution by applying the session's authentication selector and
similar network configuration to the given repository prototypes.
|
SyncContext |
newSyncContext(RepositorySystemSession session,
boolean shared)
Creates a new synchronization context.
|
ArtifactDescriptorResult |
readArtifactDescriptor(RepositorySystemSession session,
ArtifactDescriptorRequest request)
Gets information about an artifact like its direct dependencies and potential relocations.
|
ArtifactResult |
resolveArtifact(RepositorySystemSession session,
ArtifactRequest request)
Resolves the path for an artifact.
|
List<ArtifactResult> |
resolveArtifacts(RepositorySystemSession session,
Collection<? extends ArtifactRequest> requests)
Resolves the paths for a collection of artifacts.
|
DependencyResult |
resolveDependencies(RepositorySystemSession session,
DependencyRequest request)
Collects and resolves the transitive dependencies of an artifact.
|
List<MetadataResult> |
resolveMetadata(RepositorySystemSession session,
Collection<? extends MetadataRequest> requests)
Resolves the paths for a collection of metadata.
|
VersionResult |
resolveVersion(RepositorySystemSession session,
VersionRequest request)
Resolves an artifact's meta version (if any) to a concrete version.
|
VersionRangeResult |
resolveVersionRange(RepositorySystemSession session,
VersionRangeRequest request)
Expands a version range to a list of matching versions, in ascending order.
|
VersionRangeResult resolveVersionRange(RepositorySystemSession session, VersionRangeRequest request) throws VersionRangeResolutionException
session's
version filter
.
The supplied request may also refer to a single concrete version rather than a version range. In this case though, the result contains simply the (parsed) input version, regardless of the repositories and their contents.
session
- The repository session, must not be null
.request
- The version range request, must not be null
.null
.VersionRangeResolutionException
- If the requested range could not be parsed. Note that an empty range does
not raise an exception.newResolutionRepositories(RepositorySystemSession, List)
VersionResult resolveVersion(RepositorySystemSession session, VersionRequest request) throws VersionResolutionException
session
- The repository session, must not be null
.request
- The version request, must not be null
.null
.VersionResolutionException
- If the metaversion could not be resolved.newResolutionRepositories(RepositorySystemSession, List)
ArtifactDescriptorResult readArtifactDescriptor(RepositorySystemSession session, ArtifactDescriptorRequest request) throws ArtifactDescriptorException
session
- The repository session, must not be null
.request
- The descriptor request, must not be null
.null
.ArtifactDescriptorException
- If the artifact descriptor could not be read.RepositorySystemSession.getArtifactDescriptorPolicy()
,
newResolutionRepositories(RepositorySystemSession, List)
CollectResult collectDependencies(RepositorySystemSession session, CollectRequest request) throws DependencyCollectionException
resolveDependencies(RepositorySystemSession, DependencyRequest)
.session
- The repository session, must not be null
.request
- The collection request, must not be null
.null
.DependencyCollectionException
- If the dependency tree could not be built.RepositorySystemSession.getDependencyTraverser()
,
RepositorySystemSession.getDependencyManager()
,
RepositorySystemSession.getDependencySelector()
,
RepositorySystemSession.getVersionFilter()
,
RepositorySystemSession.getDependencyGraphTransformer()
,
newResolutionRepositories(RepositorySystemSession, List)
DependencyResult resolveDependencies(RepositorySystemSession session, DependencyRequest request) throws DependencyResolutionException
collectDependencies(RepositorySystemSession, CollectRequest)
and
resolveArtifacts(RepositorySystemSession, Collection)
.session
- The repository session, must not be null
.request
- The dependency request, must not be null
.null
.DependencyResolutionException
- If the dependency tree could not be built or any dependency artifact could
not be resolved.newResolutionRepositories(RepositorySystemSession, List)
ArtifactResult resolveArtifact(RepositorySystemSession session, ArtifactRequest request) throws ArtifactResolutionException
session
- The repository session, must not be null
.request
- The resolution request, must not be null
.null
.ArtifactResolutionException
- If the artifact could not be resolved.Artifact.getFile()
,
newResolutionRepositories(RepositorySystemSession, List)
List<ArtifactResult> resolveArtifacts(RepositorySystemSession session, Collection<? extends ArtifactRequest> requests) throws ArtifactResolutionException
session
- The repository session, must not be null
.requests
- The resolution requests, must not be null
.null
.ArtifactResolutionException
- If any artifact could not be resolved.Artifact.getFile()
,
newResolutionRepositories(RepositorySystemSession, List)
List<MetadataResult> resolveMetadata(RepositorySystemSession session, Collection<? extends MetadataRequest> requests)
session
- The repository session, must not be null
.requests
- The resolution requests, must not be null
.null
.Metadata.getFile()
,
newResolutionRepositories(RepositorySystemSession, List)
InstallResult install(RepositorySystemSession session, InstallRequest request) throws InstallationException
session
- The repository session, must not be null
.request
- The installation request, must not be null
.null
.InstallationException
- If any artifact/metadata from the request could not be installed.DeployResult deploy(RepositorySystemSession session, DeployRequest request) throws DeploymentException
session
- The repository session, must not be null
.request
- The deployment request, must not be null
.null
.DeploymentException
- If any artifact/metadata from the request could not be deployed.newDeploymentRepository(RepositorySystemSession, RemoteRepository)
LocalRepositoryManager newLocalRepositoryManager(RepositorySystemSession session, LocalRepository localRepository)
session
- The repository system session from which to configure the manager, must not be null
.localRepository
- The local repository to create a manager for, must not be null
.null
.IllegalArgumentException
- If the specified repository type is not recognized or no base directory is
given.SyncContext newSyncContext(RepositorySystemSession session, boolean shared)
session
- The repository session during which the context will be used, must not be null
.shared
- A flag indicating whether access to the artifacts/metadata associated with the new context can be
shared among concurrent readers or whether access needs to be exclusive to the calling thread.null
.List<RemoteRepository> newResolutionRepositories(RepositorySystemSession session, List<RemoteRepository> repositories)
RepositorySystemSession.getAuthenticationSelector()
etc. the remote repositories passed to e.g.
resolveArtifact()
are used as is and expected
to already carry any required authentication or proxy configuration. This method can be used to apply the
authentication/proxy configuration from a session to a bare repository definition to obtain the complete
repository definition for use in the resolution request.session
- The repository system session from which to configure the repositories, must not be null
.repositories
- The repository prototypes from which to derive the resolution repositories, must not be
null
or contain null
elements.null
. Note that there is generally no 1:1 relationship of the
obtained repositories to the original inputs due to mirror selection potentially aggregating multiple
repositories.newDeploymentRepository(RepositorySystemSession, RemoteRepository)
RemoteRepository newDeploymentRepository(RepositorySystemSession session, RemoteRepository repository)
RepositorySystemSession.getAuthenticationSelector()
etc. the remote repository passed to
deploy()
is used as is and expected to already carry any
required authentication or proxy configuration. This method can be used to apply the authentication/proxy
configuration from a session to a bare repository definition to obtain the complete repository definition for use
in the deploy request.session
- The repository system session from which to configure the repository, must not be null
.repository
- The repository prototype from which to derive the deployment repository, must not be
null
.null
.newResolutionRepositories(RepositorySystemSession, List)
Copyright © 2010–2020 The Apache Software Foundation. All rights reserved.