Versions
This lesson explains the naming conventions for project versions in Maven. It also explains the special role of the SNAPSHOT version.
We'll cover the following...
We’ll examine the convention followed for declaring versions of projects in this lesson and also the SNAPSHOT version.
Version
The version for a project should follow the below pattern:
<majorVersion>.<minorVersion>.<incrementalVersion>-<qualifier>
For instance, the project version 5.4.12 implies the major version is 5, minor is 4, incremental is 12, and that there is no qualifier. Similarly, the project version 2.5.1-alpha implies the major version is 2, minor 5, incremental 1, and that the qualifier is alpha. Finally, a project version 4 implies the major version is 4 and the rest are not defined. Following this format for defining project versions is helpful when defining project dependencies. We can define project dependencies as a range instead of a specific version. Maven will be able to determine the ...