Package org.codehaus.mojo.license
Class DownloadLicensesMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.codehaus.mojo.license.AbstractLicensesXmlMojo
org.codehaus.mojo.license.AbstractDownloadLicensesMojo
org.codehaus.mojo.license.DownloadLicensesMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo,MavenProjectDependenciesConfigurator
@Mojo(name="download-licenses",
requiresDependencyResolution=TEST,
defaultPhase=PACKAGE)
public class DownloadLicensesMojo
extends AbstractDownloadLicensesMojo
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.
The license files will be downloaded to AbstractDownloadLicensesMojo.licensesOutputDirectory to be included
in the final packaging of the project if desired. The licenses are downloaded from the url field of the dependency
POM.
If the license information (license name and license URL) is missing or otherwise broken in a dependency POM, this mojo offers several fallback options:
- Since:
- 1.0
- Author:
- Paul Gier
-
Nested Class Summary
Nested classes/interfaces inherited from class org.codehaus.mojo.license.AbstractDownloadLicensesMojo
AbstractDownloadLicensesMojo.ErrorRemedy -
Field Summary
FieldsFields inherited from class org.codehaus.mojo.license.AbstractDownloadLicensesMojo
errorRemedy, licensesCalcOutputFile, licensesConfigFile, licensesExcelOutputFile, licensesOutputDirectory, licenseUrlFileNames, licenseUrlFileNameSanitizers, licenseUrlReplacements, organizeLicensesByDependencies, project, remoteRepositories, useDefaultUrlReplacementsFields inherited from class org.codehaus.mojo.license.AbstractLicensesXmlMojo
licensedArtifactResolver, licensesOutputFile, licensesOutputFileEolFields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Map<String, LicensedArtifact> protected booleanisSkip()Methods inherited from class org.codehaus.mojo.license.AbstractDownloadLicensesMojo
execute, getArtifactFilters, getAutodetectEolFiles, getProject, isExcludeTransitiveDependencies, isIncludeTransitiveDependencies, isVerboseMethods inherited from class org.codehaus.mojo.license.AbstractLicensesXmlMojo
getEncoding, writeLicenseSummaryMethods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Field Details
-
skipDownloadLicenses
@Parameter(property="license.skipDownloadLicenses", defaultValue="false") protected boolean skipDownloadLicensesA flag to skip the goal.- Since:
- 1.5
-
-
Constructor Details
-
DownloadLicensesMojo
-
-
Method Details
-
isSkip
protected boolean isSkip()- Specified by:
isSkipin classAbstractDownloadLicensesMojo
-
getDependencies
- Specified by:
getDependenciesin classAbstractDownloadLicensesMojo
-