Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3
Section
Column
width60%

Description

Excerpt

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.

Code Block
typexml
<plugin>
  <groupId>org.jasig.maven</groupId>
  <artifactId>maven-notice-plugin</artifactId>
  <version>1.0.4</version>
  <configuration>
    <noticeTemplate>https://source.jasig.org/licenses/NOTICE.template</noticeTemplate>

    <licenseMapping>
      <param>https://source.jasig.org/licenses/license-mappings.xml</param>
    </licenseMapping>
  </configuration>
</plugin>

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:

No Format
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:

No Format
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/
Column
width5%

Column


Project Details

Current Version

1.0.4

Author(s)

~edalquist Eric Dalquist

Issue Tracking

 

Release Docs

Maven Site

Download Source

Maven

Current Adopters

  • Jasig projects using Maven