Package org.eclipse.aether.collection
Class CollectRequest
java.lang.Object
org.eclipse.aether.collection.CollectRequest
A request to collect the transitive dependencies and to build a dependency graph from them. There are three ways to
 create a dependency graph. First, only the root dependency can be given. Second, a root dependency and direct
 dependencies can be specified in which case the specified direct dependencies are merged with the direct dependencies
 retrieved from the artifact descriptor of the root dependency. And last, only direct dependencies can be specified in
 which case the root node of the resulting graph has no associated dependency.
- See Also:
- 
Constructor SummaryConstructorsConstructorDescriptionCreates an uninitialized request.CollectRequest(List<Dependency> dependencies, List<Dependency> managedDependencies, List<RemoteRepository> repositories) Creates a new request with the specified properties.CollectRequest(Dependency root, List<Dependency> dependencies, List<RemoteRepository> repositories) Creates a new request with the specified properties.CollectRequest(Dependency root, List<RemoteRepository> repositories) Creates a request with the specified properties.
- 
Method SummaryModifier and TypeMethodDescriptionaddDependency(Dependency dependency) Adds the specified direct dependency.addManagedDependency(Dependency managedDependency) Adds the specified managed dependency.addRepository(RemoteRepository repository) Adds the specified repository for collection.Gets the direct dependencies.Gets the dependency management to apply to transitive dependencies.Gets the repositories to use for the collection.Gets the context in which this request is made.getRoot()Gets the root dependency of the graph.Gets the root artifact for the dependency graph.getTrace()Gets the trace information that describes the higher level request/operation in which this request is issued.setDependencies(List<Dependency> dependencies) Sets the direct dependencies.setManagedDependencies(List<Dependency> managedDependencies) Sets the dependency management to apply to transitive dependencies.setRepositories(List<RemoteRepository> repositories) Sets the repositories to use for the collection.setRequestContext(String context) Sets the context in which this request is made.setRoot(Dependency root) Sets the root dependency of the graph.setRootArtifact(Artifact rootArtifact) Sets the root artifact for the dependency graph.setTrace(RequestTrace trace) Sets the trace information that describes the higher level request/operation in which this request is issued.toString()
- 
Constructor Details- 
CollectRequestpublic CollectRequest()Creates an uninitialized request.
- 
CollectRequestCreates a request with the specified properties.- Parameters:
- root- The root dependency whose transitive dependencies should be collected, may be- null.
- repositories- The repositories to use for the collection, may be- null.
 
- 
CollectRequestpublic CollectRequest(Dependency root, List<Dependency> dependencies, List<RemoteRepository> repositories) Creates a new request with the specified properties.- Parameters:
- root- The root dependency whose transitive dependencies should be collected, may be- null.
- dependencies- The direct dependencies to merge with the direct dependencies from the root dependency's artifact descriptor.
- repositories- The repositories to use for the collection, may be- null.
 
- 
CollectRequestpublic CollectRequest(List<Dependency> dependencies, List<Dependency> managedDependencies, List<RemoteRepository> repositories) Creates a new request with the specified properties.- Parameters:
- dependencies- The direct dependencies of some imaginary root, may be- null.
- managedDependencies- The dependency management information to apply to the transitive dependencies, may be- null.
- repositories- The repositories to use for the collection, may be- null.
 
 
- 
- 
Method Details- 
getRootArtifactGets the root artifact for the dependency graph.- Returns:
- The root artifact for the dependency graph or nullif none.
 
- 
setRootArtifactSets the root artifact for the dependency graph. This must not be confused withsetRoot(Dependency): 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 ifgetRoot()does not returnnull.- Parameters:
- rootArtifact- The root artifact for the dependency graph, may be- null.
- Returns:
- This request for chaining, never null.
 
- 
getRootGets the root dependency of the graph.- Returns:
- The root dependency of the graph or nullif none.
 
- 
setRootSets the root dependency of the graph.- Parameters:
- root- The root dependency of the graph, may be- null.
- Returns:
- This request for chaining, never null.
 
- 
getDependenciesGets the direct dependencies.- Returns:
- The direct dependencies, never null.
 
- 
setDependenciesSets 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 be- null.
- Returns:
- This request for chaining, never null.
 
- 
addDependencyAdds the specified direct dependency.- Parameters:
- dependency- The dependency to add, may be- null.
- Returns:
- This request for chaining, never null.
 
- 
getManagedDependenciesGets the dependency management to apply to transitive dependencies.- Returns:
- The dependency management to apply to transitive dependencies, never null.
 
- 
setManagedDependenciesSets 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 be- null.
- Returns:
- This request for chaining, never null.
 
- 
addManagedDependencyAdds the specified managed dependency.- Parameters:
- managedDependency- The managed dependency to add, may be- null.
- Returns:
- This request for chaining, never null.
 
- 
getRepositoriesGets the repositories to use for the collection.- Returns:
- The repositories to use for the collection, never null.
 
- 
setRepositoriesSets the repositories to use for the collection.- Parameters:
- repositories- The repositories to use for the collection, may be- null.
- Returns:
- This request for chaining, never null.
 
- 
addRepositoryAdds the specified repository for collection.- Parameters:
- repository- The repository to collect dependency information from, may be- null.
- Returns:
- This request for chaining, never null.
 
- 
getRequestContextGets the context in which this request is made.- Returns:
- The context, never null.
 
- 
setRequestContextSets the context in which this request is made.- Parameters:
- context- The context, may be- null.
- Returns:
- This request for chaining, never null.
 
- 
getTraceGets the trace information that describes the higher level request/operation in which this request is issued.- Returns:
- The trace information about the higher level operation or nullif none.
 
- 
setTraceSets the trace information that describes the higher level request/operation in which this request is issued.- Parameters:
- trace- The trace information about the higher level operation, may be- null.
- Returns:
- This request for chaining, never null.
 
- 
toString
 
-