License Maven Plugin
This plugin manages the license of a maven project and its dependencies (update file headers, download dependencies licenses, check thirdparty licenses, ...)
Goals Overview
The following goals are meant to participate in the default build lifecycle:
license:add-third-party
Generates a file containing a list of all dependencies and their licenses for a single project build.license:aggregate-add-third-party
Generates a file containing a list of all dependencies and their licenses for a multi-module build.license:comment-style-list
Displays all the available comment styles to box file headers.license:download-licenses
Downloads the license files associated with each dependency.license:aggregate-download-licenses
Downloads the license files associated with each dependency for a multi-modules build.license:license-list
Display all available licenses.license:update-file-header
Updates the license header of the current project source files.license:check-file-header
Checks the license header of the current project source files.license:remove-file-header
Remove any license header of the current project source files.license:update-project-license
Updates (or creates) the main project license file according to the license defined in the licenseName parameter.
Reports Overview
The following goals are meant to participate in the site build lifecycle as reports:
license:third-party-report
Generates the third-party report of the given maven project.license:aggregate-third-party-report
Generates the aggregate third-party report of the given maven project (collect dependencies of all his childs).
Usage
General instructions on how to use the License Plugin can be found on the usage page. Some more specific use cases are described in the examples given below.
In case you still have questions regarding the plugin's usage, please have a look at the FAQ and feel free to contact the user mailing list. The posts to the mailing list are archived and could already contain the answer to your question as part of an older thread. Hence, it is also worth browsing/searching the mail archive.
If you feel like the plugin is missing a feature or has a defect, you can fill a feature request or bug report in our issue tracker. When creating a new issue, please provide a comprehensive description of your concern. Especially for fixing bugs it is crucial that the developers can reproduce your problem. For this reason, entire debug logs, POMs or most preferably little demo projects attached to the issue are very much appreciated. Of course, patches are welcome, too. Contributors can check out the project from our source repository and will find supplementary information in the development guidelines.
Examples
To provide you with better understanding of some usages of the License Plugin, you can take a look at the following examples: