Snapshots
A snapshot version, such as 1.0-SNAPSHOT, holds many builds. Each deploy adds a build, and clients resolve the newest one.
How a snapshot deploy works
Every mvn deploy or Gradle publish of a snapshot version adds one build with its own timestamp. A build that resolves the snapshot gets the newest build. Older builds stay downloadable if a build asks for one by its exact timestamped name, but they're no longer offered as the current snapshot.
Deploying the same build twice fails, and the build reports that the snapshot build already exists. Deploy again: your build tool produces a new timestamp and the deploy adds a new build.
Repositories that take releases only
An administrator can refuse snapshots entirely.
To refuse them, follow these steps:
- Open the repository and go to Settings.
- Turn off Allow snapshots.
- Click Save changes.
Deploying a -SNAPSHOT version then fails, and the build reports that the repository doesn't accept snapshot versions. Snapshots that were already deployed stay where they are.
A common arrangement is two repositories: one that allows snapshots for daily builds, and one that takes releases only.
Advanced
Maven expands a snapshot version into a timestamped version before it uploads, so a build of 1.0-SNAPSHOT is uploaded to a path like com/example/snap/1.0-SNAPSHOT/snap-1.0-20260913.101500-1.jar. The timestamp is yyyyMMdd.HHmmss in UTC, followed by the build number. Newest is decided by the timestamp first and the build number second, so a build that arrives late with an older timestamp doesn't take over.
The version-level maven-metadata.xml names the newest build only: its timestamp and buildNumber, and one snapshotVersion entry for each of its files. Before the first deploy of a snapshot version, that document doesn't exist and a request for it answers 404 Not Found. At the artifact level, a snapshot version can be the latest but never the release.
Maven uploads its own version-level metadata at the end of a snapshot deploy. Artifex generates its own from the builds it holds and checks the upload for agreement. If the uploaded document names a build other than the newest deployed one, the upload is refused with 400 Bad Request.
Deploying the same timestamped path twice answers 409 Conflict. Deploying a snapshot to a repository that refuses snapshots answers 403 Forbidden.