Handling of project and 3rd party licenses
You can use the Maven-License-Plugin to help you handle licenses consistently in your project. The plugin provides functionlity for:
- Including license information in your distributable.This is a requirement in many of the open source licenses.
Note: This can also be accomplished without using the plugin by adding a LICENSE:* in the root folder of your project, containing the license information for your project, see assemply plugin for details. - Include license information in source files.
- Include license information for the 3rd party components included in your distributable: This is often a requirement for using the 3rd party components. This information is also helpful in determining if you have included any components with dangerous licenses in your distribution.
Example configuration
<plugins> <plugin> <groupId>org.nuiton</groupId> <artifactId>maven-license-plugin</artifactId> <version>2.4</version> <configuration> <verbose>false</verbose> <addSvnKeyWords>true</addSvnKeyWords> </configuration> <executions> <execution> <id>first</id> <goals> <goal>update-file-header</goal> </goals> <phase>process-sources</phase> <configuration> <licenseName>gpl_v3</licenseName> <roots> <root>src/main/java</root> <root>src/test</root> </roots> </configuration> </execution> </executions> </plugin> </plugins>