001package org.apache.maven; 002 003/* 004 * Licensed to the Apache Software Foundation (ASF) under one 005 * or more contributor license agreements. See the NOTICE file 006 * distributed with this work for additional information 007 * regarding copyright ownership. The ASF licenses this file 008 * to you under the Apache License, Version 2.0 (the 009 * "License"); you may not use this file except in compliance 010 * with the License. You may obtain a copy of the License at 011 * 012 * http://www.apache.org/licenses/LICENSE-2.0 013 * 014 * Unless required by applicable law or agreed to in writing, 015 * software distributed under the License is distributed on an 016 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 017 * KIND, either express or implied. See the License for the 018 * specific language governing permissions and limitations 019 * under the License. 020 */ 021 022import java.util.Collection; 023import java.util.Set; 024 025import org.apache.maven.artifact.Artifact; 026import org.apache.maven.artifact.resolver.ArtifactNotFoundException; 027import org.apache.maven.artifact.resolver.ArtifactResolutionException; 028import org.apache.maven.execution.MavenSession; 029import org.apache.maven.project.MavenProject; 030 031@Deprecated 032/** 033 * @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. 034 * @author jvanzyl 035 * 036 */ 037public interface ProjectDependenciesResolver 038{ 039 040 /** 041 * Resolves the transitive dependencies of the specified project. 042 * 043 * @param project The project whose dependencies should be resolved, must not be {@code null}. 044 * @param scopesToResolve The dependency scopes that should be resolved, may be {@code null}. 045 * @param session The current build session, must not be {@code null}. 046 * @return The transitive dependencies of the specified project that match the requested scopes, never {@code null}. 047 */ 048 Set<Artifact> resolve( MavenProject project, Collection<String> scopesToResolve, MavenSession session ) 049 throws ArtifactResolutionException, ArtifactNotFoundException; 050 051 /** 052 * Resolves the transitive dependencies of the specified project. 053 * 054 * @param project The project whose dependencies should be resolved, must not be {@code null}. 055 * @param scopesToCollect The dependency scopes that should be collected, may be {@code null}. 056 * @param scopesToResolve The dependency scopes that should be collected and also resolved, may be {@code null}. 057 * @param session The current build session, must not be {@code null}. 058 * @return The transitive dependencies of the specified project that match the requested scopes, never {@code null}. 059 */ 060 Set<Artifact> resolve( MavenProject project, Collection<String> scopesToCollect, 061 Collection<String> scopesToResolve, MavenSession session ) 062 throws ArtifactResolutionException, ArtifactNotFoundException; 063 064 /** 065 * Resolves the transitive dependencies of the specified project. 066 * 067 * @param project The project whose dependencies should be resolved, must not be {@code null}. 068 * @param scopesToCollect The dependency scopes that should be collected, may be {@code null}. 069 * @param scopesToResolve The dependency scopes that should be collected and also resolved, may be {@code null}. 070 * @param session The current build session, must not be {@code null}. 071 * @param ignoreableArtifacts Artifacts that need not be resolved 072 * @return The transitive dependencies of the specified project that match the requested scopes, never {@code null}. 073 */ 074 Set<Artifact> resolve( MavenProject project, Collection<String> scopesToCollect, 075 Collection<String> scopesToResolve, MavenSession session, Set<Artifact> ignoreableArtifacts ) 076 throws ArtifactResolutionException, ArtifactNotFoundException; 077 078 /** 079 * Resolves the transitive dependencies of the specified projects. Note that dependencies which can't be resolved 080 * from any repository but are present among the set of specified projects will not cause an exception. Instead, 081 * those unresolved artifacts will be returned in the result set, allowing the caller to take special care of 082 * artifacts that haven't been build yet. 083 * 084 * @param projects The projects whose dependencies should be resolved, may be {@code null}. 085 * @param scopes The dependency scopes that should be resolved, may be {@code null}. 086 * @param session The current build session, must not be {@code null}. 087 * @return The transitive dependencies of the specified projects that match the requested scopes, never {@code null} 088 * . 089 */ 090 Set<Artifact> resolve( Collection<? extends MavenProject> projects, Collection<String> scopes, MavenSession session ) 091 throws ArtifactResolutionException, ArtifactNotFoundException; 092 093}