A Maven plugin used to generate Apache style NOTICE files based on the project's declared dependencies. The plugin can also verify the NOTICE file for a project is correct and fail the build if it is not.
- notice:check - Checks that a NOTICE file exists and that its content match what would be generated.
- notice:generate - Generates a new NOTICE file, replacing any existing NOTICE file.
- Uses library name and license information provided by each dependencies pom.
- Multiple lookup files in both local and remote locations for resolving license information for dependencies whose poms are missing information.
- Multi-module project support in a variety of approaches including aggregation of NOTICE information into a single file or per-module NOTICE generation.
- Template NOTICE file allowing customized additional content in the NOTICE.
Example Plugin Configuration
In the project pom.xml add the notice plugin. The configuration below is what is used in the jasig-parent pom and should automatically be inherited by all Jasig Maven projects. This example uses a custom NOTICE template file for generation and a license mapping XML file to lookup license information about poorly defined dependencies.
The plugin provides the license-lookup-v1.0.xsd schema which defines a simple XML format for providing license information for Maven artifacts that don't have license information defined in the artifact's pom. Multiple license lookup files can be configured and they are checked in-order for matching information.
Jasig committers are encouraged to maintain https://source.jasig.org/licenses/license-mappings.xml in SVN. Adding mappings for poorly defined artifacts will benefit all Jasig projects.
The plugin uses a simple token replacement strategy for generating the NOTICE file. This allows projects to use a custom NOTICE template to include additional information about licenses for included source code or other resources not defined as maven dependencies.
For an example of this usage compare the default Jasig template:
With the NOTICE template for this plugin which includes source files from another project: