1 package org.apache.maven.shared.dependency.tree;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 import org.apache.maven.artifact.factory.ArtifactFactory;
23 import org.apache.maven.artifact.metadata.ArtifactMetadataSource;
24 import org.apache.maven.artifact.repository.ArtifactRepository;
25 import org.apache.maven.artifact.resolver.ArtifactCollector;
26 import org.apache.maven.artifact.resolver.filter.ArtifactFilter;
27 import org.apache.maven.project.MavenProject;
28
29 /**
30 * Builds a tree of dependencies for a given Maven project.
31 *
32 * @author <a href="mailto:markhobson@gmail.com">Mark Hobson</a>
33 * @version $Id: DependencyTreeBuilder.java 661727 2008-05-30 14:21:49Z bentmann $
34 */
35 public interface DependencyTreeBuilder
36 {
37
38
39 /**
40 * The plexus role for this component.
41 */
42 String ROLE = DependencyTreeBuilder.class.getName();
43
44
45
46 /**
47 * Builds a tree of dependencies for the specified Maven project.
48 *
49 * @param project
50 * the Maven project
51 * @param repository
52 * the artifact repository to resolve against
53 * @param factory
54 * the artifact factory to use
55 * @param metadataSource
56 * the artifact metadata source to use
57 * @param collector
58 * the artifact collector to use
59 * @return the dependency tree of the specified Maven project
60 * @throws DependencyTreeBuilderException
61 * if the dependency tree cannot be resolved
62 * @deprecated As of 1.1, replaced by
63 * {@link #buildDependencyTree(MavenProject, ArtifactRepository, ArtifactFactory, ArtifactMetadataSource, ArtifactFilter, ArtifactCollector)}
64 */
65 DependencyTree buildDependencyTree( MavenProject project, ArtifactRepository repository, ArtifactFactory factory,
66 ArtifactMetadataSource metadataSource, ArtifactCollector collector )
67 throws DependencyTreeBuilderException;
68
69 /**
70 * Builds a tree of dependencies for the specified Maven project.
71 *
72 * @param project
73 * the Maven project
74 * @param repository
75 * the artifact repository to resolve against
76 * @param factory
77 * the artifact factory to use
78 * @param metadataSource
79 * the artifact metadata source to use
80 * @param filter
81 * the artifact filter to use
82 * @param collector
83 * the artifact collector to use
84 * @return the dependency tree root node of the specified Maven project
85 * @throws DependencyTreeBuilderException
86 * if the dependency tree cannot be resolved
87 * @since 1.1
88 */
89 DependencyNode buildDependencyTree( MavenProject project, ArtifactRepository repository, ArtifactFactory factory,
90 ArtifactMetadataSource metadataSource, ArtifactFilter filter, ArtifactCollector collector )
91 throws DependencyTreeBuilderException;
92 }