Snapshot Versions
It’s important to note that the version tag in the pom.xml
files shown below carries the suffix: -SNAPSHOT
.
<project xmlns="http://maven.apache.org/POM/4.0.0"
...
<groupId>...</groupId>
<artifactId>my-app</artifactId>
...
<version>1.0-SNAPSHOT</version>
<name>Maven Quick Start Archetype</name>
...
The SNAPSHOT
signifies that the value represents the “latest” code on the development branch, which isn’t guaranteed to be stable or static. In contrast, code in a “release” version (any version value without the SNAPSHOT
suffix) remains immutable.
In other words, snapshot versions are the “in-progress” versions before the final “release” version. These snapshots are considered “older” than their release counterparts.
During the release process, a version like x.y-SNAPSHOT transitions to x.y. Additionally, the release process increments the development version to x.(y+1)-SNAPSHOT. For example, version 1.0-SNAPSHOT would be released as version 1.0, while the new development version becomes 1.1-SNAPSHOT.