Why make donate

license:update-file-header

Nom complet :

org.nuiton:maven-license-plugin:3.0:update-file-header

Description :

The goal to update (or add) the header on project source files.

This goal replace the update-header goal which can not deal with Copyright.

This goal use a specific project file descriptor project.xml to describe all files to update for a whole project.

Attributs :

  • Exige un projet Maven 2.0 pour être exécuté.
  • Depuis la version : 2.1.

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}.
inceptionYear String 2.1 Inception year of the project.

Will be used as first year of copyright section in new header.
Valeur par défaut est : ${project.inceptionYear}.
organizationName String 2.1 Name of project's organization.

Will be used as copyrigth's holder in new header.
Valeur par défaut est : ${project.organization.name}.
project MavenProject 2.1 The reacted project.
Valeur par défaut est : ${project}.
projectName String 2.1 Name of project (or module).

Will be used as description section of new header.
Valeur par défaut est : ${project.name}.

Paramètres optionnels

Nom Type Depuis Description
addSvnKeyWords boolean 2.1 A flag to add svn:keywords on new header.

Will add svn keywords :
Author, Id, Rev, URL and Date

Valeur par défaut est : false.
canUpdateCopyright boolean 2.3.2 A flag to authorize update of the copyright part of the header.

Note: By default, do NOT authorize it since copyright part should be handled by developpers (holder can change on each file for example).
Valeur par défaut est : false.
canUpdateDescription boolean 2.3.2 A flag to authorize update of the description part of the header.

Note: By default, do NOT authorize it since description can change on each file).
Valeur par défaut est : false.
canUpdateLicense boolean 2.3.2 A flag to authorize update of the license part of the header.

Note: By default, authorize it since license part should always be generated by the plugin.
Valeur par défaut est : true.
clearAfterOperation boolean 2.1 A flag to clear everything after execution.

Note: This property should ONLY be used for test purpose.
Valeur par défaut est : true.
dryRun boolean 2.1 A flag to test plugin but modify no file.
Valeur par défaut est : false.
excludes String[] 2.4 Specific files to excludes, separated by a comma. By default, thoses file type are excluded:
  • modelisation
  • images

Note: This parameter is not useable if you are still using a project file descriptor.
extraExtensions Map 2.4.1 To associate extra extension files to an existing comment style.

Keys of the map are the extension of extra files to treate, and the value is the comment style you want to associate.

For example, to treate file with extensions java2 and jdata as java files (says using the java comment style, declare this in your plugin configuration :
<extraExtensions>
<java2>java</java2>
<jdata>java</jdata>
</extraExtensions>

Note: This parameter is not useable if you are still using a project file descriptor.
ignoreTag String 2.1 A tag to place on files that will be ignored by the plugin.

Sometimes, it is necessary to do this when file is under a specific license.

Note: If no sets, will use the default tag %%Ignore-License
includes String[] 2.4 Specific files to includes, separated by a comma. By default, it is "** /*".

Note: This parameter is not useable if you are still using a project file descriptor.
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).
roots String[] 2.4 To specify the base dir from which we apply the license.

Should be on form "root1,root2,rootn".

By default, the main roots are "src, target/generated-sources, target/processed-sources".

Note: If some of these roots do not exist, they will be simply ignored.

Note: This parameter is not useable if you are still using a project file descriptor.
skipUpdateLicense boolean 2.1 A flag to skip the goal.
Valeur par défaut est : false.
updateCopyright boolean 2.1 A flag to update copyright application time (change copyright last year if required) according to the last commit made on the processed file.
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

addSvnKeyWords :

A flag to add svn:keywords on new header.

Will add svn keywords :
Author, Id, Rev, URL and Date
  • Type : boolean
  • Depuis : 2.1
  • Exigé : Non
  • Expression : ${license.addSvnKeyWords}
  • Défaut : false

canUpdateCopyright :

A flag to authorize update of the copyright part of the header.

Note: By default, do NOT authorize it since copyright part should be handled by developpers (holder can change on each file for example).
  • Type : boolean
  • Depuis : 2.3.2
  • Exigé : Non
  • Expression : ${license.canUpdateCopyright}
  • Défaut : false

canUpdateDescription :

A flag to authorize update of the description part of the header.

Note: By default, do NOT authorize it since description can change on each file).
  • Type : boolean
  • Depuis : 2.3.2
  • Exigé : Non
  • Expression : ${license.canUpdateDescription}
  • Défaut : false

canUpdateLicense :

A flag to authorize update of the license part of the header.

Note: By default, authorize it since license part should always be generated by the plugin.
  • Type : boolean
  • Depuis : 2.3.2
  • Exigé : Non
  • Expression : ${license.canUpdateLicense}
  • Défaut : true

clearAfterOperation :

A flag to clear everything after execution.

Note: This property should ONLY be used for test purpose.
  • Type : boolean
  • Depuis : 2.1
  • Exigé : Non
  • Expression : ${license.clearAfterOperation}
  • Défaut : true

dryRun :

A flag to test plugin but modify no file.
  • Type : boolean
  • Depuis : 2.1
  • Exigé : Non
  • Expression : ${dryRun}
  • Défaut : false

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}

excludes :

Specific files to excludes, separated by a comma. By default, thoses file type are excluded:
  • modelisation
  • images

Note: This parameter is not useable if you are still using a project file descriptor.
  • Type : java.lang.String[]
  • Depuis : 2.4
  • Exigé : Non
  • Expression : ${license.excludes}

extraExtensions :

To associate extra extension files to an existing comment style.

Keys of the map are the extension of extra files to treate, and the value is the comment style you want to associate.

For example, to treate file with extensions java2 and jdata as java files (says using the java comment style, declare this in your plugin configuration :
<extraExtensions>
<java2>java</java2>
<jdata>java</jdata>
</extraExtensions>

Note: This parameter is not useable if you are still using a project file descriptor.
  • Type : java.util.Map
  • Depuis : 2.4.1
  • Exigé : Non

ignoreTag :

A tag to place on files that will be ignored by the plugin.

Sometimes, it is necessary to do this when file is under a specific license.

Note: If no sets, will use the default tag %%Ignore-License
  • Type : java.lang.String
  • Depuis : 2.1
  • Exigé : Non
  • Expression : ${license.ignoreTag}

inceptionYear :

Inception year of the project.

Will be used as first year of copyright section in new header.
  • Type : java.lang.String
  • Depuis : 2.1
  • Exigé : Oui
  • Expression : ${license.inceptionYear}
  • Défaut : ${project.inceptionYear}

includes :

Specific files to includes, separated by a comma. By default, it is "** /*".

Note: This parameter is not useable if you are still using a project file descriptor.
  • Type : java.lang.String[]
  • Depuis : 2.4
  • Exigé : Non
  • Expression : ${license.includes}

keepBackup :

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

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}

organizationName :

Name of project's organization.

Will be used as copyrigth's holder in new header.
  • Type : java.lang.String
  • Depuis : 2.1
  • Exigé : Oui
  • Expression : ${license.organizationName}
  • Défaut : ${project.organization.name}

project :

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

projectName :

Name of project (or module).

Will be used as description section of new header.
  • Type : java.lang.String
  • Depuis : 2.1
  • Exigé : Oui
  • Expression : ${license.projectName}
  • Défaut : ${project.name}

roots :

To specify the base dir from which we apply the license.

Should be on form "root1,root2,rootn".

By default, the main roots are "src, target/generated-sources, target/processed-sources".

Note: If some of these roots do not exist, they will be simply ignored.

Note: This parameter is not useable if you are still using a project file descriptor.
  • Type : java.lang.String[]
  • Depuis : 2.4
  • Exigé : Non
  • Expression : ${license.roots}

skipUpdateLicense :

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

updateCopyright :

A flag to update copyright application time (change copyright last year if required) according to the last commit made on the processed file.
  • Type : boolean
  • Depuis : 2.1
  • Exigé : Non
  • Expression : ${license.updateCopyright}
  • 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