@Singleton @Named(value="file") public final class FileProvidedChecksumsSource extends Object implements ProvidedChecksumsSource
ProvidedChecksumsSource
implementation that use specified directory as base
directory, where it expects artifacts checksums on standard Maven2 "local" layout. This implementation uses Artifact
(and Metadata) coordinates solely to form path from baseDir (for Metadata file name is
maven-metadata-local.xml.sha1
in case of SHA-1 checksum).Constructor and Description |
---|
FileProvidedChecksumsSource(FileProcessor fileProcessor,
LocalPathComposer localPathComposer) |
Modifier and Type | Method and Description |
---|---|
Map<String,String> |
getProvidedArtifactChecksums(RepositorySystemSession session,
ArtifactDownload transfer,
List<ChecksumAlgorithmFactory> checksumAlgorithmFactories)
May return the provided checksums (for given artifact transfer) from trusted source other than remote
repository, or
null . |
public static final String NAME
@Inject public FileProvidedChecksumsSource(FileProcessor fileProcessor, LocalPathComposer localPathComposer)
public Map<String,String> getProvidedArtifactChecksums(RepositorySystemSession session, ArtifactDownload transfer, List<ChecksumAlgorithmFactory> checksumAlgorithmFactories)
ProvidedChecksumsSource
null
.getProvidedArtifactChecksums
in interface ProvidedChecksumsSource
transfer
- The transfer that is about to be executed.checksumAlgorithmFactories
- The checksum algorithms that are expected.null
.Copyright © 2010–2022 The Apache Software Foundation. All rights reserved.