Vivek
Vivek

Reputation: 95

Maven deployment fails with conflict

I have tried the following maven commands,

 - mvn clean install
 - mvn clean package
 - mvn clean deploy

The first two got success, however, the last one (deployment) got failed with the below error message. Any suggestion on this would be helpful

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project blkmessenger-parent: Failed to deploy artifacts: Could not transfer artifact com.jd.terf:blkmessenger-parent:pom:1.10.0-RC1-20190627.131740-1 from/to blkmessenger.snapshots (http://jd.artifactory.net:8081/artifactory/blkmessenger/snapshots): Failed to transfer file: http://jd.artifactory.net:8081/artifactory/blkmessenger/snapshots/com/jd/terf/blkmessenger-parent/1.10.0-RC1-SNAPSHOT/blkmessenger-parent-1.10.0-RC1-20190627.131740-1.pom. Return code is: 409, ReasonPhrase: Conflict. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

Upvotes: 0

Views: 978

Answers (2)

Dror Bereznitsky
Dror Bereznitsky

Reputation: 20376

There are a couple of reasons of why Artifactory will return a 409 error on deployment:

  1. Deploying a Snapshots version to a repository which does not allow snapshots - Handle Snapshots is set to false
  2. Deploying a Release version to a repository which does not allow releases - Handle Releases is set to false
  3. Checksum policy is set to "Verify against client checksums" and a client has sent a checksum, but it conflicts with the one calculated on the server then Artifactory
  4. Suppress POM Consistency is set to true and the groupId:artifactId:version information inside the POM does not match the deployed path
  5. A user plugin can possibly decide to return a 409 error for some reasons

Upvotes: 3

J Fabian Meier
J Fabian Meier

Reputation: 35785

Make sure that your artifactory repository allows Snapshots.

Furthermore check the pom that your groupId, artifact and version are in a correct format (version ending with "-SNAPSHOT").

Upvotes: 0

Related Questions