helper:transform-project-version

Full name:

org.nuiton:helper-maven-plugin:2.3.2:transform-project-version

Description:

Transform the version of the project and store it in a project property.

Attributes:

  • Requires a Maven project to be executed.
  • Executes as an aggregator plugin.
  • Since version: 2.0.
  • Binds by default to the lifecycle phase: initialize.

Required Parameters

Name Type Since Description
revision String 2.0 Scm revision to use.
User property is: helper.revision.
versionKey String 2.0 The project property where to store the version.
Default value is: newVersion.
User property is: helper.versionKey.

Optional Parameters

Name Type Since Description
newVersionPattern String 2.0 Pattern of the new version. Use #V for project version (without snapshot suffix) and #R for the given scm revision and #S to add snapshot suffix Example:
#V-rev-#V -> 1.0-rev-1 (version=1.0 and revision=1)
#V-rev-#V#S -> 1.0-rev-1-SNAPSHOT (version=1.0 and revision=1)
#V-rev-#V#S -> 1.0-rev-1-SNAPSHOT (version=1.0-SNAPSHOT and revision=1)
Note that the #S can only be putted at the end of the pattern
Default value is: #V-rev-#R.
User property is: helper.newVersionPattern.
runOnce boolean 1.1.0 A flag to execute only once the mojo. Note: By default, value is true since it is not necessary to inject twice secrets in session.
Default value is: true.
User property is: helper.runOnce.
verbose boolean 2.0 A flag to activate verbose mode.
Default value is: ${maven.verbose}.
User property is: helper.verbose.

Parameter Details

newVersionPattern:

Pattern of the new version. Use #V for project version (without snapshot suffix) and #R for the given scm revision and #S to add snapshot suffix Example:
#V-rev-#V -> 1.0-rev-1 (version=1.0 and revision=1)
#V-rev-#V#S -> 1.0-rev-1-SNAPSHOT (version=1.0 and revision=1)
#V-rev-#V#S -> 1.0-rev-1-SNAPSHOT (version=1.0-SNAPSHOT and revision=1)
Note that the #S can only be putted at the end of the pattern
  • Type: java.lang.String
  • Since: 2.0
  • Required: No
  • User Property: helper.newVersionPattern
  • Default: #V-rev-#R

revision:

Scm revision to use.
  • Type: java.lang.String
  • Since: 2.0
  • Required: Yes
  • User Property: helper.revision

runOnce:

A flag to execute only once the mojo. Note: By default, value is true since it is not necessary to inject twice secrets in session.
  • Type: boolean
  • Since: 1.1.0
  • Required: No
  • User Property: helper.runOnce
  • Default: true

verbose:

A flag to activate verbose mode.
  • Type: boolean
  • Since: 2.0
  • Required: No
  • User Property: helper.verbose
  • Default: ${maven.verbose}

versionKey:

The project property where to store the version.
  • Type: java.lang.String
  • Since: 2.0
  • Required: Yes
  • User Property: helper.versionKey
  • Default: newVersion