Package org.apache.maven.api.services
Class DependencyResolverRequest.DependencyResolverRequestBuilder
java.lang.Object
org.apache.maven.api.services.DependencyCollectorRequest.DependencyCollectorRequestBuilder
org.apache.maven.api.services.DependencyResolverRequest.DependencyResolverRequestBuilder
- Enclosing interface:
- DependencyResolverRequest
@NotThreadSafe
public static class DependencyResolverRequest.DependencyResolverRequestBuilder
extends DependencyCollectorRequest.DependencyCollectorRequestBuilder
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
dependencies
(List<DependencyCoordinate> dependencies) Sets the direct dependencies.dependency
(DependencyCoordinate dependency) Adds the specified direct dependency.managedDependencies
(List<DependencyCoordinate> managedDependencies) Sets the dependency management to apply to transitive dependencies.managedDependency
(DependencyCoordinate managedDependency) Adds the specified managed dependency.resolutionScope
(ResolutionScope resolutionScope) root
(DependencyCoordinate root) rootArtifact
(Artifact rootArtifact) Sets the root artifact for the dependency graph.verbose
(boolean verbose) Specifies that the collection should be verbose.
-
Constructor Details
-
DependencyResolverRequestBuilder
public DependencyResolverRequestBuilder()
-
-
Method Details
-
session
@Nonnull public DependencyResolverRequest.DependencyResolverRequestBuilder session(@Nonnull Session session) - Overrides:
session
in classDependencyCollectorRequest.DependencyCollectorRequestBuilder
-
project
@Nonnull public DependencyResolverRequest.DependencyResolverRequestBuilder project(@Nullable Project project) - Overrides:
project
in classDependencyCollectorRequest.DependencyCollectorRequestBuilder
-
rootArtifact
@Nonnull public DependencyResolverRequest.DependencyResolverRequestBuilder rootArtifact(@Nullable Artifact rootArtifact) Description copied from class:DependencyCollectorRequest.DependencyCollectorRequestBuilder
Sets the root artifact for the dependency graph. This must not be confused withDependencyCollectorRequest.DependencyCollectorRequestBuilder.root(DependencyCoordinate)
: The root dependency, like any other specified dependency, will be subject to dependency collection/resolution, i.e. should have an artifact descriptor and a corresponding artifact file. The root artifact on the other hand is only used as a label for the root node of the graph in case no root dependency was specified. As such, the configured root artifact is ignored ifDependencyCollectorRequest.DependencyCollectorRequestBuilder.root(DependencyCoordinate)
has been set.- Overrides:
rootArtifact
in classDependencyCollectorRequest.DependencyCollectorRequestBuilder
- Parameters:
rootArtifact
- the root artifact for the dependency graph, may benull
- Returns:
- this request for chaining, never
null
-
root
@Nonnull public DependencyResolverRequest.DependencyResolverRequestBuilder root(@Nullable DependencyCoordinate root) - Overrides:
root
in classDependencyCollectorRequest.DependencyCollectorRequestBuilder
- Parameters:
root
- The root dependency- Returns:
- this request for chaining, never
null
-
dependencies
@Nonnull public DependencyResolverRequest.DependencyResolverRequestBuilder dependencies(@Nullable List<DependencyCoordinate> dependencies) Description copied from class:DependencyCollectorRequest.DependencyCollectorRequestBuilder
Sets the direct dependencies. If both a root dependency and direct dependencies are given in the request, the direct dependencies from the request will be merged with the direct dependencies from the root dependency's artifact descriptor, giving higher priority to the dependencies from the request.- Overrides:
dependencies
in classDependencyCollectorRequest.DependencyCollectorRequestBuilder
- Parameters:
dependencies
- the direct dependencies, may benull
- Returns:
- this request for chaining, never
null
-
dependency
@Nonnull public DependencyResolverRequest.DependencyResolverRequestBuilder dependency(@Nullable DependencyCoordinate dependency) Description copied from class:DependencyCollectorRequest.DependencyCollectorRequestBuilder
Adds the specified direct dependency.- Overrides:
dependency
in classDependencyCollectorRequest.DependencyCollectorRequestBuilder
- Parameters:
dependency
- the dependency to add, may benull
- Returns:
- this request for chaining, never
null
-
managedDependencies
@Nonnull public DependencyResolverRequest.DependencyResolverRequestBuilder managedDependencies(@Nullable List<DependencyCoordinate> managedDependencies) Description copied from class:DependencyCollectorRequest.DependencyCollectorRequestBuilder
Sets the dependency management to apply to transitive dependencies. To clarify, this management does not apply to the direct dependencies of the root node.- Overrides:
managedDependencies
in classDependencyCollectorRequest.DependencyCollectorRequestBuilder
- Parameters:
managedDependencies
- the dependency management, may benull
- Returns:
- this request for chaining, never
null
-
managedDependency
@Nonnull public DependencyResolverRequest.DependencyResolverRequestBuilder managedDependency(@Nullable DependencyCoordinate managedDependency) Description copied from class:DependencyCollectorRequest.DependencyCollectorRequestBuilder
Adds the specified managed dependency.- Overrides:
managedDependency
in classDependencyCollectorRequest.DependencyCollectorRequestBuilder
- Parameters:
managedDependency
- The managed dependency to add, may benull
in which case the call will have no effect.- Returns:
- this request for chaining, never
null
-
verbose
Description copied from class:DependencyCollectorRequest.DependencyCollectorRequestBuilder
Specifies that the collection should be verbose.- Overrides:
verbose
in classDependencyCollectorRequest.DependencyCollectorRequestBuilder
- Parameters:
verbose
- whether the collection should be verbose or not- Returns:
- this request for chaining, never
null
-
resolutionScope
@Nonnull public DependencyResolverRequest.DependencyResolverRequestBuilder resolutionScope(@Nonnull ResolutionScope resolutionScope) -
build
- Overrides:
build
in classDependencyCollectorRequest.DependencyCollectorRequestBuilder
-