Class DefaultMetadataResolutionRequest
java.lang.Object
org.apache.maven.repository.legacy.metadata.DefaultMetadataResolutionRequest
- All Implemented Interfaces:
RepositoryRequest,MetadataResolutionRequest
Forms a request to retrieve artifact metadata.
- Author:
- Benjamin Bentmann
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultMetadataResolutionRequest(RepositoryRequest repositoryRequest) DefaultMetadataResolutionRequest(ArtifactResolutionRequest resolutionRequest) -
Method Summary
Modifier and TypeMethodDescriptionGets the artifact to resolve metadata for.Gets the local repository to use for the resolution.Gets the remote repositories to use for the resolution.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.booleanDetermines whether the managed version information should be retrieved.setArtifact(Artifact artifact) Sets the artifact for which to resolve metadata.setForceUpdate(boolean forceUpdate) Enables/disabled forced checks for updated artifacts/metadata on remote repositories.setLocalRepository(ArtifactRepository localRepository) Sets the local repository to use for the resolution.setOffline(boolean offline) Enables/disables network access to remote repositories.setRemoteRepositories(List<ArtifactRepository> remoteRepositories) Sets the remote repositories to use for the resolution.setResolveManagedVersions(boolean resolveManagedVersions) Enables/disables resolution of the dependency management information.
-
Constructor Details
-
DefaultMetadataResolutionRequest
public DefaultMetadataResolutionRequest() -
DefaultMetadataResolutionRequest
-
DefaultMetadataResolutionRequest
-
-
Method Details
-
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
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
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
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
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(List<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
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
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
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.
-