Package org.apache.maven.api.services
Class DependencyCollectorRequest.DependencyCollectorRequestBuilder
java.lang.Object
org.apache.maven.api.services.DependencyCollectorRequest.DependencyCollectorRequestBuilder
- Enclosing interface:
DependencyCollectorRequest
@NotThreadSafe
public static class DependencyCollectorRequest.DependencyCollectorRequestBuilder
extends Object
-
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.root
(DependencyCoordinate root) rootArtifact
(Artifact rootArtifact) Sets the root artifact for the dependency graph.verbose
(boolean verbose) Specifies that the collection should be verbose.
-
Method Details
-
session
@Nonnull public DependencyCollectorRequest.DependencyCollectorRequestBuilder session(@Nonnull Session session) -
rootArtifact
@Nonnull public DependencyCollectorRequest.DependencyCollectorRequestBuilder rootArtifact(@Nullable Artifact rootArtifact) Sets the root artifact for the dependency graph. This must not be confused withroot(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 ifroot(DependencyCoordinate)
has been set.- Parameters:
rootArtifact
- the root artifact for the dependency graph, may benull
- Returns:
- this request for chaining, never
null
-
root
@Nonnull public DependencyCollectorRequest.DependencyCollectorRequestBuilder root(@Nonnull DependencyCoordinate root) - Parameters:
root
- The root dependency- Returns:
- this request for chaining, never
null
-
dependencies
@Nonnull public DependencyCollectorRequest.DependencyCollectorRequestBuilder dependencies(@Nullable List<DependencyCoordinate> dependencies) 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.- Parameters:
dependencies
- the direct dependencies, may benull
- Returns:
- this request for chaining, never
null
-
dependency
@Nonnull public DependencyCollectorRequest.DependencyCollectorRequestBuilder dependency(@Nullable DependencyCoordinate dependency) Adds the specified direct dependency.- Parameters:
dependency
- the dependency to add, may benull
- Returns:
- this request for chaining, never
null
-
managedDependencies
@Nonnull public DependencyCollectorRequest.DependencyCollectorRequestBuilder managedDependencies(@Nullable List<DependencyCoordinate> managedDependencies) Sets the dependency management to apply to transitive dependencies. To clarify, this management does not apply to the direct dependencies of the root node.- Parameters:
managedDependencies
- the dependency management, may benull
- Returns:
- this request for chaining, never
null
-
managedDependency
@Nonnull public DependencyCollectorRequest.DependencyCollectorRequestBuilder managedDependency(@Nullable DependencyCoordinate managedDependency) Adds the specified managed dependency.- 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
@Nonnull public DependencyCollectorRequest.DependencyCollectorRequestBuilder verbose(boolean verbose) Specifies that the collection should be verbose.- Parameters:
verbose
- whether the collection should be verbose or not- Returns:
- this request for chaining, never
null
-
build
-