1 package org.apache.maven.shared.dependency.graph;
2
3 /*
4 * Licensed to the Apache Software Foundation (ASF) under one
5 * or more contributor license agreements. See the NOTICE file
6 * distributed with this work for additional information
7 * regarding copyright ownership. The ASF licenses this file
8 * to you under the Apache License, Version 2.0 (the
9 * "License"); you may not use this file except in compliance
10 * with the License. You may obtain a copy of the License at
11 *
12 * http://www.apache.org/licenses/LICENSE-2.0
13 *
14 * Unless required by applicable law or agreed to in writing,
15 * software distributed under the License is distributed on an
16 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17 * KIND, either express or implied. See the License for the
18 * specific language governing permissions and limitations
19 * under the License.
20 */
21
22 import org.apache.maven.artifact.resolver.filter.ArtifactFilter;
23 import org.apache.maven.project.MavenProject;
24 import org.apache.maven.project.ProjectBuildingRequest;
25
26 import java.util.Collection;
27
28 /**
29 * Maven project dependency graph builder API, neutral against Maven 2 or Maven 3.
30 *
31 * @author Hervé Boutemy
32 * @since 2.0
33 */
34 public interface DependencyGraphBuilder
35 {
36 /**
37 * Build the dependency graph.
38 *
39 * @param buildingRequest the buildingRequest
40 * @param filter artifact filter (can be <code>null</code>)
41 * @return the dependency graph
42 * @throws DependencyGraphBuilderException if some of the dependencies could not be resolved.
43 */
44 DependencyNode buildDependencyGraph( ProjectBuildingRequest buildingRequest, ArtifactFilter filter )
45 throws DependencyGraphBuilderException;
46
47 /**
48 *
49 * @param buildingRequest the buildingRequest
50 * @param filter artifact filter (can be <code>null</code>)
51 * @param reactorProjects ignored
52 * @return the dependency graph
53 * @throws DependencyGraphBuilderException if some of the dependencies could not be resolved.
54 * @deprecated Use {@link #buildDependencyGraph(ProjectBuildingRequest, ArtifactFilter)} instead
55 */
56 @Deprecated
57 default DependencyNode buildDependencyGraph( ProjectBuildingRequest buildingRequest, ArtifactFilter filter,
58 Collection<MavenProject> reactorProjects )
59 throws DependencyGraphBuilderException
60 {
61 return buildDependencyGraph( buildingRequest, filter );
62 }
63 }