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

前端 未结 13 2439
名媛妹妹
名媛妹妹 2020-11-22 07:07

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

13条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-11-22 07:20

    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.

提交回复
热议问题