Class DefaultMetadataResolutionRequest
- java.lang.Object
-
- org.apache.maven.repository.legacy.metadata.DefaultMetadataResolutionRequest
-
- All Implemented Interfaces:
RepositoryRequest,MetadataResolutionRequest
public class DefaultMetadataResolutionRequest extends java.lang.Object implements MetadataResolutionRequest
Forms a request to retrieve artifact metadata.- Author:
- Benjamin Bentmann
-
-
Constructor Summary
Constructors Constructor Description DefaultMetadataResolutionRequest()DefaultMetadataResolutionRequest(RepositoryRequest repositoryRequest)DefaultMetadataResolutionRequest(ArtifactResolutionRequest resolutionRequest)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.maven.artifact.ArtifactgetArtifact()Gets the artifact to resolve metadata for.org.apache.maven.artifact.repository.ArtifactRepositorygetLocalRepository()Gets the local repository to use for the resolution.java.util.List<org.apache.maven.artifact.repository.ArtifactRepository>getRemoteRepositories()Gets the remote repositories to use for the resolution.booleanisForceUpdate()Indicates whether remote repositories should be re-checked for updated artifacts/metadata regardless of their configured update policy.booleanisOffline()Indicates whether network access to remote repositories has been disabled.booleanisResolveManagedVersions()Determines whether the managed version information should be retrieved.DefaultMetadataResolutionRequestsetArtifact(org.apache.maven.artifact.Artifact artifact)Sets the artifact for which to resolve metadata.DefaultMetadataResolutionRequestsetForceUpdate(boolean forceUpdate)Enables/disabled forced checks for updated artifacts/metadata on remote repositories.DefaultMetadataResolutionRequestsetLocalRepository(org.apache.maven.artifact.repository.ArtifactRepository localRepository)Sets the local repository to use for the resolution.DefaultMetadataResolutionRequestsetOffline(boolean offline)Enables/disables network access to remote repositories.DefaultMetadataResolutionRequestsetRemoteRepositories(java.util.List<org.apache.maven.artifact.repository.ArtifactRepository> remoteRepositories)Sets the remote repositories to use for the resolution.DefaultMetadataResolutionRequestsetResolveManagedVersions(boolean resolveManagedVersions)Enables/disables resolution of the dependency management information.
-
-
-
Constructor Detail
-
DefaultMetadataResolutionRequest
public DefaultMetadataResolutionRequest()
-
DefaultMetadataResolutionRequest
public DefaultMetadataResolutionRequest(RepositoryRequest repositoryRequest)
-
DefaultMetadataResolutionRequest
public DefaultMetadataResolutionRequest(ArtifactResolutionRequest resolutionRequest)
-
-
Method Detail
-
getArtifact
public org.apache.maven.artifact.Artifact getArtifact()
Description copied from interface:MetadataResolutionRequestGets the artifact to resolve metadata for.- Specified by:
getArtifactin interfaceMetadataResolutionRequest- Returns:
- The artifact to resolve metadata for or
nullif not set.
-
setArtifact
public DefaultMetadataResolutionRequest setArtifact(org.apache.maven.artifact.Artifact artifact)
Description copied from interface:MetadataResolutionRequestSets the artifact for which to resolve metadata.- Specified by:
setArtifactin interfaceMetadataResolutionRequest- Parameters:
artifact- The artifact for which to resolve metadata.- Returns:
- This request, never
null.
-
getLocalRepository
public org.apache.maven.artifact.repository.ArtifactRepository getLocalRepository()
Description copied from interface:MetadataResolutionRequestGets the local repository to use for the resolution.- Specified by:
getLocalRepositoryin interfaceMetadataResolutionRequest- Specified by:
getLocalRepositoryin interfaceRepositoryRequest- Returns:
- The local repository to use for the resolution or
nullif not set.
-
setLocalRepository
public DefaultMetadataResolutionRequest setLocalRepository(org.apache.maven.artifact.repository.ArtifactRepository localRepository)
Description copied from interface:MetadataResolutionRequestSets the local repository to use for the resolution.- Specified by:
setLocalRepositoryin interfaceMetadataResolutionRequest- Specified by:
setLocalRepositoryin interfaceRepositoryRequest- Parameters:
localRepository- The local repository to use for the resolution.- Returns:
- This request, never
null.
-
getRemoteRepositories
public java.util.List<org.apache.maven.artifact.repository.ArtifactRepository> getRemoteRepositories()
Description copied from interface:MetadataResolutionRequestGets the remote repositories to use for the resolution.- Specified by:
getRemoteRepositoriesin interfaceMetadataResolutionRequest- Specified by:
getRemoteRepositoriesin interfaceRepositoryRequest- Returns:
- The remote repositories to use for the resolution, never
null.
-
setRemoteRepositories
public DefaultMetadataResolutionRequest setRemoteRepositories(java.util.List<org.apache.maven.artifact.repository.ArtifactRepository> remoteRepositories)
Description copied from interface:MetadataResolutionRequestSets the remote repositories to use for the resolution.- Specified by:
setRemoteRepositoriesin interfaceMetadataResolutionRequest- Specified by:
setRemoteRepositoriesin interfaceRepositoryRequest- Parameters:
remoteRepositories- The remote repositories to use for the resolution.- Returns:
- This request, never
null.
-
isResolveManagedVersions
public boolean isResolveManagedVersions()
Description copied from interface:MetadataResolutionRequestDetermines whether the managed version information should be retrieved.- Specified by:
isResolveManagedVersionsin interfaceMetadataResolutionRequest- Returns:
trueif the dependency management information should be retrieved,falseotherwise.
-
setResolveManagedVersions
public DefaultMetadataResolutionRequest setResolveManagedVersions(boolean resolveManagedVersions)
Description copied from interface:MetadataResolutionRequestEnables/disables resolution of the dependency management information.- Specified by:
setResolveManagedVersionsin interfaceMetadataResolutionRequest- Parameters:
resolveManagedVersions-trueif the dependency management information should be retrieved,falseotherwise.- Returns:
- This request, never
null.
-
isOffline
public boolean isOffline()
Description copied from interface:MetadataResolutionRequestIndicates whether network access to remote repositories has been disabled.- Specified by:
isOfflinein interfaceMetadataResolutionRequest- Specified by:
isOfflinein interfaceRepositoryRequest- Returns:
trueif remote access has been disabled,falseotherwise.
-
setOffline
public DefaultMetadataResolutionRequest setOffline(boolean offline)
Description copied from interface:MetadataResolutionRequestEnables/disables network access to remote repositories.- Specified by:
setOfflinein interfaceMetadataResolutionRequest- 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
public DefaultMetadataResolutionRequest setForceUpdate(boolean forceUpdate)
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.
-
-