Package org.openrewrite.maven.utilities
Class MavenArtifactDownloader
java.lang.Object
org.openrewrite.maven.utilities.MavenArtifactDownloader
-
Constructor Summary
ConstructorsConstructorDescriptionMavenArtifactDownloader(MavenArtifactCache mavenArtifactCache, @Nullable MavenSettings settings, Consumer<Throwable> onError) MavenArtifactDownloader(MavenArtifactCache mavenArtifactCache, @Nullable MavenSettings settings, org.openrewrite.ipc.http.HttpSender httpSender, Consumer<Throwable> onError) -
Method Summary
Modifier and TypeMethodDescription@Nullable PathdownloadArtifact(ResolvedDependency dependency) Fetch the jar file indicated by the dependency.
-
Constructor Details
-
MavenArtifactDownloader
public MavenArtifactDownloader(MavenArtifactCache mavenArtifactCache, @Nullable MavenSettings settings, Consumer<Throwable> onError) -
MavenArtifactDownloader
public MavenArtifactDownloader(MavenArtifactCache mavenArtifactCache, @Nullable MavenSettings settings, org.openrewrite.ipc.http.HttpSender httpSender, Consumer<Throwable> onError)
-
-
Method Details
-
downloadArtifact
Fetch the jar file indicated by the dependency.- Parameters:
dependency- The dependency to download.- Returns:
- The path on disk of the downloaded artifact or
nullif unable to download.
-