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 org.eclipse.aether.RepositorySystemSession;
22  import org.eclipse.aether.graph.DependencyFilter;
23  
24  /**
25   * A request to resolve the dependencies of a project.
26   *
27   * @deprecated use {@code org.apache.maven.api.services.ProjectBuilder} instead
28   */
29  @Deprecated(since = "4.0.0")
30  public interface DependencyResolutionRequest {
31  
32      /**
33       * Gets the project to resolve dependencies for.
34       *
35       * @return The project to resolve dependencies for or {@code null} if not set.
36       */
37      MavenProject getMavenProject();
38  
39      /**
40       * Sets the project to resolve dependencies for.
41       *
42       * @param project The project to resolve dependencies for, may be {@code null}.
43       * @return This request for chaining, never {@code null}.
44       */
45      DependencyResolutionRequest setMavenProject(MavenProject project);
46  
47      /**
48       * Gets the filter used to exclude some dependencies from resolution.
49       *
50       * @return The filter to exclude dependencies from resolution or {@code null} to resolve all dependencies.
51       */
52      DependencyFilter getResolutionFilter();
53  
54      /**
55       * Sets the filter used to exclude some dependencies from resolution. Note that this filter only controls the
56       * resolution/download of dependency artifacts, not the inclusion of dependency nodes in the resolved dependency
57       * graph.
58       *
59       * @param filter The filter to exclude dependencies from resolution, may be {@code null} to resolve all
60       *            dependencies.
61       * @return This request for chaining, never {@code null}.
62       */
63      DependencyResolutionRequest setResolutionFilter(DependencyFilter filter);
64  
65      /**
66       * Gets the session to use for repository access.
67       *
68       * @return The repository session or {@code null} if not set.
69       */
70      RepositorySystemSession getRepositorySession();
71  
72      /**
73       * Sets the session to use for repository access.
74       *
75       * @param repositorySession The repository session to use.
76       * @return This request for chaining, never {@code null}.
77       */
78      DependencyResolutionRequest setRepositorySession(RepositorySystemSession repositorySession);
79  }