001/*
002 * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
003 * agreements. See the NOTICE file distributed with this work for additional information regarding
004 * copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the
005 * "License"); you may not use this file except in compliance with the License. You may obtain a
006 * copy of the License at
007 *
008 * http://www.apache.org/licenses/LICENSE-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software distributed under the License
011 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
012 * or implied. See the License for the specific language governing permissions and limitations under
013 * the License.
014 */
015
016package org.apache.maven.lifecycle.internal.stub;
017
018import org.apache.maven.ProjectDependenciesResolver;
019import org.apache.maven.artifact.Artifact;
020import org.apache.maven.artifact.resolver.ArtifactNotFoundException;
021import org.apache.maven.artifact.resolver.ArtifactResolutionException;
022import org.apache.maven.execution.MavenSession;
023import org.apache.maven.project.DependencyResolutionException;
024import org.apache.maven.project.DependencyResolutionRequest;
025import org.apache.maven.project.DependencyResolutionResult;
026import org.apache.maven.project.MavenProject;
027import org.eclipse.aether.graph.DefaultDependencyNode;
028import org.eclipse.aether.graph.Dependency;
029import org.eclipse.aether.graph.DependencyNode;
030
031import java.util.Collection;
032import java.util.Collections;
033import java.util.HashSet;
034import java.util.List;
035import java.util.Set;
036
037/**
038 * @author Kristian Rosenvold
039 */
040public class ProjectDependenciesResolverStub
041    implements ProjectDependenciesResolver, org.apache.maven.project.ProjectDependenciesResolver
042{
043    public Set<Artifact> resolve( MavenProject project, Collection<String> scopesToResolve, MavenSession session )
044        throws ArtifactResolutionException, ArtifactNotFoundException
045    {
046        return new HashSet<Artifact>();
047    }
048
049    public Set<Artifact> resolve( MavenProject project, Collection<String> scopesToCollect,
050                                  Collection<String> scopesToResolve, MavenSession session )
051        throws ArtifactResolutionException, ArtifactNotFoundException
052    {
053        return new HashSet<Artifact>();
054    }
055
056    public Set<Artifact> resolve( Collection<? extends MavenProject> projects, Collection<String> scopes,
057                                  MavenSession session )
058        throws ArtifactResolutionException, ArtifactNotFoundException
059    {
060        return new HashSet<Artifact>();
061    }
062
063    public Set<Artifact> resolve( MavenProject project, Collection<String> scopesToCollect,
064                                  Collection<String> scopesToResolve, MavenSession session,
065                                  Set<Artifact> ignoreableArtifacts )
066        throws ArtifactResolutionException, ArtifactNotFoundException
067    {
068        return new HashSet<Artifact>();
069    }
070
071    public DependencyResolutionResult resolve( DependencyResolutionRequest request )
072        throws DependencyResolutionException
073    {
074        return new DependencyResolutionResult()
075        {
076
077            public List<Dependency> getUnresolvedDependencies()
078            {
079                return Collections.emptyList();
080            }
081
082            public List<Dependency> getResolvedDependencies()
083            {
084                return Collections.emptyList();
085            }
086
087            public List<Exception> getResolutionErrors( Dependency dependency )
088            {
089                return Collections.emptyList();
090            }
091
092            public DependencyNode getDependencyGraph()
093            {
094                return new DefaultDependencyNode( (Dependency) null );
095            }
096
097            public List<Dependency> getDependencies()
098            {
099                return Collections.emptyList();
100            }
101
102            public List<Exception> getCollectionErrors()
103            {
104                return Collections.emptyList();
105            }
106        };
107    }
108
109}