Currently, only versions of the following formats are correctly parsed: a.b.c.d...[-e] (examples: 1.2.3, 1.2.3-4, 18.104.22.168, 22.214.171.124-5, etc.)
It is desired that a more complex version format is correctly interpreted so that the numbers are incremented accordingly when there is a version upgrade due to the release process.
The suggested format is:
<primary_components>[ -][<annotation><[ -]annotation_revision>][<[ -_]snapshot_specifier>]
- <primary_components>: <major[>.<minor[>.<incremental1[>.<incremental2...]]]>
Positive integers separated by '.'. Example: 126.96.36.199.5. The first three components are named: major, minor, and incremental, respectively. The rest of the primary components can be classified as "subincrementals" (currently, Maven doesn't support these).
- <annotation>: Sequence of letters that usually describe the release type. Examples: alpha, beta, RC, etc.
- <annotation_revision>: A positive integer associated to the annotation.
- <snapshot_specifier>: SNAPSHOT
Examples: 1, 1.2, 1.2.3, 188.8.131.52, 1.2-SNAPSHOT, 1.2-alpha-3, 1.2.3-beta-4, 1.2.3rc4
You should take into account that versions may need to be compared and the comparison should be case insensitive and compare digits appropriately.
The following are some references that show how Maven is tending to support more complex version schemes:
- Maven Book - Project Versions: http://www.sonatype.com/books/mvnref-book/reference/pom-relationships-sect-pom-syntax.html
- Maven Versions Plugin - Version Number Rules: http://mojo.codehaus.org/versions-maven-plugin/version-rules.html
- Maven API - DefaultVersionInfo: http://maven.apache.org/maven-release/maven-release-manager/apidocs/org/apache/maven/shared/release/versions/DefaultVersionInfo.html