Child pages
  • maven-notice-plugin
Skip to end of metadata
Go to start of metadata

Description

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.

Plugin Goals

  • 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.

Features

  • 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.

More information

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.

License Mappings

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.

NOTICE Template

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:

Copyright 2010, JA-SIG, Inc.
This project includes software developed by Jasig.
http://www.jasig.org/

Licensed under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at:

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on
an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.

This project includes:
#GENERATED_NOTICES#

With the NOTICE template for this plugin which includes source files from another project:

Copyright 2010, JA-SIG, Inc.
This project includes software developed by Jasig.
http://www.jasig.org/

Licensed under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at:

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on
an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.

This project includes:
#GENERATED_NOTICES#

This project also includes code under copywrite of the following entities:
  http://code.google.com/p/maven-license-plugin/


Project Details

Current Version

1.0.4

Author(s)

Eric Dalquist

Issue Tracking

 

Release Docs

Maven Site

Download Source

Maven

Current Adopters

  • Jasig projects using Maven
  • No labels