Class DefaultRepositoryRequest
java.lang.Object
org.apache.maven.artifact.repository.DefaultRepositoryRequest
- All Implemented Interfaces:
- RepositoryRequest
Collects basic settings to access the repository system.
- 
Constructor SummaryConstructorsConstructorDescriptionCreates an empty repository request.DefaultRepositoryRequest(RepositoryRequest repositoryRequest) Creates a shallow copy of the specified repository request.
- 
Method SummaryModifier and TypeMethodDescriptionGets the local repository to use.Gets the remote repositories to use.static RepositoryRequestgetRepositoryRequest(MavenSession session, MavenProject project) 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.setForceUpdate(boolean forceUpdate) Enables/disabled forced checks for updated artifacts/metadata on remote repositories.setLocalRepository(ArtifactRepository localRepository) Sets the local repository to use.setOffline(boolean offline) Enables/disables network access to remote repositories.setRemoteRepositories(List<ArtifactRepository> remoteRepositories) Sets the remote repositories to use.
- 
Constructor Details- 
DefaultRepositoryRequestpublic DefaultRepositoryRequest()Creates an empty repository request.
- 
DefaultRepositoryRequestCreates a shallow copy of the specified repository request.- Parameters:
- repositoryRequest- The repository request to copy from, must not be- null.
 
 
- 
- 
Method Details- 
getRepositoryRequest
- 
isOfflinepublic boolean isOffline()Description copied from interface:RepositoryRequestIndicates whether network access to remote repositories has been disabled.- Specified by:
- isOfflinein interface- RepositoryRequest
- Returns:
- trueif remote access has been disabled,- falseotherwise.
 
- 
setOfflineDescription copied from interface:RepositoryRequestEnables/disables network access to remote repositories.- Specified by:
- setOfflinein interface- RepositoryRequest
- Parameters:
- offline-- trueto disable remote access,- falseto allow network access.
- Returns:
- This request, never null.
 
- 
isForceUpdatepublic 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 interface- RepositoryRequest
- Returns:
- trueif remote repositories should be re-checked for updated artifacts/metadata,- falseotherwise.
 
- 
setForceUpdateDescription copied from interface:RepositoryRequestEnables/disabled forced checks for updated artifacts/metadata on remote repositories.- Specified by:
- setForceUpdatein interface- RepositoryRequest
- 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.
 
- 
getLocalRepositoryDescription copied from interface:RepositoryRequestGets the local repository to use.- Specified by:
- getLocalRepositoryin interface- RepositoryRequest
- Returns:
- The local repository to use or nullif not set.
 
- 
setLocalRepositoryDescription copied from interface:RepositoryRequestSets the local repository to use.- Specified by:
- setLocalRepositoryin interface- RepositoryRequest
- Parameters:
- localRepository- The local repository to use.
- Returns:
- This request, never null.
 
- 
getRemoteRepositoriesDescription copied from interface:RepositoryRequestGets the remote repositories to use.- Specified by:
- getRemoteRepositoriesin interface- RepositoryRequest
- Returns:
- The remote repositories to use, never null.
 
- 
setRemoteRepositoriesDescription copied from interface:RepositoryRequestSets the remote repositories to use.- Specified by:
- setRemoteRepositoriesin interface- RepositoryRequest
- Parameters:
- remoteRepositories- The remote repositories to use.
- Returns:
- This request, never null.
 
 
-