Full name:

com.smartcodeltd:release-candidate-maven-plugin:1.0-201910011043.383523b:updateVersion

Description:

Updates the pom.xml project version as per the configured releaseVersionFormat template.

The original structure of the pom.xml file is preserved when the file is updated (including the comments, whitespace, formatting, etc.), so that the only thing that changes is the version number.

Attributes:

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

Optional Parameters

releaseVersionFormat String -

Describes how the pom.xml project version should be expanded into a new version number.

For example, assume:

  • that pom.xml project version is set to 1.2.0-beta-SNAPSHOT
  • and that the current date is 2015-08-01

Below table depicts the relationship between the releaseVersionFormat and what project version gets expanded into when release-candidate:updateVersion is called:

releaseVersionFormat Result Outcome
{{ version }} 1.2.0-beta-SNAPSHOT Full version number, as is
{{ api_version }} 1.2.0 The API version
{{ qualified_api_version }} 1.2.0-beta API version including a developer-defined qualifier
{{ timestamp('YYYYMMdd') }} 20150801 Current time; accepts a JodaTime-compatible timestamp format definition

Above tokens can also be used together, for example:

releaseVersionFormat Result
{{ qualified_api_version }}-{{ timestamp('YYYYMMdd') }} 1.2.0-beta-20150801
{{ qualified_api_version }}-built.{{ timestamp('YYYYMMdd') }} 1.2.0-beta-built.20150801

Please note that Maven properties can be used as well. This way if you:

  • provide, say a build_number parameter when you build your project:
    mvn clean package -Dbuild_number=176
  • and given that you set releaseVersionFormat to say:
    {{ qualified_api_version }}-build.${build_number}
  • then the resulting version number will become:
    1.2.0-beta-build.176

Default value is: {{ version }}.
User property is: releaseVersionFormat.
Name Type Since Description
encoding String - Encoding used when reading from and writing to files on disk.
Default value is: UTF-8.

Parameter Details

encoding:

Encoding used when reading from and writing to files on disk.
  • Type: java.lang.String
  • Required: No
  • Default: UTF-8

releaseVersionFormat:

Describes how the pom.xml project version should be expanded into a new version number.

For example, assume:

  • that pom.xml project version is set to 1.2.0-beta-SNAPSHOT
  • and that the current date is 2015-08-01

Below table depicts the relationship between the releaseVersionFormat and what project version gets expanded into when release-candidate:updateVersion is called:

releaseVersionFormat Result Outcome
{{ version }} 1.2.0-beta-SNAPSHOT Full version number, as is
{{ api_version }} 1.2.0 The API version
{{ qualified_api_version }} 1.2.0-beta API version including a developer-defined qualifier
{{ timestamp('YYYYMMdd') }} 20150801 Current time; accepts a JodaTime-compatible timestamp format definition

Above tokens can also be used together, for example:

releaseVersionFormat Result
{{ qualified_api_version }}-{{ timestamp('YYYYMMdd') }} 1.2.0-beta-20150801
{{ qualified_api_version }}-built.{{ timestamp('YYYYMMdd') }} 1.2.0-beta-built.20150801

Please note that Maven properties can be used as well. This way if you:

  • provide, say a build_number parameter when you build your project:
    mvn clean package -Dbuild_number=176
  • and given that you set releaseVersionFormat to say:
    {{ qualified_api_version }}-build.${build_number}
  • then the resulting version number will become:
    1.2.0-beta-build.176
  • Type: java.lang.String
  • Required: No
  • User Property: releaseVersionFormat
  • Default: {{ version }}

Back to top

Version: 1.0-201910011043.383523b. Last Published: 2019-10-01.