Why make donate

license:update-project-license

Nom complet :

org.nuiton:maven-license-plugin:3.0:update-project-license

Description :

Updates (or creates) the main project license file according to the given license defines as licenseName.

Can also generate a bundled license file (to avoid collision names in class-path). This file is by default generated in META-INF class-path directory.

Note: this goal replace add-license one (which does not use license project descriptor).

Attributs :

  • Exige un projet Maven 2.0 pour être exécuté.
  • Depuis la version : 2.1.
  • S'associe par défaut dans la phase du cycle de vie : generate-resources.

Paramètres requis

Nom Type Depuis Description
encoding String 2.1 Encoding used to read and writes files.

Note: If nothing is filled here, we will use the system property file.encoding.
Valeur par défaut est : ${project.build.sourceEncoding}.
licenseFile File 2.1 Project license file to synchronize with main license defined in descriptor file.
Valeur par défaut est : ${basedir}/LICENSE.txt.
project MavenProject 2.1 The reacted project.
Valeur par défaut est : ${project}.

Paramètres optionnels

Nom Type Depuis Description
bundleLicensePath String 2.1 The path of the bundled license file to produce when generateBundle is on.

Note: This option is not available for pom module types.
Valeur par défaut est : META-INF/${project.artifactId}-LICENSE.txt.
force boolean 1.0.0 A flag to force to generate project license file even if it is up-to-date.
Valeur par défaut est : false.
generateBundle boolean 2.1 A flag to copy the main license file in a bundled place.

This is usefull for final application to have a none confusing location to seek for the application license.

If Sets to true, will copy the license file to the bundleLicensePath to outputDirectory.

Note: This option is not available for pom module types.
Valeur par défaut est : false.
keepBackup boolean 2.1 A flag to keep a backup of every modified file.
Valeur par défaut est : false.
licenseName String 2.4 Name of the license to use in the project.
licenseResolver String 2.1 To specify an external extra licenses repository resolver (says the base url of the repository where the license.properties is present).
outputDirectory File 2.1 The directory where to generate license resources.

Note: This option is not available for pom module types.
Valeur par défaut est : target/generated-sources/license.
skipUpdateProjectLicense boolean 2.1 A flag to skip the goal.
Valeur par défaut est : false.
verbose boolean 2.1 Flag to activate verbose mode.

Note: Verbose mode is always on if you starts a debug maven instance (says via -X).
Valeur par défaut est : ${maven.verbose}.

Détails des paramètres

bundleLicensePath :

The path of the bundled license file to produce when generateBundle is on.

Note: This option is not available for pom module types.
  • Type : java.lang.String
  • Depuis : 2.1
  • Exigé : Non
  • Expression : ${license.bundleLicensePath}
  • Défaut : META-INF/${project.artifactId}-LICENSE.txt

encoding :

Encoding used to read and writes files.

Note: If nothing is filled here, we will use the system property file.encoding.
  • Type : java.lang.String
  • Depuis : 2.1
  • Exigé : Oui
  • Expression : ${license.encoding}
  • Défaut : ${project.build.sourceEncoding}

force :

A flag to force to generate project license file even if it is up-to-date.
  • Type : boolean
  • Depuis : 1.0.0
  • Exigé : Non
  • Expression : ${license.force}
  • Défaut : false

generateBundle :

A flag to copy the main license file in a bundled place.

This is usefull for final application to have a none confusing location to seek for the application license.

If Sets to true, will copy the license file to the bundleLicensePath to outputDirectory.

Note: This option is not available for pom module types.
  • Type : boolean
  • Depuis : 2.1
  • Exigé : Non
  • Expression : ${license.generateBundle}
  • Défaut : false

keepBackup :

A flag to keep a backup of every modified file.
  • Type : boolean
  • Depuis : 2.1
  • Exigé : Non
  • Expression : ${license.keepBackup}
  • Défaut : false

licenseFile :

Project license file to synchronize with main license defined in descriptor file.
  • Type : java.io.File
  • Depuis : 2.1
  • Exigé : Oui
  • Expression : ${license.licenceFile}
  • Défaut : ${basedir}/LICENSE.txt

licenseName :

Name of the license to use in the project.
  • Type : java.lang.String
  • Depuis : 2.4
  • Exigé : Non
  • Expression : ${license.licenseName}

licenseResolver :

To specify an external extra licenses repository resolver (says the base url of the repository where the license.properties is present).
  • Type : java.lang.String
  • Depuis : 2.1
  • Exigé : Non
  • Expression : ${license.licenseResolver}

outputDirectory :

The directory where to generate license resources.

Note: This option is not available for pom module types.
  • Type : java.io.File
  • Depuis : 2.1
  • Exigé : Non
  • Expression : ${license.outputDirectory}
  • Défaut : target/generated-sources/license

project :

The reacted project.
  • Type : org.apache.maven.project.MavenProject
  • Depuis : 2.1
  • Exigé : Oui
  • Défaut : ${project}

skipUpdateProjectLicense :

A flag to skip the goal.
  • Type : boolean
  • Depuis : 2.1
  • Exigé : Non
  • Expression : ${license.skipUpdateProjectLicense}
  • Défaut : false

verbose :

Flag to activate verbose mode.

Note: Verbose mode is always on if you starts a debug maven instance (says via -X).
  • Type : boolean
  • Depuis : 2.1
  • Exigé : Non
  • Expression : ${license.verbose}
  • Défaut : ${maven.verbose}
Maven JRst ReStructuredText