org.apache.maven
Interface ProjectDependenciesResolver

All Known Implementing Classes:
DefaultProjectDependenciesResolver

public interface ProjectDependenciesResolver

Common interface for plugins and other third-party components running inside a Maven runtime to resolve the transitive dependency closure for various MavenProject instances.

Author:
jdcasey

Method Summary
 java.util.Set<org.apache.maven.artifact.Artifact> resolve(java.util.Collection<? extends org.apache.maven.project.MavenProject> projects, java.util.Collection<java.lang.String> scopes, org.apache.maven.execution.MavenSession session)
          Resolve the dependencies for a collection of MavenProject instances, using a common set of remote repositories and a common set of scopes.
 java.util.Set<org.apache.maven.artifact.Artifact> resolve(org.apache.maven.project.MavenProject project, java.util.Collection<java.lang.String> scopes, org.apache.maven.execution.MavenSession session)
          Resolve the dependencies for a single MavenProject instance, using the supplied set of remote repositories and scopes.
 

Method Detail

resolve

java.util.Set<org.apache.maven.artifact.Artifact> resolve(java.util.Collection<? extends org.apache.maven.project.MavenProject> projects,
                                                          java.util.Collection<java.lang.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 of MavenProject instances, using a common set of remote repositories and a common set of scopes.

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 case Artifact instances cannot be created from project Dependency 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

java.util.Set<org.apache.maven.artifact.Artifact> resolve(org.apache.maven.project.MavenProject project,
                                                          java.util.Collection<java.lang.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 single MavenProject instance, using the supplied set of remote repositories and scopes.

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 case Artifact instances cannot be created from the project Dependency 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.


Copyright © 2002-2011 Apache Software Foundation. All Rights Reserved.