1 package org.apache.maven;
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 java.util.Collection;
23 import java.util.Set;
24
25 import org.apache.maven.artifact.Artifact;
26 import org.apache.maven.artifact.resolver.ArtifactNotFoundException;
27 import org.apache.maven.artifact.resolver.ArtifactResolutionException;
28 import org.apache.maven.execution.MavenSession;
29 import org.apache.maven.project.MavenProject;
30
31 @Deprecated
32 /**
33 * @deprecated As of 3.2.2, and there is no direct replacement. This is an internal class which was not marked as such, but should have been.
34 * @author jvanzyl
35 *
36 */
37 public interface ProjectDependenciesResolver
38 {
39
40 /**
41 * Resolves the transitive dependencies of the specified project.
42 *
43 * @param project The project whose dependencies should be resolved, must not be {@code null}.
44 * @param scopesToResolve The dependency scopes that should be resolved, may be {@code null}.
45 * @param session The current build session, must not be {@code null}.
46 * @return The transitive dependencies of the specified project that match the requested scopes, never {@code null}.
47 */
48 Set<Artifact> resolve( MavenProject project, Collection<String> scopesToResolve, MavenSession session )
49 throws ArtifactResolutionException, ArtifactNotFoundException;
50
51 /**
52 * Resolves the transitive dependencies of the specified project.
53 *
54 * @param project The project whose dependencies should be resolved, must not be {@code null}.
55 * @param scopesToCollect The dependency scopes that should be collected, may be {@code null}.
56 * @param scopesToResolve The dependency scopes that should be collected and also resolved, may be {@code null}.
57 * @param session The current build session, must not be {@code null}.
58 * @return The transitive dependencies of the specified project that match the requested scopes, never {@code null}.
59 */
60 Set<Artifact> resolve( MavenProject project, Collection<String> scopesToCollect,
61 Collection<String> scopesToResolve, MavenSession session )
62 throws ArtifactResolutionException, ArtifactNotFoundException;
63
64 /**
65 * Resolves the transitive dependencies of the specified project.
66 *
67 * @param project The project whose dependencies should be resolved, must not be {@code null}.
68 * @param scopesToCollect The dependency scopes that should be collected, may be {@code null}.
69 * @param scopesToResolve The dependency scopes that should be collected and also resolved, may be {@code null}.
70 * @param session The current build session, must not be {@code null}.
71 * @param ignoreableArtifacts Artifacts that need not be resolved
72 * @return The transitive dependencies of the specified project that match the requested scopes, never {@code null}.
73 */
74 Set<Artifact> resolve( MavenProject project, Collection<String> scopesToCollect,
75 Collection<String> scopesToResolve, MavenSession session, Set<Artifact> ignoreableArtifacts )
76 throws ArtifactResolutionException, ArtifactNotFoundException;
77
78 /**
79 * Resolves the transitive dependencies of the specified projects. Note that dependencies which can't be resolved
80 * from any repository but are present among the set of specified projects will not cause an exception. Instead,
81 * those unresolved artifacts will be returned in the result set, allowing the caller to take special care of
82 * artifacts that haven't been build yet.
83 *
84 * @param projects The projects whose dependencies should be resolved, may be {@code null}.
85 * @param scopes The dependency scopes that should be resolved, may be {@code null}.
86 * @param session The current build session, must not be {@code null}.
87 * @return The transitive dependencies of the specified projects that match the requested scopes, never {@code null}
88 * .
89 */
90 Set<Artifact> resolve( Collection<? extends MavenProject> projects, Collection<String> scopes, MavenSession session )
91 throws ArtifactResolutionException, ArtifactNotFoundException;
92
93 }