Maven Snapshot Repository vs Release Repository

2019-01-13 03:42发布

What is the difference between a Snapshot Repository and Release Repository?

This is with reference to setting up Repositories (like Artifactory, Nexus etc)

5条回答
兄弟一词,经得起流年.
2楼-- · 2019-01-13 04:19

Release Artifacts

These are specific, point-in-time releases. Released artifacts are considered to be solid, stable, and perpetual in order to guarantee that builds which depend upon them are repeatable over time. Released JAR artifacts are associated with PGP signatures and checksums verify both the authenticity and integrity of the binary software artifact. The Central Maven repository stores release artifacts.

Snapshot Artifacts

Snapshots capture a work in progress and are used during development. A Snapshot artifact has both a version number such as “1.3.0” or “1.3” and a timestamp. For example, a snapshot artifact for commons-lang 1.3.0 might have the name commons-lang-1.3.0-20090314.182342-1.jar.

Taken from refcard

查看更多
冷血范
3楼-- · 2019-01-13 04:29

Snapshots are maven idea to give version number as -SNAPSHOTS , its under development, it can change any time.

Internal repository is the release repository with fixed version number. You can modify the SNAPSHOTS, but That artifact never changes after it is released.

查看更多
何必那么认真
4楼-- · 2019-01-13 04:36

SNAPSHOT here doesn't really mean ONE snapshot which is frozen and won't change, SNAPSHOT covers several snapshots whose modifications are not big enough for being represented by a new version number

查看更多
在下西门庆
5楼-- · 2019-01-13 04:41

Release repositories hold releases and Snapshot repositories hold snapshots. In maven a snapshot is defined as an artifact with a version ending in -SNAPSHOT. When deployed, the snapshot is turned into a timestamp. By definition, snapshots are mutable, releases are immutable. This is why Nexus makes you store them separately because usually you don't care if you lose snapshots, but you will care if you lose releases. It makes snapshot cleanup much easier to deal with that way.

查看更多
祖国的老花朵
6楼-- · 2019-01-13 04:41

Usually in maven we have two types of builds:

1) Snapshot builds: SNAPSHOT is the special version that indicates current deployment copy and not a regular, specific version. Maven checks the version for every build in the remote repository. The snapshot builds are nothing but maintainance builds.

2) Release builds: Release means removing the SNAPSHOT at the version ID for the build. These are the regular build versions.

Snapshot artifacts and release artifacts are sent to snapshot, release repositories respectively.

查看更多
登录 后发表回答