Class MavenArtifactFetcher

java.lang.Object
org.robolectric.internal.dependency.MavenArtifactFetcher

public class MavenArtifactFetcher extends Object
Class responsible for fetching artifacts from Maven. This uses a thread pool of size two in order to parallelize downloads.

An artifact is downloaded from the first of the repositories that has all of its files, and its checksums are validated as usual, so a repository that fails, for example with a 429 response, is skipped.

  • Constructor Details

  • Method Details

    • fetchArtifact

      public void fetchArtifact(MavenJarArtifact artifact)
    • createFetchToFileTask

      protected com.google.common.util.concurrent.ListenableFuture<Void> createFetchToFileTask(URL remoteUrl, File tempFile)