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, 034 * but should have been. 035 * @author jvanzyl 036 * 037 */ 038public interface ProjectDependenciesResolver 039{ 040 041 /** 042 * Resolves the transitive dependencies of the specified project. 043 * 044 * @param project The project whose dependencies should be resolved, must not be {@code null}. 045 * @param scopesToResolve The dependency scopes that should be resolved, may be {@code null}. 046 * @param session The current build session, must not be {@code null}. 047 * @return The transitive dependencies of the specified project that match the requested scopes, never {@code null}. 048 */ 049 Set<Artifact> resolve( MavenProject project, Collection<String> scopesToResolve, MavenSession session ) 050 throws ArtifactResolutionException, ArtifactNotFoundException; 051 052 /** 053 * Resolves the transitive dependencies of the specified project. 054 * 055 * @param project The project whose dependencies should be resolved, must not be {@code null}. 056 * @param scopesToCollect The dependency scopes that should be collected, may be {@code null}. 057 * @param scopesToResolve The dependency scopes that should be collected and also resolved, may be {@code null}. 058 * @param session The current build session, must not be {@code null}. 059 * @return The transitive dependencies of the specified project that match the requested scopes, never {@code null}. 060 */ 061 Set<Artifact> resolve( MavenProject project, Collection<String> scopesToCollect, 062 Collection<String> scopesToResolve, MavenSession session ) 063 throws ArtifactResolutionException, ArtifactNotFoundException; 064 065 /** 066 * Resolves the transitive dependencies of the specified project. 067 * 068 * @param project The project whose dependencies should be resolved, must not be {@code null}. 069 * @param scopesToCollect The dependency scopes that should be collected, may be {@code null}. 070 * @param scopesToResolve The dependency scopes that should be collected and also resolved, may be {@code null}. 071 * @param session The current build session, must not be {@code null}. 072 * @param ignoreableArtifacts Artifacts that need not be resolved 073 * @return The transitive dependencies of the specified project that match the requested scopes, never {@code null}. 074 */ 075 Set<Artifact> resolve( MavenProject project, Collection<String> scopesToCollect, 076 Collection<String> scopesToResolve, MavenSession session, Set<Artifact> ignoreableArtifacts ) 077 throws ArtifactResolutionException, ArtifactNotFoundException; 078 079 /** 080 * Resolves the transitive dependencies of the specified projects. Note that dependencies which can't be resolved 081 * from any repository but are present among the set of specified projects will not cause an exception. Instead, 082 * those unresolved artifacts will be returned in the result set, allowing the caller to take special care of 083 * artifacts that haven't been build yet. 084 * 085 * @param projects The projects whose dependencies should be resolved, may be {@code null}. 086 * @param scopes The dependency scopes that should be resolved, may be {@code null}. 087 * @param session The current build session, must not be {@code null}. 088 * @return The transitive dependencies of the specified projects that match the requested scopes, never 089 * {@code null}. 090 */ 091 Set<Artifact> resolve( Collection<? extends MavenProject> projects, Collection<String> scopes, 092 MavenSession session ) 093 throws ArtifactResolutionException, ArtifactNotFoundException; 094 095}