Repaso
EspaƱol
Maven, Git & SDLCIntermediateVCS-07

What is a -SNAPSHOT version in Maven?

Options

  1. A stable release that never changes after publishing
  2. A development version that can change over time (Correct option)
  3. A version that cannot be built with Maven or Gradle
  4. A backup copy of the release kept in a repository

Answer

A development version that can change; Maven may re-download it as it is updated, unlike an immutable release

Why

A version such as 1.2.0-SNAPSHOT means "work in progress toward 1.2.0". The artifact with that same version can be replaced many times.

A release version like 1.2.0 should never change once published: anyone who depends on it gets exactly the same bytes.

Good practice: never depend on SNAPSHOTs in production builds, because the build is not reproducible.

Remember

SNAPSHOT = mutable work in progress; release = fixed forever.

Key terms

Practice this question in Repaso