View Javadoc

1   /*
2    * #%L
3    * License Maven Plugin
4    *
5    * $Id: MavenProjectDependenciesConfigurator.java 14741 2011-09-20 08:31:41Z tchemit $
6    * $HeadURL: http://svn.codehaus.org/mojo/tags/license-maven-plugin-1.0/src/main/java/org/codehaus/mojo/license/MavenProjectDependenciesConfigurator.java $
7    * %%
8    * Copyright (C) 2011 CodeLutin, Codehaus, Tony Chemit
9    * %%
10   * This program is free software: you can redistribute it and/or modify
11   * it under the terms of the GNU Lesser General Public License as
12   * published by the Free Software Foundation, either version 3 of the
13   * License, or (at your option) any later version.
14   *
15   * This program is distributed in the hope that it will be useful,
16   * but WITHOUT ANY WARRANTY; without even the implied warranty of
17   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18   * GNU General Lesser Public License for more details.
19   *
20   * You should have received a copy of the GNU General Lesser Public
21   * License along with this program.  If not, see
22   * <http://www.gnu.org/licenses/lgpl-3.0.html>.
23   * #L%
24   */
25  package org.codehaus.mojo.license;
26  
27  import java.util.List;
28  
29  /**
30   * Contract to configure which dependencies will be loaded by the dependency tool via the method
31   * {@link DependenciesTool#loadProjectDependencies(org.apache.maven.project.MavenProject, MavenProjectDependenciesConfigurator, org.apache.maven.artifact.repository.ArtifactRepository, java.util.List, java.util.SortedMap)}
32   *
33   * @author tchemit <chemit@codelutin.com>
34   * @see DependenciesTool
35   * @since 1.0
36   */
37  public interface MavenProjectDependenciesConfigurator
38  {
39  
40      /**
41       * @return {@code true} if should include transitive dependencies, {@code false} to include only direct
42       *         dependencies.
43       */
44      boolean isIncludeTransitiveDependencies();
45  
46      /**
47       * @return list of scopes to include while loading dependencies, if {@code null} is setted, then include all scopes.
48       */
49      List<String> getIncludedScopes();
50  
51      /**
52       * @return list of scopes to exclude while loading dependencies, if {@code null} is setted, then include all scopes.
53       */
54      List<String> getExcludedScopes();
55  
56      /**
57       * @return a pattern to include dependencies by thier {@code artificatId}, if {@code null} is setted then include
58       *         all artifacts.
59       */
60      String getIncludedArtifacts();
61  
62      /**
63       * @return a pattern to include dependencies by their {@code groupId}, if {@code null} is setted then include
64       *         all artifacts.
65       */
66      String getIncludedGroups();
67  
68      /**
69       * @return a pattern to exclude dependencies by their {@code artifactId}, if {@code null} is setted the no exclude is
70       *         done on artifactId.
71       */
72      String getExcludedGroups();
73  
74      /**
75       * @return a pattern to exclude dependencies by their {@code groupId}, if {@code null} is setted then no exclude
76       *         is done on groupId.
77       */
78      String getExcludedArtifacts();
79  
80      /**
81       * @return {@code true} if verbose mode is on, {@code false} otherwise.
82       */
83      boolean isVerbose();
84  }