Class Downloader
-
- All Implemented Interfaces:
public final class DownloaderThe class to download source code. The signatures of public functions in this class define the library API.
-
-
Constructor Summary
Constructors Constructor Description Downloader(DownloaderConfiguration config)
-
Method Summary
Modifier and Type Method Description final Provenancedownload(Package pkg, File outputDirectory, Boolean dryRun)Download the source code of the package to the outputDirectory. final RepositoryProvenancedownloadFromVcs(Package pkg, File outputDirectory, Boolean recursive, Boolean dryRun)Download the source code of the package to the outputDirectory using its VCS information. final RepositoryProvenancedownloadFromVcs(Package pkg, File outputDirectory, Boolean recursive)Download the source code of the package to the outputDirectory using its VCS information. final RepositoryProvenancedownloadFromVcs(Package pkg, File outputDirectory)Download the source code of the package to the outputDirectory using its VCS information. final ArtifactProvenancedownloadSourceArtifact(RemoteArtifact sourceArtifact, File outputDirectory, Boolean dryRun)Download the sourceArtifact and unpack it to the outputDirectory. -
-
Method Detail
-
download
final Provenance download(Package pkg, File outputDirectory, Boolean dryRun)
Download the source code of the package to the outputDirectory. If dryRun is
true, no actual download happens but the source code is only checked to be available. A Provenance is returned on success or a DownloadException is thrown in case of failure.
-
downloadFromVcs
@JvmOverloads() final RepositoryProvenance downloadFromVcs(Package pkg, File outputDirectory, Boolean recursive, Boolean dryRun)
Download the source code of the package to the outputDirectory using its VCS information. If recursive is
true, any nested repositories (like Git submodules or Mercurial subrepositories) are downloaded, too. If dryRun istrue, no actual download happens but the source code is only checked to be available. A RepositoryProvenance is returned on success or a DownloadException is thrown in case of failure.
-
downloadFromVcs
@JvmOverloads() final RepositoryProvenance downloadFromVcs(Package pkg, File outputDirectory, Boolean recursive)
Download the source code of the package to the outputDirectory using its VCS information. If recursive is
true, any nested repositories (like Git submodules or Mercurial subrepositories) are downloaded, too. If dryRun istrue, no actual download happens but the source code is only checked to be available. A RepositoryProvenance is returned on success or a DownloadException is thrown in case of failure.
-
downloadFromVcs
@JvmOverloads() final RepositoryProvenance downloadFromVcs(Package pkg, File outputDirectory)
Download the source code of the package to the outputDirectory using its VCS information. If recursive is
true, any nested repositories (like Git submodules or Mercurial subrepositories) are downloaded, too. If dryRun istrue, no actual download happens but the source code is only checked to be available. A RepositoryProvenance is returned on success or a DownloadException is thrown in case of failure.
-
downloadSourceArtifact
final ArtifactProvenance downloadSourceArtifact(RemoteArtifact sourceArtifact, File outputDirectory, Boolean dryRun)
Download the sourceArtifact and unpack it to the outputDirectory. If dryRun is
true, no actual download happens but the source code is only checked to be available. An ArtifactProvenance is returned on success or a DownloadException is thrown in case of failure.
-
-
-
-