@groovy.transform.CompileStatic @groovy.util.logging.Slf4j class ArtifactDownloader extends Object
Performs low-level downloading work.
| Constructor and description |
|---|
ArtifactDownloader
(URI downloadURI, File downloadRoot, ConfigCacheSafeOperations po, String basePath, ArtifactRootVerification verifyArtifactRoot, ArtifactUnpacker unpacker, CheckSumVerification verifyDownloadChecksum)Creates an instance which takes care of the actual downloading and caching. |
ArtifactDownloader
(URI downloadURI, File downloadRoot, ConfigCacheSafeOperations po, String basePath, ArtifactRequiresDownload requiresDownload, CheckSumVerification verifyDownloadChecksum)Downloads an artifact without unpacking it. |
| Type Params | Return Type | Name and description |
|---|---|---|
|
File |
getFromCache(String description, boolean offlineMode, Downloader downloadInstance)Creates a distribution/file it it does not exist already. |
Creates an instance which takes care of the actual downloading and caching.
downloadURI - URI to download package from.downloadRoot - Base directory where to download to.po - ConfigCacheSafeOperations instance to usebasePath - Relative path to the downloadRoot.verifyArtifactRoot - Callback to verify the unpacked artifact. Never null.verifyDownloadChecksum - Callback to verify the checksum of the downloaded target.
Can be null.Downloads an artifact without unpacking it.
downloadURI - URI to download package from.downloadRoot - Base directory where to download to.po - ConfigCacheSafeOperations instance to usebasePath - Relative path to the downloadRoot.requiresDownload - Indicates whether download is required.verifyDownloadChecksum - Callback to verify the checksum of the downloaded target.
Can be null.Creates a distribution/file it it does not exist already.
description - Name of the downloaded entity.offlineMode - Whether to operate in download mode.downloadInstance - Download & logger instances to use