Class DefaultProjectDependenciesResolver
- java.lang.Object
-
- org.apache.maven.shared.artifact.resolver.DefaultProjectDependenciesResolver
-
- All Implemented Interfaces:
ProjectDependenciesResolver
public final class DefaultProjectDependenciesResolver extends Object implements ProjectDependenciesResolver
Default implementation ofProjectDependenciesResolver
. Warning: This is an internal utility class that is only public for technical reasons, it is not part of the public API. In particular, this class can be changed or deleted without prior notice.- Author:
- jdcasey
- See Also:
ProjectDependenciesResolver
-
-
Constructor Summary
Constructors Constructor Description DefaultProjectDependenciesResolver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<org.apache.maven.artifact.Artifact>
resolve(Collection<? extends org.apache.maven.project.MavenProject> projects, Collection<String> scopes, org.apache.maven.execution.MavenSession session)
Resolve the dependencies for a collection ofMavenProject
instances, using a common set of remote repositories and a common set of scopes.Set<org.apache.maven.artifact.Artifact>
resolve(org.apache.maven.project.MavenProject project, Collection<String> scopes, org.apache.maven.execution.MavenSession session)
Resolve the dependencies for a singleMavenProject
instance, using the supplied set of remote repositories and scopes.
-
-
-
Method Detail
-
resolve
public Set<org.apache.maven.artifact.Artifact> resolve(Collection<? extends org.apache.maven.project.MavenProject> projects, Collection<String> scopes, org.apache.maven.execution.MavenSession session) throws org.apache.maven.artifact.resolver.ArtifactResolutionException, org.apache.maven.artifact.resolver.ArtifactNotFoundException
Resolve the dependencies for a collection ofMavenProject
instances, using a common set of remote repositories and a common set of scopes.- Specified by:
resolve
in interfaceProjectDependenciesResolver
- Parameters:
projects
- The projects whose dependencies should be resolved.scopes
- The list of scopes to resolve. These scopes may imply other scopes.session
- Contains the local repository, along with other settings related to artifact resolution.- Returns:
- The set of resolved artifacts. If the projects contain no dependencies, this will return an empty set.
- Throws:
org.apache.maven.artifact.resolver.ArtifactResolutionException
- In caseArtifact
instances cannot be created from projectDependency
instances, or artifact resolution fails.org.apache.maven.artifact.resolver.ArtifactNotFoundException
- In cases where one or more dependency artifacts cannot be found in the various repositories.
-
resolve
public Set<org.apache.maven.artifact.Artifact> resolve(org.apache.maven.project.MavenProject project, Collection<String> scopes, org.apache.maven.execution.MavenSession session) throws org.apache.maven.artifact.resolver.ArtifactResolutionException, org.apache.maven.artifact.resolver.ArtifactNotFoundException
Resolve the dependencies for a singleMavenProject
instance, using the supplied set of remote repositories and scopes.- Specified by:
resolve
in interfaceProjectDependenciesResolver
- Parameters:
project
- The project whose dependencies should be resolved.scopes
- The list of scopes to resolve. These scopes may imply other scopes.session
- Contains the local repository, along with other settings related to artifact resolution.- Returns:
- The set of resolved artifacts. If the project contains no dependencies, this will return an empty set.
- Throws:
org.apache.maven.artifact.resolver.ArtifactResolutionException
- In caseArtifact
instances cannot be created from the projectDependency
instance, or artifact resolution fails.org.apache.maven.artifact.resolver.ArtifactNotFoundException
- In cases where one or more dependency artifacts cannot be found in the various repositories.
-
-