Package org.stianloader.picoresolve

# Class MavenResolver

java.lang.Object
org.stianloader.picoresolve.MavenResolver

public class MavenResolver extends Object

## Field Summary

Fields
Modifier and Type
Field
Description
`boolean`
`ignoreOptionalDependencies`
Whether to pretend that dependencies marked as "optional" do not exist.
`boolean`
`ignoreTestDependencies`
Whether to pretend that dependencies with the "test" scope did not exist.

## Constructor Summary

Constructors
Constructor
Description
`MavenResolver(@NotNull Path mavenLocal)`
`MavenResolver(@NotNull Path mavenLocal, @Nullable Collection<@NotNull MavenRepository> repos)`
`MavenResolver(@NotNull RepositoryNegotiatior negotiator)`

## Method Summary

Modifier and Type
Method
Description
`MavenResolver`
`addRepositories(@NotNull Collection<@NotNull MavenRepository> repos)`
`MavenResolver`
`addRepositories(@NotNull MavenRepository @NotNull ... repos)`
`MavenResolver`
`addRepository(@NotNull MavenRepository repo)`
`CompletableFuture<Map.Entry<@NotNull GAV,RepositoryAttachedValue<Path>>>`
`download(@NotNull String group, @NotNull String artifact, @NotNull VersionRange versionRange, @Nullable String classifier, @NotNull String extension, @NotNull Executor executor)`
`CompletableFuture<RepositoryAttachedValue<Path>>`
`download(@NotNull GAV gav, @Nullable String classifier, @NotNull String extension, @NotNull Executor executor)`
`CompletableFuture<Void>`
`resolveAllChildren(@NotNull DependencyLayer current, @NotNull Executor executor)`
`CompletableFuture<DependencyLayer>`
`resolveChildLayer(@NotNull DependencyLayer current, @NotNull Executor executor)`
`void`
`setLogger(@NotNull LoggingAdapter logger)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### ignoreTestDependencies

public boolean ignoreTestDependencies
Whether to pretend that dependencies with the "test" scope did not exist. This may significantly improve lookup speeds, while in most cases not having any significant drawbacks due to the fact that usually you'd not want to resolve the artifacts a dependency uses to test itself.

### ignoreOptionalDependencies

public boolean ignoreOptionalDependencies
Whether to pretend that dependencies marked as "optional" do not exist. This may significantly improve lookup speeds, while in most cases mirroring standard maven behaviour and being without drawbacks. However it may have drawbacks when it comes to version negotiation.

## Constructor Details

### MavenResolver

public MavenResolver(@NotNull @NotNull Path mavenLocal)

### MavenResolver

public MavenResolver(@NotNull @NotNull Path mavenLocal, @Nullable @Nullable Collection<@NotNull MavenRepository> repos)

### MavenResolver

public MavenResolver(@NotNull @NotNull RepositoryNegotiatior negotiator)

## Method Details

### addRepositories

public MavenResolver addRepositories(@NotNull @NotNull Collection<@NotNull MavenRepository> repos)

### addRepository

public MavenResolver addRepository(@NotNull @NotNull MavenRepository repo)

### addRepositories

public MavenResolver addRepositories(@NotNull @NotNull MavenRepository @NotNull ... repos)

### download

public CompletableFuture<RepositoryAttachedValue<Path>> download(@NotNull @NotNull GAV gav, @Nullable @Nullable String classifier, @NotNull @NotNull String extension, @NotNull @NotNull Executor executor)

### resolveAllChildren

public CompletableFuture<Void> resolveAllChildren(@NotNull @NotNull DependencyLayer current, @NotNull @NotNull Executor executor)

### resolveChildLayer

public CompletableFuture<DependencyLayer> resolveChildLayer(@NotNull @NotNull DependencyLayer current, @NotNull @NotNull Executor executor)

### download

public CompletableFuture<Map.Entry<@NotNull GAV,RepositoryAttachedValue<Path>>> download(@NotNull @NotNull String group, @NotNull @NotNull String artifact, @NotNull @NotNull VersionRange versionRange, @Nullable @Nullable String classifier, @NotNull @NotNull String extension, @NotNull @NotNull Executor executor)

### setLogger

public void setLogger(@NotNull @NotNull LoggingAdapter logger)