maven deploy:deploy-file fails (409 Conflict), yet artifact uploads successfully

I found the problem. Two problems actually:

  • I only had the release repository setup, and I was attempting to save a snapshot release in the release repository. Artifactory was setup to only allow releases in the release repository. This can be modified in the Artifactory setting, but I decided against this.

  • My pom.xml has a different version in it than I was trying to save it to. For example, the pom.xml said version 2.0 and I was trying to save the release as 2.0.2. Artifactory rejected the pom (but not the jar) for this reason.

I found the Artifactory setting (which is per repository) that asks whether or not to “Suppress POM consistency checks”. Checking this box will allow me to set the version to one, but have the pom say another.

I also had to modify my Maven “settings.xml” file to allow for both a Release and Snapshot repository. I also have to modify my URL to the snapshot repository.

We were only using Ivy for a while (which doesn’t have a snapshot concept), so we were just putting stuff in the release repository. This is a Maven project, and the developer marked the version in the POM as a SNAPSHOT.

Unfortunately, Maven documentation is pretty poor, and there still aren’t any good books on Maven. Even worse is that the error messages are simply poor. What does “409, ReasonPhrase:Conflict. -> [Help 1]” mean?

Not that Ivy documentation is so much better, but Ant in Action has some excellent sections on using Ivy.

Leave a Comment