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
ConstructorDescriptionDefaultMetadataResolutionRequest
(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.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
Determines 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:MetadataResolutionRequest
Gets the artifact to resolve metadata for.- Specified by:
getArtifact
in interfaceMetadataResolutionRequest
- Returns:
- The artifact to resolve metadata for or
null
if not set.
-
setArtifact
Description copied from interface:MetadataResolutionRequest
Sets the artifact for which to resolve metadata.- Specified by:
setArtifact
in interfaceMetadataResolutionRequest
- Parameters:
artifact
- The artifact for which to resolve metadata.- Returns:
- This request, never
null
.
-
getLocalRepository
Description copied from interface:MetadataResolutionRequest
Gets the local repository to use for the resolution.- Specified by:
getLocalRepository
in interfaceMetadataResolutionRequest
- Specified by:
getLocalRepository
in interfaceRepositoryRequest
- Returns:
- The local repository to use for the resolution or
null
if not set.
-
setLocalRepository
Description copied from interface:MetadataResolutionRequest
Sets the local repository to use for the resolution.- Specified by:
setLocalRepository
in interfaceMetadataResolutionRequest
- Specified by:
setLocalRepository
in interfaceRepositoryRequest
- Parameters:
localRepository
- The local repository to use for the resolution.- Returns:
- This request, never
null
.
-
getRemoteRepositories
Description copied from interface:MetadataResolutionRequest
Gets the remote repositories to use for the resolution.- Specified by:
getRemoteRepositories
in interfaceMetadataResolutionRequest
- Specified by:
getRemoteRepositories
in interfaceRepositoryRequest
- Returns:
- The remote repositories to use for the resolution, never
null
.
-
setRemoteRepositories
public DefaultMetadataResolutionRequest setRemoteRepositories(List<ArtifactRepository> remoteRepositories) Description copied from interface:MetadataResolutionRequest
Sets the remote repositories to use for the resolution.- Specified by:
setRemoteRepositories
in interfaceMetadataResolutionRequest
- Specified by:
setRemoteRepositories
in interfaceRepositoryRequest
- Parameters:
remoteRepositories
- The remote repositories to use for the resolution.- Returns:
- This request, never
null
.
-
isResolveManagedVersions
public boolean isResolveManagedVersions()Description copied from interface:MetadataResolutionRequest
Determines whether the managed version information should be retrieved.- Specified by:
isResolveManagedVersions
in interfaceMetadataResolutionRequest
- Returns:
true
if the dependency management information should be retrieved,false
otherwise.
-
setResolveManagedVersions
Description copied from interface:MetadataResolutionRequest
Enables/disables resolution of the dependency management information.- Specified by:
setResolveManagedVersions
in interfaceMetadataResolutionRequest
- Parameters:
resolveManagedVersions
-true
if the dependency management information should be retrieved,false
otherwise.- Returns:
- This request, never
null
.
-
isOffline
public boolean isOffline()Description copied from interface:MetadataResolutionRequest
Indicates whether network access to remote repositories has been disabled.- Specified by:
isOffline
in interfaceMetadataResolutionRequest
- Specified by:
isOffline
in interfaceRepositoryRequest
- Returns:
true
if remote access has been disabled,false
otherwise.
-
setOffline
Description copied from interface:MetadataResolutionRequest
Enables/disables network access to remote repositories.- Specified by:
setOffline
in interfaceMetadataResolutionRequest
- 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
.
-