Skip to content
Latchkey

Maven deploy "409 Conflict" redeploying a release in CI

The release repository is configured to reject re-uploads of an existing release version. Maven tried to PUT a coordinate that already exists, and the server returned 409 Conflict to protect immutability.

What this error means

deploy fails with "Could not transfer artifact ... status code: 409, reason phrase: Conflict (409)" or "Repository does not allow updating assets". Snapshots deploy fine; only release redeploys are blocked.

mvn output
[ERROR] Failed to deploy artifacts: Could not transfer artifact
com.example:app:jar:1.0.0 from/to nexus
(https://nexus.example.com/repository/maven-releases/):
status code: 409, reason phrase: Conflict (409) -> [Help 1]

Common causes

Re-deploying a release version that already exists

Release repositories typically disable redeploy. Re-running the pipeline for the same fixed version conflicts with the artifact already published.

A non-SNAPSHOT version pushed twice

A release coordinate is immutable; the second upload of the same 1.0.0 is rejected with 409.

How to fix it

Bump the version instead of redeploying

  1. Increment to a new release version (or use a SNAPSHOT for iterative builds).
  2. Deploy the new coordinate, which does not exist yet.
  3. Never reuse a published release version.
Terminal
mvn -B versions:set -DnewVersion=1.0.1
mvn -B deploy

Deploy SNAPSHOTs to the snapshot repository

Use a -SNAPSHOT version during development so redeploys overwrite cleanly in the snapshot repo.

pom.xml
<version>1.1.0-SNAPSHOT</version>

How to prevent it

  • Treat published release versions as immutable.
  • Use SNAPSHOT versions for iterative CI deploys.
  • Gate release deploys so the same version cannot be pushed twice.

Frequently asked questions

What causes ""status code: 409 Conflict""?
Release repositories typically disable redeploy. Re-running the pipeline for the same fixed version conflicts with the artifact already published.
How do I fix "status code: 409 Conflict"?
Bump the version instead of redeploying

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card