问题描述
我对 Maven Snapshot 的含义以及我们为什么要构建它感到有些困惑?
I am a bit confused about the meaning of a Maven Snapshot and why we build one?
推荐答案
Maven 中的快照版本尚未发布.
A snapshot version in Maven is one that has not been released.
这个想法是,在1.0
版本(或任何其他版本)完成之前,存在一个1.0-SNAPSHOT
.该版本是可能成为 1.0
的版本.它基本上是1.0
正在开发中".这可能与真正的 1.0
版本接近,或者相距甚远(例如,紧接在 0.9
版本之后).
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).
真实"版本和快照版本之间的区别在于快照可能会获得更新.这意味着今天下载 1.0-SNAPSHOT
可能与昨天或明天下载的文件不同.
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.
这篇关于Maven 快照到底是什么,我们为什么需要它?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!