Class RepositoryIdHelper
- java.lang.Object
-
- org.eclipse.aether.util.repository.RepositoryIdHelper
-
public final class RepositoryIdHelper extends java.lang.Object
Helper class forArtifactRepository.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 mostlyRemoteRepositoryinstances, 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:
PathUtils
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRepositoryIdHelper.RepositoryKeyTypeSupportedrepositoryKeytypes.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.eclipse.aether.repository.RepositoryKeyFunctiongetRepositoryKeyFunction(java.lang.String keyTypeString)Selector method forRepositoryKeyFunctionbased on string representation ofRepositoryIdHelper.RepositoryKeyTypeenum.static java.lang.StringsimpleRepositoryKey(org.eclipse.aether.repository.RemoteRepository repository, java.lang.String context)SimplerepositoryKeyfunction (classic).
-
-
-
Method Detail
-
getRepositoryKeyFunction
public static org.eclipse.aether.repository.RepositoryKeyFunction getRepositoryKeyFunction(java.lang.String keyTypeString)
Selector method forRepositoryKeyFunctionbased on string representation ofRepositoryIdHelper.RepositoryKeyTypeenum.
-
simpleRepositoryKey
public static java.lang.String simpleRepositoryKey(org.eclipse.aether.repository.RemoteRepository repository, java.lang.String context)
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
-
-