Home / Companies / Octopus Deploy / Blog / Post Details
Content Deep Dive

Maven versions explained

Blog post from Octopus Deploy

Post Details
Company
Date Published
Author
Matthew Casperson
Word Count
1,881
Language
English
Hacker News Points
-
Summary

Maven version strings can be complex due to various rules and edge cases, with the ComparableVersion class serving as the definitive guide for comparing them. The VersionInformation class further breaks down version strings into major, minor, patch, build number, and qualifier components. Special qualifiers like alpha, beta, milestone, rc, and final have predefined meanings and can influence the sorting of versions, while unrecognized qualifiers are treated as later releases. Version comparison is case insensitive, and different separators such as periods and dashes can often be used interchangeably. However, transitioning from a qualifier to a digit requires specific separators, unlike the transition from digits to qualifiers. Long versions with multiple numerical components are also supported, illustrating the flexibility of Maven's versioning system.