Fork me on GitHub

license:remove-file-header

Full name:

org.codehaus.mojo:license-maven-plugin:2.4.0:remove-file-header

Description:

The goal to remove the header on project source files.

Attributes:

  • Requires a Maven project to be executed.
  • The goal is thread-safe and supports parallel builds.
  • Since version: 1.11.

Required Parameters

Name Type Since Description
<inceptionYear> Integer 1.0 Inception year of the project.

Will be used as first year of copyright section in new header.


Default: ${project.inceptionYear}
User Property: license.inceptionYear
<organizationName> String 1.0 Name of project's organization.

Will be used as copyright's holder in new header.


Default: ${project.organization.name}
User Property: license.organizationName
<projectName> String 1.0 Name of project (or module).

Will be used as description section of new header.


Default: ${project.name}
User Property: license.projectName

Optional Parameters

Name Type Since Description
<copyrightOwners> String 1.6 optional copyright owners.

If not set, organizationName parameter will be used instead.


User Property: license.copyrightOwners
<copyrightStringFormat> String 2.1.0 optional copyright string format

If not set, "Copyright (C) %1$s %2$s" is used where the copyright dates are substituted for $1 and the copyright holder for $2.


User Property: license.copyrightStringFormat
<dryRun> boolean 1.11 A flag to test plugin but modify no file.
Default: false
User Property: dryRun
<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: ${project.build.sourceEncoding}
User Property: license.encoding
<excludes> String[] 1.11 Specific files to excludes, separated by a comma. By default, those file types are excluded:
  • modelisation
  • images

User Property: license.excludes
<extraExtensions> Map<String,String> 1.11 To associate extra extension files to an existing comment style.

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

For example, to treat 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>
<extraFiles> Map<String,String> 1.11 To associate extra files to an existing comment style.

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

For example, to treat a file named DockerFile as properties files (says using the properties comment style, declare this in your plugin configuration :

<extraFiles>
<DockerFile>properties</DockerFile>
</extraFiles>
<extraTemplateParameters> Map<String,String> 1.6 optional extra templates parameters.

If filled, they are available with prefix extra_ to process license content (says the header and license content).

<ignoreLastDate> boolean 2.3.0 Ignore the last date for copyright year range.
Default: false
User Property: license.ignoreLastDate
<ignoreNoFileToScan> boolean 1.11 A flag to ignore no files to scan.

This flag will suppress the "No file to scan" warning. This will allow you to set the plug-in in the root pom of your project without getting a lot of warnings for aggregation modules / artifacts.


Default: false
User Property: license.ignoreNoFileToScan
<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


User Property: license.ignoreTag
<includes> String[] 1.11 Specific files to includes, separated by a comma. By default, it is "** /*".
User Property: license.includes
<keepBackup> boolean 1.0 A flag to keep a backup of every modified file.
Default: false
User Property: license.keepBackup
<licenseName> String 1.0 Name of the license to use in the project.
User Property: license.licenseName
<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).

Note: If you want to refer to a file within this project, start the expression with ${project.baseUri}


User Property: license.licenseResolver
<roots> String[] 1.11 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.


User Property: license.roots
<skipRemoveLicense> boolean 1.11 A flag to skip the goal.
Default: false
User Property: license.skipRemoveLicense
<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: ${maven.verbose}
User Property: license.verbose

Parameter Details

<copyrightOwners>

optional copyright owners.

If not set, organizationName parameter will be used instead.

  • Type: java.lang.String
  • Since: 1.6
  • Required: report.plugin.goal.no
  • User Property: license.copyrightOwners

<copyrightStringFormat>

optional copyright string format

If not set, "Copyright (C) %1$s %2$s" is used where the copyright dates are substituted for $1 and the copyright holder for $2.

  • Type: java.lang.String
  • Since: 2.1.0
  • Required: report.plugin.goal.no
  • User Property: license.copyrightStringFormat

<dryRun>

A flag to test plugin but modify no file.
  • Type: boolean
  • Since: 1.11
  • Required: report.plugin.goal.no
  • User Property: 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: report.plugin.goal.no
  • User Property: license.encoding
  • Default: ${project.build.sourceEncoding}

<excludes>

Specific files to excludes, separated by a comma. By default, those file types are excluded:
  • modelisation
  • images
  • Type: java.lang.String[]
  • Since: 1.11
  • Required: report.plugin.goal.no
  • User Property: license.excludes

<extraExtensions>

To associate extra extension files to an existing comment style.

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

For example, to treat 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>
  • Type: java.util.Map<java.lang.String, java.lang.String>
  • Since: 1.11
  • Required: report.plugin.goal.no

<extraFiles>

To associate extra files to an existing comment style.

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

For example, to treat a file named DockerFile as properties files (says using the properties comment style, declare this in your plugin configuration :

<extraFiles>
<DockerFile>properties</DockerFile>
</extraFiles>
  • Type: java.util.Map<java.lang.String, java.lang.String>
  • Since: 1.11
  • Required: report.plugin.goal.no

<extraTemplateParameters>

optional extra templates parameters.

If filled, they are available with prefix extra_ to process license content (says the header and license content).

  • Type: java.util.Map<java.lang.String, java.lang.String>
  • Since: 1.6
  • Required: report.plugin.goal.no

<ignoreLastDate>

Ignore the last date for copyright year range.
  • Type: boolean
  • Since: 2.3.0
  • Required: report.plugin.goal.no
  • User Property: license.ignoreLastDate
  • Default: false

<ignoreNoFileToScan>

A flag to ignore no files to scan.

This flag will suppress the "No file to scan" warning. This will allow you to set the plug-in in the root pom of your project without getting a lot of warnings for aggregation modules / artifacts.

  • Type: boolean
  • Since: 1.11
  • Required: report.plugin.goal.no
  • User Property: license.ignoreNoFileToScan
  • Default: false

<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: report.plugin.goal.no
  • User Property: license.ignoreTag

<inceptionYear>

Inception year of the project.

Will be used as first year of copyright section in new header.

  • Type: java.lang.Integer
  • Since: 1.0
  • Required: report.plugin.goal.yes
  • User Property: license.inceptionYear
  • Default: ${project.inceptionYear}

<includes>

Specific files to includes, separated by a comma. By default, it is "** /*".
  • Type: java.lang.String[]
  • Since: 1.11
  • Required: report.plugin.goal.no
  • User Property: license.includes

<keepBackup>

A flag to keep a backup of every modified file.
  • Type: boolean
  • Since: 1.0
  • Required: report.plugin.goal.no
  • User Property: license.keepBackup
  • Default: false

<licenseName>

Name of the license to use in the project.
  • Type: java.lang.String
  • Since: 1.0
  • Required: report.plugin.goal.no
  • User Property: license.licenseName

<licenseResolver>

To specify an external extra licenses repository resolver (says the base url of the repository where the license.properties is present).

Note: If you want to refer to a file within this project, start the expression with ${project.baseUri}

  • Type: java.lang.String
  • Since: 1.0
  • Required: report.plugin.goal.no
  • User Property: license.licenseResolver

<organizationName>

Name of project's organization.

Will be used as copyright's holder in new header.

  • Type: java.lang.String
  • Since: 1.0
  • Required: report.plugin.goal.yes
  • User Property: license.organizationName
  • Default: ${project.organization.name}

<projectName>

Name of project (or module).

Will be used as description section of new header.

  • Type: java.lang.String
  • Since: 1.0
  • Required: report.plugin.goal.yes
  • User Property: 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.

  • Type: java.lang.String[]
  • Since: 1.11
  • Required: report.plugin.goal.no
  • User Property: license.roots

<skipRemoveLicense>

A flag to skip the goal.
  • Type: boolean
  • Since: 1.11
  • Required: report.plugin.goal.no
  • User Property: license.skipRemoveLicense
  • 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: report.plugin.goal.no
  • User Property: license.verbose
  • Default: ${maven.verbose}