Why do many versions of Maven dependencies end with SNAPSHOT?

Is there any special meaning for the snapshot in the Maven version?

+4
source share
2 answers

Yes

SNAPSHOT - means this is not the final version. The code is still under development and the artifact is not released. He may have errors.

From: http://maven.apache.org/guides/getting-started/index.html

version This element indicates the version of the artifact generated by the project. Maven is of great importance to help you with version control, and you will often see the SNAPSHOT symbol in the version, which indicates that the project is under development. We will discuss the use of snapshots and the next steps in this guide.

This is even a long article: http://sonatype.com/books/maven-book/reference/pom-relationships-sect-pom-syntax.html see section 3.3.1.2. SNAPSHOT Version Title

Why would you use this? The SNAPSHOT version is used for active projects. If your project depends on a software component that is under active development, you may depend on the release of SNAPSHOT, and Maven will periodically try to download the latest snapshot from the repository when the build starts. Similarly, if the next release of your system has version 1.4, your project will have version 1.4-SNAPSHOT until it is officially released.

+7
source

Any version of a project with SNAPSHOT in it means that it is a development assembly, not a release, and is usually built from any new commit in the repository.

This means that they are unstable, because someone can break the code, the broken project will be built, and sometime later you will update it to the newest build.

+1
source

Source: https://habr.com/ru/post/1341493/


All Articles