org.codehaus.mojo.license
Class DownloadLicensesMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.codehaus.mojo.license.DownloadLicensesMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo, MavenProjectDependenciesConfigurator

public class DownloadLicensesMojo
extends org.apache.maven.plugin.AbstractMojo
implements MavenProjectDependenciesConfigurator

Download the license files of all the current project's dependencies, and generate a summary file containing a list of all dependencies and their licenses.

Since:
1.0
Version:
$Revision: 14414 $
Author:
Paul Gier

Field Summary
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
DownloadLicensesMojo()
           
 
Method Summary
 ProjectLicenseInfo createDependencyProject(org.apache.maven.project.MavenProject depMavenProject)
          Create a simple DependencyProject object containing the GAV and license info from the Maven Artifact
 void execute()
          Main Maven plugin execution
 String getArtifactProjectId(org.apache.maven.artifact.Artifact artifact)
          Returns the project ID for the artifact
 String getExcludedArtifacts()
          
 String getExcludedGroups()
          
 List<String> getExcludedScopes()
          
 String getIncludedArtifacts()
          
 String getIncludedGroups()
          
 List<String> getIncludedScopes()
          
 org.apache.maven.artifact.repository.ArtifactRepository getLocalRepository()
           
 org.apache.maven.project.MavenProject getProject()
           
 List getRemoteRepositories()
           
 boolean isIncludeTransitiveDependencies()
          
 boolean isVerbose()
          
 void setExcludedScopes(String excludedScopes)
           
 void setIncludedScopes(String includedScopes)
           
 
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DownloadLicensesMojo

public DownloadLicensesMojo()
Method Detail

execute

public void execute()
             throws org.apache.maven.plugin.MojoExecutionException
Main Maven plugin execution

Specified by:
execute in interface org.apache.maven.plugin.Mojo
Throws:
org.apache.maven.plugin.MojoExecutionException

getArtifactProjectId

public String getArtifactProjectId(org.apache.maven.artifact.Artifact artifact)
Returns the project ID for the artifact

Parameters:
artifact - the artifact
Returns:
groupId:artifactId

createDependencyProject

public ProjectLicenseInfo createDependencyProject(org.apache.maven.project.MavenProject depMavenProject)
Create a simple DependencyProject object containing the GAV and license info from the Maven Artifact

Parameters:
depMavenProject - the dependency maven project
Returns:
DependencyProject with artifact and license info

getProject

public org.apache.maven.project.MavenProject getProject()

getLocalRepository

public org.apache.maven.artifact.repository.ArtifactRepository getLocalRepository()

getRemoteRepositories

public List getRemoteRepositories()

isIncludeTransitiveDependencies

public boolean isIncludeTransitiveDependencies()

Specified by:
isIncludeTransitiveDependencies in interface MavenProjectDependenciesConfigurator
Returns:
true if should include transitive dependencies, false to include only direct dependencies.

getExcludedScopes

public List<String> getExcludedScopes()

Specified by:
getExcludedScopes in interface MavenProjectDependenciesConfigurator
Returns:
list of scopes to exclude while loading dependencies, if null is setted, then include all scopes.

setExcludedScopes

public void setExcludedScopes(String excludedScopes)

getIncludedScopes

public List<String> getIncludedScopes()

Specified by:
getIncludedScopes in interface MavenProjectDependenciesConfigurator
Returns:
list of scopes to include while loading dependencies, if null is setted, then include all scopes.

setIncludedScopes

public void setIncludedScopes(String includedScopes)

getIncludedArtifacts

public String getIncludedArtifacts()

Specified by:
getIncludedArtifacts in interface MavenProjectDependenciesConfigurator
Returns:
a pattern to include dependencies by thier artificatId, if null is setted then include all artifacts.

getIncludedGroups

public String getIncludedGroups()

Specified by:
getIncludedGroups in interface MavenProjectDependenciesConfigurator
Returns:
a pattern to include dependencies by their groupId, if null is setted then include all artifacts.

getExcludedGroups

public String getExcludedGroups()

Specified by:
getExcludedGroups in interface MavenProjectDependenciesConfigurator
Returns:
a pattern to exclude dependencies by their artifactId, if null is setted the no exclude is done on artifactId.

getExcludedArtifacts

public String getExcludedArtifacts()

Specified by:
getExcludedArtifacts in interface MavenProjectDependenciesConfigurator
Returns:
a pattern to exclude dependencies by their groupId, if null is setted then no exclude is done on groupId.

isVerbose

public boolean isVerbose()

Specified by:
isVerbose in interface MavenProjectDependenciesConfigurator
Returns:
true if verbose mode is on, false otherwise.


Copyright © 2010-2012 The Kuali Foundation. All Rights Reserved.