View Javadoc

1   /**
2    * Copyright 2010-2012 The Kuali Foundation
3    *
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.opensource.org/licenses/ecl2.php
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.codehaus.mojo.license;
17  
18  import org.apache.maven.artifact.repository.ArtifactRepository;
19  import org.apache.maven.project.MavenProject;
20  
21  import java.util.List;
22  import java.util.SortedMap;
23  
24  /**
25   * A tool to deal with dependencies of a project.
26   *
27   * @author tchemit <chemit@codelutin.com>
28   * @since 1.0
29   */
30  public interface DependenciesTool
31  {
32  
33      /**
34       * For a given {@code project}, obtain the universe of his dependencies after applying transitivity and
35       * filtering rules given in the {@code configuration} object.
36       * <p/>
37       * Result is given in a map where keys are unique artifact id
38       *
39       * @param project            the project to scann
40       * @param configuration      the configuration
41       * @param localRepository    local repository used to resolv dependencies
42       * @param remoteRepositories remote repositories used to resolv dependencies
43       * @param cache              a optional cache where to keep resolved dependencies
44       * @return the map of resolved dependencies indexed by their unique id.
45       * @see MavenProjectDependenciesConfigurator
46       */
47      SortedMap<String, MavenProject> loadProjectDependencies( MavenProject project,
48                                                               MavenProjectDependenciesConfigurator configuration,
49                                                               ArtifactRepository localRepository,
50                                                               List<ArtifactRepository> remoteRepositories,
51                                                               SortedMap<String, MavenProject> cache );
52  }