Usage

Sample plug-in configuration:

				<plugins>
				    <plugin>
				        <groupId>com.puresol.maven.plugins</groupId>
				        <artifactId>license-plugin</artifactId>
				        <version>1.2.0</version>
				        <configuration>
				            <recursive>true</recursive>
				            <skipTestScope>true</skipTestScope>
				            <skipProvidedScope>true</skipProvidedScope>
				            <skipOptionals>true</skipOptionals>
				            <knownLicenses>
				                <knownLicense>
				                    <name>PureSol Technologies Commercial License</name>
				                    <url>http://puresol-technologies.com</url>
				                </knownLicense>
				                <!-- Apache License -->
				                <knownLicense>v
				                    <name>Apache License, Version 2.0</name>
				                    <url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
				                    <aliases>
				                        <alias>Apache 2</alias>
				                        <alias>Apache License</alias>
				                        <alias>Apache License 2.0</alias>
				                        <alias>Apache License Version 2.0</alias>
				                        <alias>Apache Software License - Version 2.0</alias>
				                        <alias>The Apache Software License, Version 2.0</alias>
				                    </aliases>
				                    <approvedDependencies>
				                        <approvedDependency>commons-beanutils:commons-beanutils:1\.7\.0</approvedDependency>
				                        <approvedDependency>commons-codec:commons-codec:1\.2</approvedDependency>
				                        <approvedDependency>commons-logging:commons-logging:1\.0\.3</approvedDependency>
				                        <approvedDependency>log4j:log4j:1\.2\.12</approvedDependency>
				                        <approvedDependency>org\.apache.*:.*:.*</approvedDependency>
				                    </approvedDependencies>
				                </knownLicense>
				            </knownLicenses>
				        </configuration>
				    </plugin>
				</plugins>
			

Explanation for the different settings:

Parameters for Configuration
Parameter Type Default Value Description
<recursive> (true/false) true Define whether or not the dependencies are checked recursively. That means, not only the dependencies are checked, but also their dependencies.
<skipTestScope> (true/false) true Define whether or not the dependencies in test scope should skipped.
<skipProvidedScope> (true/false) true Define whether or not the dependencies in provided scope should skipped.
<skipOptionals> (true/false) true Define whether or not optional dependencies should skipped.
<knownLicenses> (List) Define with <knownLicense> the licenses which are known to the project.
<name> String Specifies the official name of the license.
<url> URL Specifies an URL where the license text can be found.
<aliases> (List) empty Define with <alias> alternative names of the license. In some dependencies the original name of the license may be altered, simplified or shortened.
<approvedDependencies> (List) empty Define with <approvedDependency> which artifacts were checked manually (for example on webpage) to have a valid license. This is used for dependencies which do not have a license information set in their pom.xml. The string for specification has three parts separated by colon. These parts contain regular expressions for artifactId, groupId and version.

For a real world example, have a look into the parent pom.xml of i18n4java project: https://github.com/RickRainerLudwig/i18n4java