public class DefaultRepositoryRequest extends Object implements RepositoryRequest
Constructor and Description |
---|
DefaultRepositoryRequest()
Creates an empty repository request.
|
DefaultRepositoryRequest(RepositoryRequest repositoryRequest)
Creates a shallow copy of the specified repository request.
|
Modifier and Type | Method and Description |
---|---|
ArtifactRepository |
getLocalRepository()
Gets the local repository to use.
|
List<ArtifactRepository> |
getRemoteRepositories()
Gets the remote repositories to use.
|
static RepositoryRequest |
getRepositoryRequest(MavenSession session,
MavenProject project) |
boolean |
isForceUpdate()
Indicates whether remote repositories should be re-checked for updated artifacts/metadata regardless of their
configured update policy.
|
boolean |
isOffline()
Indicates whether network access to remote repositories has been disabled.
|
DefaultRepositoryRequest |
setForceUpdate(boolean forceUpdate)
Enables/disabled forced checks for updated artifacts/metadata on remote repositories.
|
DefaultRepositoryRequest |
setLocalRepository(ArtifactRepository localRepository)
Sets the local repository to use.
|
DefaultRepositoryRequest |
setOffline(boolean offline)
Enables/disables network access to remote repositories.
|
DefaultRepositoryRequest |
setRemoteRepositories(List<ArtifactRepository> remoteRepositories)
Sets the remote repositories to use.
|
public DefaultRepositoryRequest()
public DefaultRepositoryRequest(RepositoryRequest repositoryRequest)
repositoryRequest
- The repository request to copy from, must not be null
.public static RepositoryRequest getRepositoryRequest(MavenSession session, MavenProject project)
public boolean isOffline()
RepositoryRequest
isOffline
in interface RepositoryRequest
true
if remote access has been disabled, false
otherwise.public DefaultRepositoryRequest setOffline(boolean offline)
RepositoryRequest
setOffline
in interface RepositoryRequest
offline
- true
to disable remote access, false
to allow network access.null
.public boolean isForceUpdate()
RepositoryRequest
isForceUpdate
in interface RepositoryRequest
true
if remote repositories should be re-checked for updated artifacts/metadata, false
otherwise.public DefaultRepositoryRequest setForceUpdate(boolean forceUpdate)
RepositoryRequest
setForceUpdate
in interface RepositoryRequest
forceUpdate
- true
to forcibly check the remote repositories for updated artifacts/metadata, false
to use the update policy configured on each repository.null
.public ArtifactRepository getLocalRepository()
RepositoryRequest
getLocalRepository
in interface RepositoryRequest
null
if not set.public DefaultRepositoryRequest setLocalRepository(ArtifactRepository localRepository)
RepositoryRequest
setLocalRepository
in interface RepositoryRequest
localRepository
- The local repository to use.null
.public List<ArtifactRepository> getRemoteRepositories()
RepositoryRequest
getRemoteRepositories
in interface RepositoryRequest
null
.public DefaultRepositoryRequest setRemoteRepositories(List<ArtifactRepository> remoteRepositories)
RepositoryRequest
setRemoteRepositories
in interface RepositoryRequest
remoteRepositories
- The remote repositories to use.null
.Copyright © 2001–2022 The Apache Software Foundation. All rights reserved.