001    package 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    
022    import java.util.List;
023    import java.util.Map;
024    import java.util.Set;
025    
026    import org.apache.maven.artifact.Artifact;
027    import org.apache.maven.artifact.metadata.ArtifactMetadataSource;
028    import org.apache.maven.artifact.repository.ArtifactRepository;
029    import org.apache.maven.artifact.resolver.filter.ArtifactFilter;
030    import 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.
036    public 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
048        @Deprecated
049        ArtifactResolutionResult resolveTransitively( Set<Artifact> artifacts, Artifact originatingArtifact,
050                                                      ArtifactRepository localRepository,
051                                                      List<ArtifactRepository> remoteRepositories,
052                                                      ArtifactMetadataSource source, ArtifactFilter filter )
053            throws ArtifactResolutionException, ArtifactNotFoundException;
054    
055        // USED BY MAVEN ASSEMBLY PLUGIN
056        @Deprecated
057        ArtifactResolutionResult resolveTransitively( Set<Artifact> artifacts, Artifact originatingArtifact,
058                                                      Map managedVersions, ArtifactRepository localRepository,
059                                                      List<ArtifactRepository> remoteRepositories,
060                                                      ArtifactMetadataSource source )
061            throws ArtifactResolutionException, ArtifactNotFoundException;
062    
063        // USED BY MAVEN ASSEMBLY PLUGIN
064        @Deprecated
065        ArtifactResolutionResult resolveTransitively( Set<Artifact> artifacts, Artifact originatingArtifact,
066                                                      Map managedVersions, ArtifactRepository localRepository,
067                                                      List<ArtifactRepository> remoteRepositories,
068                                                      ArtifactMetadataSource source, ArtifactFilter filter )
069            throws ArtifactResolutionException, ArtifactNotFoundException;
070    
071        @Deprecated
072        ArtifactResolutionResult resolveTransitively( Set<Artifact> artifacts, Artifact originatingArtifact,
073                                                      List<ArtifactRepository> remoteRepositories,
074                                                      ArtifactRepository localRepository, ArtifactMetadataSource source )
075            throws ArtifactResolutionException, ArtifactNotFoundException;
076    
077        @Deprecated
078        ArtifactResolutionResult resolveTransitively( Set<Artifact> artifacts, Artifact originatingArtifact,
079                                                      Map managedVersions, ArtifactRepository localRepository,
080                                                      List<ArtifactRepository> remoteRepositories,
081                                                      ArtifactMetadataSource source, ArtifactFilter filter,
082                                                      List<ResolutionListener> listeners )
083            throws ArtifactResolutionException, ArtifactNotFoundException;
084    
085        @Deprecated
086        ArtifactResolutionResult resolveTransitively( Set<Artifact> artifacts, Artifact originatingArtifact,
087                                                      List<ArtifactRepository> remoteRepositories,
088                                                      ArtifactRepository localRepository, ArtifactMetadataSource source,
089                                                      List<ResolutionListener> listeners )
090            throws ArtifactResolutionException, ArtifactNotFoundException;
091    
092        // USED BY REMOTE RESOURCES PLUGIN
093        @Deprecated
094        void resolve( Artifact artifact, List<ArtifactRepository> remoteRepositories, ArtifactRepository localRepository )
095            throws ArtifactResolutionException, ArtifactNotFoundException;
096    
097        // USED BY REMOTE RESOURCES PLUGIN
098        @Deprecated
099        void resolve( Artifact artifact, List<ArtifactRepository> remoteRepositories, ArtifactRepository localRepository,
100                      TransferListener downloadMonitor )
101            throws ArtifactResolutionException, ArtifactNotFoundException;
102    
103        // USED BY ARCHETYPE DOWNLOADER
104        @Deprecated
105        void resolveAlways( Artifact artifact, List<ArtifactRepository> remoteRepositories,
106                            ArtifactRepository localRepository )
107            throws ArtifactResolutionException, ArtifactNotFoundException;
108    }