license:update-file-header

Full name:

org.kuali.maven.plugins:license-maven-plugin:1.0-kuali-SNAPSHOT: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.

Attributes:

  • Requires a Maven project to be executed.
  • Since version: 1.0.

Required Parameters

Name Type Since Description
inceptionYear String 1.0 Inception year of the project.

Will be used as first year of copyright section in new header.
Default value is: ${project.inceptionYear}.
organizationName String 1.0 Name of project's organization.

Will be used as copyrigth's holder in new header.
Default value is: ${project.organization.name}.
project MavenProject 1.0 The reacted project.
Default value is: ${project}.
projectName String 1.0 Name of project (or module).

Will be used as description section of new header.
Default value is: ${project.name}.

Optional Parameters

Name Type Since Description
addSvnKeyWords boolean 1.0 A flag to add svn:keywords on new header.

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

Default value is: false.
canUpdateCopyright boolean 1.0 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).
Default value is: false.
canUpdateDescription boolean 1.0 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).
Default value is: false.
canUpdateLicense boolean 1.0 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.
Default value is: true.
clearAfterOperation boolean 1.0 A flag to clear everything after execution.

Note: This property should ONLY be used for test purpose.
Default value is: true.
dryRun boolean 1.0 A flag to test plugin but modify no file.
Default value is: false.
encoding String 1.0 Encoding used to read and writes files.

Note: If nothing is filled here, we will use the system property file.encoding.
Default value is: ${project.build.sourceEncoding}.
excludes String[] 1.0 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 1.0 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 1.0 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[] 1.0 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 1.0 A flag to keep a backup of every modified file.
Default value is: false.
licenseName String 1.0 Name of the license to use in the project.
licenseResolver String 1.0 To specify an external extra licenses repository resolver (says the base url of the repository where the license.properties is present).
roots String[] 1.0 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 1.0 A flag to skip the goal.
Default value is: false.
updateCopyright boolean 1.0 A flag to update copyright application time (change copyright last year if required) according to the last commit made on the processed file.

Note that this functionnality is still not effective.
Default value is: false.
verbose boolean 1.0 Flag to activate verbose mode.

Note: Verbose mode is always on if you starts a debug maven instance (says via -X).
Default value is: ${maven.verbose}.

Parameter Details

addSvnKeyWords:

A flag to add svn:keywords on new header.

Will add svn keywords :
Author, Id, Rev, URL and Date
  • Type: boolean
  • Since: 1.0
  • Required: No
  • Expression: ${license.addSvnKeyWords}
  • Default: 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
  • Since: 1.0
  • Required: No
  • Expression: ${license.canUpdateCopyright}
  • Default: 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
  • Since: 1.0
  • Required: No
  • Expression: ${license.canUpdateDescription}
  • Default: 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
  • Since: 1.0
  • Required: No
  • Expression: ${license.canUpdateLicense}
  • Default: true

clearAfterOperation:

A flag to clear everything after execution.

Note: This property should ONLY be used for test purpose.
  • Type: boolean
  • Since: 1.0
  • Required: No
  • Expression: ${license.clearAfterOperation}
  • Default: true

dryRun:

A flag to test plugin but modify no file.
  • Type: boolean
  • Since: 1.0
  • Required: No
  • Expression: ${dryRun}
  • Default: 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
  • Since: 1.0
  • Required: No
  • Expression: ${license.encoding}
  • Default: ${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[]
  • Since: 1.0
  • Required: No
  • 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
  • Since: 1.0
  • Required: No

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
  • Since: 1.0
  • Required: No
  • 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
  • Since: 1.0
  • Required: Yes
  • Expression: ${license.inceptionYear}
  • Default: ${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[]
  • Since: 1.0
  • Required: No
  • Expression: ${license.includes}

keepBackup:

A flag to keep a backup of every modified file.
  • Type: boolean
  • Since: 1.0
  • Required: No
  • Expression: ${license.keepBackup}
  • Default: false

licenseName:

Name of the license to use in the project.
  • Type: java.lang.String
  • Since: 1.0
  • Required: No
  • 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
  • Since: 1.0
  • Required: No
  • Expression: ${license.licenseResolver}

organizationName:

Name of project's organization.

Will be used as copyrigth's holder in new header.
  • Type: java.lang.String
  • Since: 1.0
  • Required: Yes
  • Expression: ${license.organizationName}
  • Default: ${project.organization.name}

project:

The reacted project.
  • Type: org.apache.maven.project.MavenProject
  • Since: 1.0
  • Required: Yes
  • Default: ${project}

projectName:

Name of project (or module).

Will be used as description section of new header.
  • Type: java.lang.String
  • Since: 1.0
  • Required: Yes
  • Expression: ${license.projectName}
  • Default: ${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[]
  • Since: 1.0
  • Required: No
  • Expression: ${license.roots}

skipUpdateLicense:

A flag to skip the goal.
  • Type: boolean
  • Since: 1.0
  • Required: No
  • Expression: ${license.skipUpdateLicense}
  • Default: 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.

Note that this functionnality is still not effective.
  • Type: boolean
  • Since: 1.0
  • Required: No
  • Expression: ${license.updateCopyright}
  • Default: 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
  • Since: 1.0
  • Required: No
  • Expression: ${license.verbose}
  • Default: ${maven.verbose}