license:third-party-report
Note:
This goal should be used as a Maven report.
Full name:
org.codehaus.mojo:license-maven-plugin:2.5.0:third-party-report
Description:
Generates a report of all third-parties detected in the module.
Attributes:
- Requires a Maven project to be executed.
- Requires dependency resolution of artifacts in scope:
test
. - The goal is not marked as thread-safe and thus does not support parallel builds.
- Since version:
1.1
.
Required Parameters
Name | Type | Since | Description |
---|---|---|---|
<outputDirectory> |
File |
- |
The shared output directory for the report. Note that this parameter is only evaluated if the goal is run directly from the command line. If the goal is run indirectly as part of a site generation, the shared output directory configured in the Maven Site Plugin is used instead.
A plugin may use any subdirectory structure (either using a hard-coded name or, ideally, an additional user-defined mojo parameter with a default value) to generate multi-page reports or external reports with the main output file (entry point) denoted by Default: ${project.build.directory}/reports |
Optional Parameters
Name | Type | Since | Description |
---|---|---|---|
<artifactFiltersUrl> |
String |
1.18 |
A URL returning a plain text file that contains include/exclude artifact filters in the following format:
User Property: license.artifactFiltersUrl |
<encoding> |
String |
1.0 |
Encoding used to read and writes files.
Note: If nothing is filled here, we will use the system property Default: ${project.build.sourceEncoding} User Property: license.encoding |
<excludeTransitiveDependencies> |
boolean |
1.13 |
A filter to exclude transitive dependencies from excluded artifacts. Default: false User Property: license.excludeTransitiveDependencies |
<excludedArtifacts> |
String |
1.1 |
A filter to exclude some ArtifactsIds User Property: license.excludedArtifacts |
<excludedGroups> |
String |
1.1 |
A filter to exclude some GroupIds User Property: license.excludedGroups |
<excludedScopes> |
String |
1.1 |
A filter to exclude some scopes. Default: system User Property: license.excludedScopes |
<excludedTypes> |
String |
1.15 |
A filter to exclude some types. User Property: license.excludedTypes |
<includeOptional> |
boolean |
1.19 |
If true both optional and non-optional dependencies will be included in the list of artifacts for creating the license report; otherwise only non-optional dependencies will be considered.Default: true User Property: license.includeOptional |
<includeTransitiveDependencies> |
boolean |
1.1 |
Include transitive dependencies when looking for missing licenses and downloading license files. Default: true User Property: license.includeTransitiveDependencies |
<includedArtifacts> |
String |
1.1 |
A filter to include only some ArtifactsIds User Property: license.includedArtifacts |
<includedGroups> |
String |
1.1 |
A filter to include only some GroupIds User Property: license.includedGroups |
<includedScopes> |
String |
1.1 |
A filter to include only some scopes, if let empty then all scopes will be used (no filter). User Property: license.includedScopes |
<includedTypes> |
String |
1.15 |
A filter to include only some types, if let empty then all types will be used (no filter). User Property: license.includedTypes |
<licenseMerges> |
List<String> |
1.0 |
To merge licenses in final file.
Each entry represents a merge (first license is main license to keep), licenses are separated by Example : <licenseMerges>
<licenseMerge>The Apache Software License|Version 2.0,Apache License, Version 2.0</licenseMerge>
</licenseMerges>
</pre>
Note: This option will be overridden by |
<licenseMergesUrl> |
String |
1.18 |
Location of file with the merge licenses in order to be used by command line. Note: This option overrides licenseMerges .User Property: license.licenseMergesUrl |
<locale> |
String |
- |
The locale to use when the report generation is invoked directly as a standalone Mojo. See also: org.apache.maven.doxia.tools.SiteTool.DEFAULT_LOCALE, org.apache.maven.doxia.tools.SiteTool.getSiteLocales(java.lang.String) Default: default |
<missingFile> |
File |
1.1 |
The file where to fill the license for dependencies with unknwon license. Default: src/license/THIRD-PARTY.properties User Property: license.missingFile |
<missingFileUrl> |
String |
1.15 |
The Url that holds the missing license dependency entries. This is an extension to missingFile . If set then the entries that will be found at this URL will be added additionally to the entries of the missing file.
NOTE: the response of the URL endpoint must return content that matches the THIRD-PARTY.properties file! User Property: license.missingFileUrl |
<outputFormat> |
String |
- |
The report output format: null by default, to represent a site, but can be configured to a Doxia Sink id. User Property: output.format |
<outputTimestamp> |
String |
- |
Timestamp for reproducible output archive entries, either formatted as ISO 8601 yyyy-MM-dd'T'HH:mm:ssXXX or as an int representing seconds since the epoch (like SOURCE_DATE_EPOCH).Default: ${project.build.outputTimestamp} |
<overrideFile> |
File |
1.11 |
Deprecated. Use overrideUrl insteadA file containing the override license information for dependencies. Note: Specify either overrideUrl (preferred) or overrideFile . If none of these is specified, then "src/license/override-THIRD-PARTY.properties" resolved against ${basedir} will be used if it exists.User Property: license.overrideFile |
<overrideUrl> |
String |
1.17 |
A URL pointing at a property file with the override license information for dependencies. Note: Specify either overrideUrl (preferred) or overrideFile . If none of these is specified, then "src/license/override-THIRD-PARTY.properties" resolved against ${basedir} will be used if it exists.
An example of the file content: org.jboss.xnio--xnio-api--3.3.6.Final=The Apache Software License, Version 2.0 User Property: license.overrideUrl |
<siteDirectory> |
File |
- |
Directory containing the site.xml file.Default: ${basedir}/src/site |
<skipThirdPartyReport> |
boolean |
1.1 |
Skip to generate the report. Default: false User Property: license.skipThirdPartyReport |
<useMissingFile> |
boolean |
1.1 |
A flag to use the missing licenses file to consolidate the THID-PARTY file. Default: false User Property: license.useMissingFile |
<useRepositoryMissingFiles> |
boolean |
1.0 |
Load from repositories third party missing files. Default: true User Property: license.useRepositoryMissingFiles |
<verbose> |
boolean |
1.0 |
Flag to activate verbose mode.
Note: Verbose mode is always on if you starts a debug maven instance (says via Default: ${maven.verbose} User Property: license.verbose |
Parameter Details
<artifactFiltersUrl>
# this is a comment
include gaPattern org\.my-org:my-artifact
include gaPattern org\.other-org:other-artifact
exclude gaPattern org\.yet-anther-org:.*
include scope compile
include scope test
exclude scope system
include type jar
exclude type war
- Type:
java.lang.String
- Since:
1.18
- Required:
No
- User Property:
license.artifactFiltersUrl
<encoding>
Note: If nothing is filled here, we will use the system property file.encoding
.
- Type:
java.lang.String
- Since:
1.0
- Required:
No
- User Property:
license.encoding
- Default:
${project.build.sourceEncoding}
<excludeTransitiveDependencies>
- Type:
boolean
- Since:
1.13
- Required:
No
- User Property:
license.excludeTransitiveDependencies
- Default:
false
<excludedArtifacts>
- Type:
java.lang.String
- Since:
1.1
- Required:
No
- User Property:
license.excludedArtifacts
<excludedGroups>
- Type:
java.lang.String
- Since:
1.1
- Required:
No
- User Property:
license.excludedGroups
<excludedScopes>
- Type:
java.lang.String
- Since:
1.1
- Required:
No
- User Property:
license.excludedScopes
- Default:
system
<excludedTypes>
- Type:
java.lang.String
- Since:
1.15
- Required:
No
- User Property:
license.excludedTypes
<includeOptional>
true
both optional and non-optional dependencies will be included in the list of artifacts for creating the license report; otherwise only non-optional dependencies will be considered.- Type:
boolean
- Since:
1.19
- Required:
No
- User Property:
license.includeOptional
- Default:
true
<includeTransitiveDependencies>
- Type:
boolean
- Since:
1.1
- Required:
No
- User Property:
license.includeTransitiveDependencies
- Default:
true
<includedArtifacts>
- Type:
java.lang.String
- Since:
1.1
- Required:
No
- User Property:
license.includedArtifacts
<includedGroups>
- Type:
java.lang.String
- Since:
1.1
- Required:
No
- User Property:
license.includedGroups
<includedScopes>
- Type:
java.lang.String
- Since:
1.1
- Required:
No
- User Property:
license.includedScopes
<includedTypes>
- Type:
java.lang.String
- Since:
1.15
- Required:
No
- User Property:
license.includedTypes
<licenseMerges>
Each entry represents a merge (first license is main license to keep), licenses are separated by |
.
Example :
<licenseMerges>
<licenseMerge>The Apache Software License|Version 2.0,Apache License, Version 2.0</licenseMerge>
</licenseMerges>
</pre>
Note: This option will be overridden by licenseMergesUrl
if it is used by command line.
- Type:
java.util.List<java.lang.String>
- Since:
1.0
- Required:
No
<licenseMergesUrl>
licenseMerges
.- Type:
java.lang.String
- Since:
1.18
- Required:
No
- User Property:
license.licenseMergesUrl
<locale>
See also: org.apache.maven.doxia.tools.SiteTool.DEFAULT_LOCALE, org.apache.maven.doxia.tools.SiteTool.getSiteLocales(java.lang.String)
- Type:
java.lang.String
- Required:
No
- Default:
default
<missingFile>
- Type:
java.io.File
- Since:
1.1
- Required:
No
- User Property:
license.missingFile
- Default:
src/license/THIRD-PARTY.properties
<missingFileUrl>
missingFile
. If set then the entries that will be found at this URL will be added additionally to the entries of the missing file.
NOTE:
the response of the URL endpoint must return content that matches the THIRD-PARTY.properties file!
- Type:
java.lang.String
- Since:
1.15
- Required:
No
- User Property:
license.missingFileUrl
<outputDirectory>
A plugin may use any subdirectory structure (either using a hard-coded name or, ideally, an additional user-defined mojo parameter with a default value) to generate multi-page reports or external reports with the main output file (entry point) denoted by #getOutputName()
.
- Type:
java.io.File
- Required:
Yes
- Default:
${project.build.directory}/reports
<outputFormat>
- Type:
java.lang.String
- Required:
No
- User Property:
output.format
<outputTimestamp>
yyyy-MM-dd'T'HH:mm:ssXXX
or as an int representing seconds since the epoch (like SOURCE_DATE_EPOCH).- Type:
java.lang.String
- Required:
No
- Default:
${project.build.outputTimestamp}
<overrideFile>
Use
overrideUrl
insteadoverrideUrl
(preferred) or overrideFile
. If none of these is specified, then "src/license/override-THIRD-PARTY.properties" resolved against ${basedir}
will be used if it exists.- Type:
java.io.File
- Since:
1.11
- Required:
No
- User Property:
license.overrideFile
<overrideUrl>
overrideUrl
(preferred) or overrideFile
. If none of these is specified, then "src/license/override-THIRD-PARTY.properties" resolved against ${basedir}
will be used if it exists.
An example of the file content:
org.jboss.xnio--xnio-api--3.3.6.Final=The Apache Software License, Version 2.0
- Type:
java.lang.String
- Since:
1.17
- Required:
No
- User Property:
license.overrideUrl
<siteDirectory>
site.xml
file.- Type:
java.io.File
- Required:
No
- Default:
${basedir}/src/site
<skipThirdPartyReport>
- Type:
boolean
- Since:
1.1
- Required:
No
- User Property:
license.skipThirdPartyReport
- Default:
false
<useMissingFile>
- Type:
boolean
- Since:
1.1
- Required:
No
- User Property:
license.useMissingFile
- Default:
false
<useRepositoryMissingFiles>
- Type:
boolean
- Since:
1.0
- Required:
No
- User Property:
license.useRepositoryMissingFiles
- Default:
true
<verbose>
Note: Verbose mode is always on if you starts a debug maven instance (says via -X
).
- Type:
boolean
- Since:
1.0
- Required:
No
- User Property:
license.verbose
- Default:
${maven.verbose}