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
ConstructorsConstructorDescription -
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.booleanIndicates whether remote repositories should be re-checked for updated artifacts/metadata regardless of their configured update policy.booleanIndicates whether network access to remote repositories has been disabled.booleanbooleansetArtifact(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:RepositoryRequestGets the local repository to use.- Specified by:
getLocalRepositoryin interfaceRepositoryRequest- Returns:
- The local repository to use or
nullif not set.
-
setLocalRepository
Description copied from interface:RepositoryRequestSets the local repository to use.- Specified by:
setLocalRepositoryin interfaceRepositoryRequest- Parameters:
localRepository- The local repository to use.- Returns:
- This request, never
null.
-
getRemoteRepositories
Description copied from interface:RepositoryRequestGets the remote repositories to use.- Specified by:
getRemoteRepositoriesin interfaceRepositoryRequest- Returns:
- The remote repositories to use, never
null.
-
setRemoteRepositories
Description copied from interface:RepositoryRequestSets the remote repositories to use.- Specified by:
setRemoteRepositoriesin 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
nullto 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
nullto 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:RepositoryRequestIndicates whether network access to remote repositories has been disabled.- Specified by:
isOfflinein interfaceRepositoryRequest- Returns:
trueif remote access has been disabled,falseotherwise.
-
setOffline
Description copied from interface:RepositoryRequestEnables/disables network access to remote repositories.- Specified by:
setOfflinein interfaceRepositoryRequest- Parameters:
offline-trueto disable remote access,falseto allow network access.- Returns:
- This request, never
null.
-
isForceUpdate
public boolean isForceUpdate()Description copied from interface:RepositoryRequestIndicates whether remote repositories should be re-checked for updated artifacts/metadata regardless of their configured update policy.- Specified by:
isForceUpdatein interfaceRepositoryRequest- Returns:
trueif remote repositories should be re-checked for updated artifacts/metadata,falseotherwise.
-
setForceUpdate
Description copied from interface:RepositoryRequestEnables/disabled forced checks for updated artifacts/metadata on remote repositories.- Specified by:
setForceUpdatein interfaceRepositoryRequest- Parameters:
forceUpdate-trueto forcibly check the remote repositories for updated artifacts/metadata,falseto use the update policy configured on each repository.- Returns:
- This request, never
null.
-
setServers
-
getServers
-
setMirrors
-
getMirrors
-
setProxies
-
getProxies
-
setCache
-