Fork me on GitHub

rpm:version

Full name:

org.codehaus.mojo:rpm-maven-plugin:2.5.0:version

Description:

Makes the rpm version and release attributes available as properties.

Attributes:

  • Requires a Maven project to be executed.
  • The goal is thread-safe and supports parallel builds.
  • Since version: 2.0.
  • Binds by default to the lifecycle phase: initialize.

Required Parameters

Name Type Since Description
<projversion> String - The version portion of the RPM file name.
Default: ${project.version}
User Property: rpm.version
Alias: version
<releaseProperty> String - The system property to set the calculated release to.
Default: rpm.release
<versionProperty> String - The system property to set the calculated version to.
Default: rpm.version

Optional Parameters

Name Type Since Description
<numericModifierAsRelease> boolean 2.5.0 Indicates if an all-numeric modifier of the version, such as the 1 in 1.0.0-1, is used as the release instead of having _1 appended to it. With true, version 1.0.0-1 gives version 1.0.0 and release 1; the default gives release 1_1. Only applies if release is not set.
Default: false
User Property: rpm.numericModifierAsRelease
<release> String - The release portion of the RPM file name.

This is an optional parameter. By default, the release will be generated from the modifier portion of the project version using the following rules:

  • If no modifier exists, the release will be 1.
  • If the modifier ends with SNAPSHOT, the timestamp (in UTC) of the build will be appended to end.
  • All instances of '-' in the modifier will be replaced with '_'.
  • If the modifier is numeric and numericModifierAsRelease is true, it will be used as the release.
  • If a modifier exists, does not end with SNAPSHOT, and is not used as the release, "_1" will be appended to end.


User Property: rpm.release

Parameter Details

<numericModifierAsRelease>

Indicates if an all-numeric modifier of the version, such as the 1 in 1.0.0-1, is used as the release instead of having _1 appended to it. With true, version 1.0.0-1 gives version 1.0.0 and release 1; the default gives release 1_1. Only applies if release is not set.
  • Type: boolean
  • Since: 2.5.0
  • Required: No
  • User Property: rpm.numericModifierAsRelease
  • Default: false

<projversion>

The version portion of the RPM file name.
  • Type: java.lang.String
  • Required: Yes
  • User Property: rpm.version
  • Default: ${project.version}
  • Alias: version

<release>

The release portion of the RPM file name.

This is an optional parameter. By default, the release will be generated from the modifier portion of the project version using the following rules:

  • If no modifier exists, the release will be 1.
  • If the modifier ends with SNAPSHOT, the timestamp (in UTC) of the build will be appended to end.
  • All instances of '-' in the modifier will be replaced with '_'.
  • If the modifier is numeric and numericModifierAsRelease is true, it will be used as the release.
  • If a modifier exists, does not end with SNAPSHOT, and is not used as the release, "_1" will be appended to end.

  • Type: java.lang.String
  • Required: No
  • User Property: rpm.release

<releaseProperty>

The system property to set the calculated release to.
  • Type: java.lang.String
  • Required: Yes
  • Default: rpm.release

<versionProperty>

The system property to set the calculated version to.
  • Type: java.lang.String
  • Required: Yes
  • Default: rpm.version