001 /* 002 * #%L 003 * License Maven Plugin 004 * 005 * $Id: DependenciesTool.java 14409 2011-08-10 15:30:41Z tchemit $ 006 * $HeadURL: http://svn.codehaus.org/mojo/tags/license-maven-plugin-1.0/src/main/java/org/codehaus/mojo/license/DependenciesTool.java $ 007 * %% 008 * Copyright (C) 2011 CodeLutin, Codehaus, Tony Chemit 009 * %% 010 * This program is free software: you can redistribute it and/or modify 011 * it under the terms of the GNU Lesser General Public License as 012 * published by the Free Software Foundation, either version 3 of the 013 * License, or (at your option) any later version. 014 * 015 * This program is distributed in the hope that it will be useful, 016 * but WITHOUT ANY WARRANTY; without even the implied warranty of 017 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 018 * GNU General Lesser Public License for more details. 019 * 020 * You should have received a copy of the GNU General Lesser Public 021 * License along with this program. If not, see 022 * <http://www.gnu.org/licenses/lgpl-3.0.html>. 023 * #L% 024 */ 025 package org.codehaus.mojo.license; 026 027 import org.apache.maven.artifact.repository.ArtifactRepository; 028 import org.apache.maven.project.MavenProject; 029 030 import java.util.List; 031 import java.util.SortedMap; 032 033 /** 034 * A tool to deal with dependencies of a project. 035 * 036 * @author tchemit <chemit@codelutin.com> 037 * @since 1.0 038 */ 039 public interface DependenciesTool 040 { 041 042 /** 043 * For a given {@code project}, obtain the universe of his dependencies after applying transitivity and 044 * filtering rules given in the {@code configuration} object. 045 * <p/> 046 * Result is given in a map where keys are unique artifact id 047 * 048 * @param project the project to scann 049 * @param configuration the configuration 050 * @param localRepository local repository used to resolv dependencies 051 * @param remoteRepositories remote repositories used to resolv dependencies 052 * @param cache a optional cache where to keep resolved dependencies 053 * @return the map of resolved dependencies indexed by their unique id. 054 * @see MavenProjectDependenciesConfigurator 055 */ 056 SortedMap<String, MavenProject> loadProjectDependencies( MavenProject project, 057 MavenProjectDependenciesConfigurator configuration, 058 ArtifactRepository localRepository, 059 List<ArtifactRepository> remoteRepositories, 060 SortedMap<String, MavenProject> cache ); 061 }