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()
RepositoryRequestisOffline in interface RepositoryRequesttrue if remote access has been disabled, false otherwise.public DefaultRepositoryRequest setOffline(boolean offline)
RepositoryRequestsetOffline in interface RepositoryRequestoffline - true to disable remote access, false to allow network access.null.public boolean isForceUpdate()
RepositoryRequestisForceUpdate in interface RepositoryRequesttrue if remote repositories should be re-checked for updated artifacts/metadata, false
otherwise.public DefaultRepositoryRequest setForceUpdate(boolean forceUpdate)
RepositoryRequestsetForceUpdate in interface RepositoryRequestforceUpdate - 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()
RepositoryRequestgetLocalRepository in interface RepositoryRequestnull if not set.public DefaultRepositoryRequest setLocalRepository(ArtifactRepository localRepository)
RepositoryRequestsetLocalRepository in interface RepositoryRequestlocalRepository - The local repository to use.null.public List<ArtifactRepository> getRemoteRepositories()
RepositoryRequestgetRemoteRepositories in interface RepositoryRequestnull.public DefaultRepositoryRequest setRemoteRepositories(List<ArtifactRepository> remoteRepositories)
RepositoryRequestsetRemoteRepositories in interface RepositoryRequestremoteRepositories - The remote repositories to use.null.Copyright © 2001–2015 The Apache Software Foundation. All rights reserved.