Class RepositoryIdHelper
java.lang.Object
org.eclipse.aether.util.repository.RepositoryIdHelper
Helper class for
ArtifactRepository.getId() handling. This class provides helper methods
to get id of repository as it was originally envisioned: as path safe, unique, etc. While POMs are validated by Maven,
there are POMs out there that somehow define repositories with unsafe characters in their id. The problem affects mostly
RemoteRepository instances, as all other implementations have fixed ids that are path safe.
Important: multiple of these provided methods are not trivial processing-wise, and some sort of caching is warmly recommended.
- Since:
- 2.0.11
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumSupportedrepositoryKeytypes. -
Method Summary
Modifier and TypeMethodDescriptionstatic RepositoryKeyFunctiongetRepositoryKeyFunction(String keyTypeString) Selector method forRepositoryKeyFunctionbased on string representation ofRepositoryIdHelper.RepositoryKeyTypeenum.static StringsimpleRepositoryKey(RemoteRepository repository, String context) SimplerepositoryKeyfunction (classic).
-
Method Details
-
getRepositoryKeyFunction
Selector method forRepositoryKeyFunctionbased on string representation ofRepositoryIdHelper.RepositoryKeyTypeenum. -
simpleRepositoryKey
SimplerepositoryKeyfunction (classic). ReturnsRemoteRepository.getId(), unlessRemoteRepository.isRepositoryManager()returnstrue, in which case this method creates unique identifier based on ID and current configuration of the remote repository and context.This was the default
repositoryKeymethod in Maven 3. Is exposed (others key methods are private) as it is directly used by "simple" LRM.- Since:
- 2.0.14
-