Package org.eclipse.aether.internal.impl
Class Maven2RepositoryLayoutFactory
java.lang.Object
org.eclipse.aether.internal.impl.Maven2RepositoryLayoutFactory
- All Implemented Interfaces:
RepositoryLayoutFactory
@Singleton
@Named("maven2")
public final class Maven2RepositoryLayoutFactory
extends Object
implements RepositoryLayoutFactory
Provides a Maven-2 repository layout for repositories with content type
"default"
.-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Comma-separated list of checksum algorithms with which checksums are validated (downloaded) and generated (uploaded) with this layout.static final String
Comma-separated list of extensions with leading dot (example ".asc") that should have checksums omitted.static final String
static final String
static final String
-
Constructor Summary
ConstructorDescriptionMaven2RepositoryLayoutFactory
(ChecksumAlgorithmFactorySelector checksumAlgorithmFactorySelector) -
Method Summary
Modifier and TypeMethodDescriptionfloat
The priority of this factory.newInstance
(RepositorySystemSession session, RemoteRepository repository) Tries to create a repository layout for the specified remote repository.setPriority
(float priority) Sets the priority of this component.
-
Field Details
-
NAME
- See Also:
-
CONFIG_PROP_CHECKSUMS_ALGORITHMS
Comma-separated list of checksum algorithms with which checksums are validated (downloaded) and generated (uploaded) with this layout. Resolver by default supports following algorithms: MD5, SHA-1, SHA-256 and SHA-512. New algorithms can be added by implementing ChecksumAlgorithmFactory component.- Since:
- 1.8.0
- See Also:
- Sourced from:
RepositorySystemSession.getConfigProperties()
- Value type:
String
- Default value:
DEFAULT_CHECKSUMS_ALGORITHMS
-
DEFAULT_CHECKSUMS_ALGORITHMS
- See Also:
-
CONFIG_PROP_OMIT_CHECKSUMS_FOR_EXTENSIONS
Comma-separated list of extensions with leading dot (example ".asc") that should have checksums omitted. These are applied to sub-artifacts only. Note: to achieve 1.7.x aether.checksums.forSignature=true behaviour, pass empty string as value for this property.- Since:
- 1.8.0
- See Also:
- Sourced from:
RepositorySystemSession.getConfigProperties()
- Value type:
String
- Default value:
DEFAULT_OMIT_CHECKSUMS_FOR_EXTENSIONS
-
DEFAULT_OMIT_CHECKSUMS_FOR_EXTENSIONS
- See Also:
-
-
Constructor Details
-
Maven2RepositoryLayoutFactory
@Inject public Maven2RepositoryLayoutFactory(ChecksumAlgorithmFactorySelector checksumAlgorithmFactorySelector)
-
-
Method Details
-
getPriority
Description copied from interface:RepositoryLayoutFactory
The priority of this factory. When multiple factories can handle a given repository, factories with higher priority are preferred over those with lower priority.- Specified by:
getPriority
in interfaceRepositoryLayoutFactory
- Returns:
- The priority of this factory.
-
setPriority
Sets the priority of this component.- Parameters:
priority
- The priority.- Returns:
- This component for chaining, never
null
.
-
newInstance
public RepositoryLayout newInstance(RepositorySystemSession session, RemoteRepository repository) throws NoRepositoryLayoutException Description copied from interface:RepositoryLayoutFactory
Tries to create a repository layout for the specified remote repository. Typically, a factory will inspectRemoteRepository.getContentType()
to determine whether it can handle a repository.- Specified by:
newInstance
in interfaceRepositoryLayoutFactory
- Parameters:
session
- The repository system session from which to configure the layout, must not benull
.repository
- The remote repository to create a layout for, must not benull
.- Returns:
- The layout for the given repository, never
null
. - Throws:
NoRepositoryLayoutException
- If the factory cannot create a repository layout for the specified remote repository.
-