Snapshots
A Maven snapshot version, such as 1.0-SNAPSHOT, can contain multiple timestamped snapshots. Each publication adds one, and clients resolve the newest timestamped snapshot.
How a snapshot publication works
Older timestamped snapshots remain available to a build that requests one by its exact timestamped version.
Deploying the same timestamped snapshot twice fails with This snapshot build already exists. Deploy again to create a new build. In this literal message, snapshot build means timestamped snapshot. Deploy again so that your build tool produces a different timestamped snapshot.
Repositories that accept releases only
A person with the Admin repository role can refuse snapshots.
To refuse snapshots, 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. Timestamped snapshots that were already deployed remain in the repository.
A common arrangement uses two repositories: one that allows snapshots for daily builds and one that accepts releases only.
Advanced
Maven expands a snapshot version into a timestamped version before it uploads. For example, a publication of 1.0-SNAPSHOT can upload com/example/snap/1.0-SNAPSHOT/snap-1.0-20260913.101500-1.jar. The timestamp uses yyyyMMdd.HHmmss in UTC, followed by the build number. Artifex compares the timestamp first and the build number second. A timestamped snapshot that arrives late with an earlier timestamp doesn't become the current snapshot.
The version-level maven-metadata.xml document names only the newest timestamped snapshot. It contains timestamp, buildNumber, and one snapshotVersion entry for each file. Before the first publication of a snapshot version, that document doesn't exist, and a request for it responds 404 Not Found. At the artifact level, a snapshot version can be latest but never release.
Maven uploads version-level Maven metadata at the end of a snapshot deployment. Artifex generates Maven metadata from the timestamped snapshots that it stores and validates the uploaded document against it. If the uploaded document names a timestamped snapshot other than the newest deployed one, Artifex refuses the upload with 400 Bad Request.
Deploying the same timestamped path twice responds 409 Conflict. Deploying a snapshot to a repository that refuses snapshots responds 403 Forbidden.