build-helper:jar-license

Full name:

com.github.robtimus:build-helper-maven-plugin:1.1.1:jar-license

Description:

Add a license file to created JAR files and, if applicable, source JAR files.

License files are first resolved relative to the current directory. If it cannot be found there, parent directories are checked until one of the following occurs:

  • The parent directory is not part of the Maven project (does not contain a pom.xml file), and is not the root directory of the current Git project.
  • The maximum number of parent directories has been reached.

Attributes:

  • Requires a Maven project to be executed.
  • The goal is thread-safe and supports parallel builds.
  • Binds by default to the lifecycle phase: generate-resources.

Required Parameters

Name Type Since Description
<licenseFilename> String 1.0 The name of the license file.
Default value is: LICENSE.txt.
<maxParentCount> int 1.0 The maximum number of parent directories to check. This allows locating the license file to abort early if it could not be found.
Default value is: 0.

Optional Parameters

Name Type Since Description
<skipLicense> boolean 1.0 Set this to true to skip adding licenses to JAR files.
Default value is: false.
User property is: robtimus.license.skip.

Parameter Details

<licenseFilename>

The name of the license file.
  • Type: java.lang.String
  • Since: 1.0
  • Required: Yes
  • Default: LICENSE.txt

<maxParentCount>

The maximum number of parent directories to check. This allows locating the license file to abort early if it could not be found.
  • Type: int
  • Since: 1.0
  • Required: Yes
  • Default: 0

<skipLicense>

Set this to true to skip adding licenses to JAR files.
  • Type: boolean
  • Since: 1.0
  • Required: No
  • User Property: robtimus.license.skip
  • Default: false