001package org.apache.maven.artifact.resolver;
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.List;
023import java.util.Map;
024import java.util.Set;
025
026import org.apache.maven.artifact.Artifact;
027import org.apache.maven.artifact.metadata.ArtifactMetadataSource;
028import org.apache.maven.artifact.repository.ArtifactRepository;
029import org.apache.maven.artifact.resolver.filter.ArtifactFilter;
030import org.apache.maven.wagon.events.TransferListener;
031
032/**
033 * @author Jason van Zyl
034 */
035// Just hide the one method we want behind the RepositorySystem interface.
036public interface ArtifactResolver
037{
038
039    ArtifactResolutionResult resolve( ArtifactResolutionRequest request );
040
041    // The rest is deprecated
042
043    // USED BY MAVEN ASSEMBLY PLUGIN 2.2-beta-2
044    @Deprecated
045    String ROLE = ArtifactResolver.class.getName();
046
047    // USED BY SUREFIRE, DEPENDENCY PLUGIN
048    @Deprecated
049    ArtifactResolutionResult resolveTransitively( 
050                Set<Artifact> artifacts, Artifact originatingArtifact,
051            ArtifactRepository localRepository,
052            List<ArtifactRepository> remoteRepositories,
053            ArtifactMetadataSource source, ArtifactFilter filter )
054        throws ArtifactResolutionException, ArtifactNotFoundException;
055
056    // USED BY MAVEN ASSEMBLY PLUGIN
057    @Deprecated
058    ArtifactResolutionResult resolveTransitively( 
059                Set<Artifact> artifacts, Artifact originatingArtifact,
060            Map<String,Artifact> managedVersions, ArtifactRepository localRepository,
061            List<ArtifactRepository> remoteRepositories,
062            ArtifactMetadataSource source )
063        throws ArtifactResolutionException, ArtifactNotFoundException;
064
065    // USED BY MAVEN ASSEMBLY PLUGIN
066    @Deprecated
067    ArtifactResolutionResult resolveTransitively( 
068                Set<Artifact> artifacts, Artifact originatingArtifact,
069            Map<String,Artifact> managedVersions, ArtifactRepository localRepository,
070            List<ArtifactRepository> remoteRepositories,
071            ArtifactMetadataSource source, ArtifactFilter filter )
072        throws ArtifactResolutionException, ArtifactNotFoundException;
073
074    // USED BY INVOKER PLUGIN
075    @Deprecated
076    ArtifactResolutionResult resolveTransitively( 
077                Set<Artifact> artifacts, Artifact originatingArtifact,
078            List<ArtifactRepository> remoteRepositories,
079            ArtifactRepository localRepository, ArtifactMetadataSource source )
080        throws ArtifactResolutionException, ArtifactNotFoundException;
081
082    @Deprecated
083    ArtifactResolutionResult resolveTransitively( 
084                Set<Artifact> artifacts, Artifact originatingArtifact,
085            Map<String,Artifact> managedVersions, ArtifactRepository localRepository,
086            List<ArtifactRepository> remoteRepositories,
087            ArtifactMetadataSource source, ArtifactFilter filter,
088            List<ResolutionListener> listeners )
089        throws ArtifactResolutionException, ArtifactNotFoundException;
090
091    @Deprecated
092    ArtifactResolutionResult resolveTransitively( 
093                Set<Artifact> artifacts, Artifact originatingArtifact,
094            List<ArtifactRepository> remoteRepositories,
095            ArtifactRepository localRepository, ArtifactMetadataSource source,
096            List<ResolutionListener> listeners )
097        throws ArtifactResolutionException, ArtifactNotFoundException;
098
099    // USED BY REMOTE RESOURCES PLUGIN, DEPENDENCY PLUGIN, SHADE PLUGIN
100    @Deprecated
101    void resolve( Artifact artifact, List<ArtifactRepository> remoteRepositories, ArtifactRepository localRepository )
102        throws ArtifactResolutionException, ArtifactNotFoundException;
103
104    // USED BY REMOTE RESOURCES PLUGIN
105    @Deprecated
106    void resolve( Artifact artifact, List<ArtifactRepository> remoteRepositories, ArtifactRepository localRepository,
107                  TransferListener downloadMonitor )
108        throws ArtifactResolutionException, ArtifactNotFoundException;
109
110    // USED BY DEPENDENCY PLUGIN, ARCHETYPE DOWNLOADER
111    @Deprecated
112    void resolveAlways( Artifact artifact, List<ArtifactRepository> remoteRepositories,
113                        ArtifactRepository localRepository )
114        throws ArtifactResolutionException, ArtifactNotFoundException;
115}