View Javadoc
1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one
3    * or more contributor license agreements.  See the NOTICE file
4    * distributed with this work for additional information
5    * regarding copyright ownership.  The ASF licenses this file
6    * to you under the Apache License, Version 2.0 (the
7    * "License"); you may not use this file except in compliance
8    * with the License.  You may obtain a copy of the License at
9    *
10   *   http://www.apache.org/licenses/LICENSE-2.0
11   *
12   * Unless required by applicable law or agreed to in writing,
13   * software distributed under the License is distributed on an
14   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   * KIND, either express or implied.  See the License for the
16   * specific language governing permissions and limitations
17   * under the License.
18   */
19  package org.apache.maven.project;
20  
21  import java.util.List;
22  
23  import org.eclipse.aether.graph.Dependency;
24  import org.eclipse.aether.graph.DependencyNode;
25  
26  /**
27   * The result of a project dependency resolution.
28   *
29   * @deprecated use {@code org.apache.maven.api.services.ProjectBuilder} instead
30   */
31  @Deprecated(since = "4.0.0")
32  public interface DependencyResolutionResult {
33  
34      /**
35       * Gets the dependency graph of the project.
36       *
37       * @return The dependency graph or {@code null} if not available.
38       */
39      DependencyNode getDependencyGraph();
40  
41      /**
42       * Gets the transitive dependencies of the project that were not excluded by
43       * {@link DependencyResolutionRequest#getResolutionFilter()}. This list is a union of the results from
44       * {@link #getResolvedDependencies()} and {@link #getUnresolvedDependencies()}.
45       *
46       * @return The transitive dependencies, never {@code null}.
47       */
48      List<Dependency> getDependencies();
49  
50      /**
51       * Gets the dependencies that were successfully resolved.
52       *
53       * @return The resolved dependencies, never {@code null}.
54       */
55      List<Dependency> getResolvedDependencies();
56  
57      /**
58       * Gets the dependencies that could not be resolved.
59       *
60       * @return The unresolved dependencies, never {@code null}.
61       */
62      List<Dependency> getUnresolvedDependencies();
63  
64      /**
65       * Gets the errors that occurred while building the dependency graph.
66       *
67       * @return The errors that occurred while building the dependency graph, never {@code null}.
68       */
69      List<Exception> getCollectionErrors();
70  
71      /**
72       * Gets the errors that occurred while resolving the specified dependency.
73       *
74       * @param dependency The dependency for which to retrieve the errors, must not be {@code null}.
75       * @return The resolution errors for the specified dependency, never {@code null}.
76       */
77      List<Exception> getResolutionErrors(Dependency dependency);
78  }