Package org.eclipse.aether.repository
Class RemoteRepository
java.lang.Object
org.eclipse.aether.repository.RemoteRepository
- All Implemented Interfaces:
ArtifactRepository
A repository on a remote server.
If use of instances of this class are meant to be used as keys, see toBareRemoteRepository() method.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA builder to create remote repositories.static enumThe intent this repository is to be used for. -
Method Summary
Modifier and TypeMethodDescriptionbooleanGets the authentication that has been selected for this repository.Gets the type of the repository, for example "default".getHost()Gets the host part from the repository's URL.getId()Gets the identifier of this repository.Returns the intent this repository is prepared for.Gets the repositories that this repository serves as a mirror for.getPolicy(boolean snapshot) Gets the policy to apply for snapshot/release artifacts.Gets the protocol part from the repository's URL, for examplefileorhttp.getProxy()Gets the proxy that has been selected for this repository.getUrl()Gets the (base) URL of this repository.inthashCode()booleanIndicates whether this repository is blocked from performing any download requests.booleanIndicates whether this repository refers to a repository manager or not.Makes "bare" repository out of this instance, usable as keys within one single session, by applying following changes to repository (returns new instance): sets intent toRemoteRepository.Intent.BAREnullifies proxy nullifies authentication nullifies mirrors sets repositoryManager tofalseThese properties are managed by repository system, based on configuration.toString()
-
Method Details
-
getId
Description copied from interface:ArtifactRepositoryGets the identifier of this repository.- Specified by:
getIdin interfaceArtifactRepository- Returns:
- The (case-sensitive) identifier, never
null.
-
getContentType
Description copied from interface:ArtifactRepositoryGets the type of the repository, for example "default".- Specified by:
getContentTypein interfaceArtifactRepository- Returns:
- The (case-sensitive) type of the repository, never
null.
-
getUrl
Gets the (base) URL of this repository.- Returns:
- The (base) URL of this repository, never
null.
-
getProtocol
Gets the protocol part from the repository's URL, for examplefileorhttp. As suggested by RFC 2396, section 3.1 "Scheme Component", the protocol name should be treated case-insensitively.- Returns:
- The protocol or an empty string if none, never
null.
-
getHost
Gets the host part from the repository's URL.- Returns:
- The host or an empty string if none, never
null.
-
getPolicy
Gets the policy to apply for snapshot/release artifacts.- Parameters:
snapshot-trueto retrieve the snapshot policy,falseto retrieve the release policy.- Returns:
- The requested repository policy, never
null.
-
getProxy
Gets the proxy that has been selected for this repository.- Returns:
- The selected proxy or
nullif none.
-
getAuthentication
Gets the authentication that has been selected for this repository.- Returns:
- The selected authentication or
nullif none.
-
getMirroredRepositories
Gets the repositories that this repository serves as a mirror for.- Returns:
- The (read-only) repositories being mirrored by this repository, never
null.
-
isRepositoryManager
Indicates whether this repository refers to a repository manager or not.- Returns:
trueif this repository is a repository manager,falseotherwise.
-
isBlocked
Indicates whether this repository is blocked from performing any download requests.- Returns:
trueif this repository is blocked from performing any download requests,falseotherwise.
-
getIntent
Returns the intent this repository is prepared for.- Returns:
- The intent this repository is prepared for.
- Since:
- 2.0.14
-
toString
-
equals
-
hashCode
-
toBareRemoteRepository
Makes "bare" repository out of this instance, usable as keys within one single session, by applying following changes to repository (returns new instance):- sets intent to
RemoteRepository.Intent.BARE - nullifies proxy
- nullifies authentication
- nullifies mirrors
- sets repositoryManager to
false
RepositorySystemand (internal component)org.eclipse.aether.impl.RemoteRepositoryManager.- Since:
- 2.0.14
- sets intent to
-