Here's the Maven to deb/rpm mappings to be used in unix-maven-plugin. In deb and rpm, the part after the last hyphen denotes the revision part. Timestamp for all examples is 20090423095107 (used for SNAPSHOT version mapping).
Notes on DEB: Revision for Debian will be always 1 unless explicitely set in pom.xml.
Notes on RPM: Revision for RedHat will be used to properly map post- and pre- releases following the Fedora Packaging guidelines. Recent RPM versions support the use of tilde (~) with the same behaviour as in DEB. RHEL >=6 and Fedora support such behaviour. At the moment, we ignore this and implement a fully backwards-compatible behaviour. Optional support for tilde is left as a future issue.
maven
deb
rpm
1
1-1
1-1
1 rev: 3
1-3
1-3
1.5
1.5-1
1.5-1
1.0-1 rev: 3
1.0-1-3
1.0_1-3
1.0-1
1.0-1-1
1.0_1-1
1.0-rc1
1.0~rc1-1
1.0-0.1.rc1
1.0-alpha-1
1.0~alpha-1-1
1.0-0.1.alpha_1
1.0-SNAPSHOT
1.0~20090423095107-1
1.0-0.1.20090423095107
1.0-rc1-SNAPSHOT
1.0~rc1~20090423095107-1
1.0-0.1.rc1 1
1.0-SNAPSHOT rev: 3
1.0~20090423095107-3
1.0-0.1.20090423095107.3
1 There is no way to properly map -rc1-SNAPSHOT to RPM versions, so when a pre-release qualifier is found (e.g. -rcX, -alphaX), SNAPSHOT timestamp is ignored.
Unsupported versions
At the moment, this plugin does not support all versioning schemes supported by Maven. Most notably, prerelease qualifiers (e.g. rc1, alpha1, b1) must be separated with a dash. Other notations (underscore, dot or no separator) are not supported.
Currently, deb generation fails when mapping -rc1 version.
Versioning docs
Maven
http://docs.codehaus.org/display/MAVEN/Versioning
RPM
http://fedoraproject.org/wiki/Packaging%3aNamingGuidelines#NonNumericRelease https://twiki.cern.ch/twiki/bin/view/Main/RPMAndDebVersioning
DEB
https://twiki.cern.ch/twiki/bin/view/Main/RPMAndDebVersioning https://www.debian.org/doc/debian-policy/ch-controlfields.html
Version mapping
Here's the Maven to deb/rpm mappings to be used in unix-maven-plugin. In deb and rpm, the part after the last hyphen denotes the revision part. Timestamp for all examples is 20090423095107 (used for SNAPSHOT version mapping).
Notes on DEB: Revision for Debian will be always 1 unless explicitely set in pom.xml.
Notes on RPM: Revision for RedHat will be used to properly map post- and pre- releases following the Fedora Packaging guidelines. Recent RPM versions support the use of tilde (
~
) with the same behaviour as in DEB. RHEL >=6 and Fedora support such behaviour. At the moment, we ignore this and implement a fully backwards-compatible behaviour. Optional support for tilde is left as a future issue.Unsupported versions
At the moment, this plugin does not support all versioning schemes supported by Maven. Most notably, prerelease qualifiers (e.g. rc1, alpha1, b1) must be separated with a dash. Other notations (underscore, dot or no separator) are not supported.