Class ArtifactResolutionRequest
java.lang.Object
org.apache.maven.artifact.resolver.ArtifactResolutionRequest
- All Implemented Interfaces:
RepositoryRequest
A resolution request allows you to either use an existing MavenProject, or a coordinate (gid:aid:version)
to process a POMs dependencies.
- Author:
- Jason van Zyl
-
Constructor Summary
ConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptionaddListener
(ResolutionListener listener) Gets the artifact filter that controls traversal of the dependency graph.Gets the local repository to use.Gets the remote repositories to use.Gets the artifact filter that controls downloading of artifact files.boolean
Indicates whether remote repositories should be re-checked for updated artifacts/metadata regardless of their configured update policy.boolean
Indicates whether network access to remote repositories has been disabled.boolean
boolean
setArtifact
(Artifact artifact) setArtifactDependencies
(Set<Artifact> artifactDependencies) setCache
(RepositoryCache cache) setCollectionFilter
(ArtifactFilter filter) setForceUpdate
(boolean forceUpdate) Enables/disabled forced checks for updated artifacts/metadata on remote repositories.setListeners
(List<ResolutionListener> listeners) setLocalRepository
(ArtifactRepository localRepository) Sets the local repository to use.setManagedVersionMap
(Map<String, Artifact> managedVersionMap) setMirrors
(List<Mirror> mirrors) setOffline
(boolean offline) Enables/disables network access to remote repositories.setProxies
(List<Proxy> proxies) setRemoteRepositories
(List<ArtifactRepository> remoteRepositories) Sets the remote repositories to use.setResolutionFilter
(ArtifactFilter filter) setResolveRoot
(boolean resolveRoot) setResolveTransitively
(boolean resolveDependencies) setServers
(List<Server> servers) toString()
-
Constructor Details
-
ArtifactResolutionRequest
public ArtifactResolutionRequest() -
ArtifactResolutionRequest
-
-
Method Details
-
getArtifact
-
setArtifact
-
setArtifactDependencies
-
getArtifactDependencies
-
getLocalRepository
Description copied from interface:RepositoryRequest
Gets the local repository to use.- Specified by:
getLocalRepository
in interfaceRepositoryRequest
- Returns:
- The local repository to use or
null
if not set.
-
setLocalRepository
Description copied from interface:RepositoryRequest
Sets the local repository to use.- Specified by:
setLocalRepository
in interfaceRepositoryRequest
- Parameters:
localRepository
- The local repository to use.- Returns:
- This request, never
null
.
-
getRemoteRepositories
Description copied from interface:RepositoryRequest
Gets the remote repositories to use.- Specified by:
getRemoteRepositories
in interfaceRepositoryRequest
- Returns:
- The remote repositories to use, never
null
.
-
setRemoteRepositories
Description copied from interface:RepositoryRequest
Sets the remote repositories to use.- Specified by:
setRemoteRepositories
in interfaceRepositoryRequest
- Parameters:
remoteRepositories
- The remote repositories to use.- Returns:
- This request, never
null
.
-
getCollectionFilter
Gets the artifact filter that controls traversal of the dependency graph.- Returns:
- The filter used to determine which of the artifacts in the dependency graph should be traversed or
null
to collect all transitive dependencies.
-
setCollectionFilter
-
getResolutionFilter
Gets the artifact filter that controls downloading of artifact files. This filter operates on those artifacts that have been included by thegetCollectionFilter()
.- Returns:
- The filter used to determine which of the artifacts should have their files resolved or
null
to resolve the files for all collected artifacts.
-
setResolutionFilter
-
getListeners
-
setListeners
-
addListener
-
getManagedVersionMap
-
setManagedVersionMap
-
setResolveRoot
-
isResolveRoot
public boolean isResolveRoot() -
setResolveTransitively
-
isResolveTransitively
public boolean isResolveTransitively() -
toString
-
isOffline
public boolean isOffline()Description copied from interface:RepositoryRequest
Indicates whether network access to remote repositories has been disabled.- Specified by:
isOffline
in interfaceRepositoryRequest
- Returns:
true
if remote access has been disabled,false
otherwise.
-
setOffline
Description copied from interface:RepositoryRequest
Enables/disables network access to remote repositories.- Specified by:
setOffline
in interfaceRepositoryRequest
- Parameters:
offline
-true
to disable remote access,false
to allow network access.- Returns:
- This request, never
null
.
-
isForceUpdate
public boolean isForceUpdate()Description copied from interface:RepositoryRequest
Indicates whether remote repositories should be re-checked for updated artifacts/metadata regardless of their configured update policy.- Specified by:
isForceUpdate
in interfaceRepositoryRequest
- Returns:
true
if remote repositories should be re-checked for updated artifacts/metadata,false
otherwise.
-
setForceUpdate
Description copied from interface:RepositoryRequest
Enables/disabled forced checks for updated artifacts/metadata on remote repositories.- Specified by:
setForceUpdate
in interfaceRepositoryRequest
- Parameters:
forceUpdate
-true
to forcibly check the remote repositories for updated artifacts/metadata,false
to use the update policy configured on each repository.- Returns:
- This request, never
null
.
-
setServers
-
getServers
-
setMirrors
-
getMirrors
-
setProxies
-
getProxies
-
setCache
-