What exactly is a Maven Snapshot and why do we need it?

meisam picture meisam · May 5, 2011 · Viewed 347.1k times · Source

I am a bit confused about the meaning of a Maven Snapshot and why we build one?

Answer

Joachim Sauer picture Joachim Sauer · May 5, 2011

A snapshot version in Maven is one that has not been released.

The idea is that before a 1.0 release (or any other release) is done, there exists a 1.0-SNAPSHOT. That version is what might become 1.0. It's basically "1.0 under development". This might be close to a real 1.0 release, or pretty far (right after the 0.9 release, for example).

The difference between a "real" version and a snapshot version is that snapshots might get updates. That means that downloading 1.0-SNAPSHOT today might give a different file than downloading it yesterday or tomorrow.

Usually, snapshot dependencies should only exist during development and no released version (i.e. no non-snapshot) should have a dependency on a snapshot version.