3

I have a maven build and artifactory(pretty unstable for now), so sometimes it returns 'Failed to respond' error. I increased 'retryFailedDeploymentCount' parameter, but still have issues. The snippet from my build log below:

[INFO] Uploading: https://my-artifactory.com/artifactory/.../my/groupid/artifactId/1.0.0-beta/artifactId-1.0.0-beta.jar
[INFO] Uploading: https://my-artifactory.com/artifactory/.../my/groupid/artifactId/1.0.0-beta/artifactId-1.0.0-beta.pom
[INFO] Uploaded: https://my-artifactory.com/artifactory/.../my/groupid/artifactId/1.0.0-beta/artifactId-1.0.0-beta.pom (2 KB at 0.4 KB/sec)  !!!SUCCESS!!!
[WARNING] Encountered issue during deployment: Failed to deploy artifacts: Could not transfer artifact my.groupid:artifact:jar:1.0.0-beta from/to central (https://my-artifactory.com/artifactory/.../): my-artifactory.com:443 failed to respond
[INFO] Retrying deployment attempt 2 of 10
[INFO] Uploading: https://my-artifactory.com/artifactory/.../my/groupid//artifact/1.0.0-beta/artifactId-1.0.0-beta.jar
[INFO] Uploaded: https://my-artifactory.com/artifactory/.../my/groupid//artifact/1.0.0-beta/artifactId-1.0.0-beta.jar (32 KB at 15.6 KB/sec) !!!SUCCESS!!!
[INFO] Uploading: https://my-artifactory.com/artifactory/.../my/groupid//artifact/1.0.0-beta/artifactId-1.0.0-beta.pom
[WARNING] Encountered issue during deployment: Failed to deploy artifacts: Could not transfer artifact my.groupid:artifact:pom:1.0.0-beta from/to central (https://my-artifactory.com/artifactory/.../): Access denied to: https://my-artifactory.com/artifactory/.../my/groupid/artifactId/1.0.0-beta/artifactId-1.0.0-beta.pom, ReasonPhrase: Forbidden.
[INFO] Retrying deployment attempt 3 of 10
[INFO] Uploading: https://my-artifactory.com/artifactory/.../my/groupid//artifact/1.0.0-beta/artifactId-1.0.0-beta.jar
[INFO] Uploading: https://my-artifactory.com/artifactory/.../my/groupid//artifact/1.0.0-beta/artifactId-1.0.0-beta.pom
[WARNING] Encountered issue during deployment: Failed to deploy artifacts: Could not transfer artifact my.groupid:artifact:jar:1.0.0-beta from/to central (https://my-artifactory.com/artifactory/.../): Access denied to: https://my-artifactory.com/artifactory/.../my/groupid/artifactId/1.0.0-beta/artifactId-1.0.0-beta.jar, ReasonPhrase: Forbidden.
[INFO] Retrying deployment attempt 4 of 10

So on 1st attempt maven-deploy-plugin deployed pom, but failed with jar. On 2nd attempt deployed jar, but failed with pom(as it was already deployed, and I don't have rights to update previously deployed artifacts). As 2nd attempt wasn't fully successful, it goes to 3rd attempt and now cannot deploy any of them(pom and jar) because they're already deployed, then 4th attempt, 5th, and so one to the limit.

So I'm in a situation when deployment was successful, but maven build fails as all my 10 attempts were unsuccessful.

How can I force maven to track which artifact was deployed on previous attempt and don't deploy it again? What is a proper solution for that?

I'm using maven 3.3.9, maven-deploy-plugin 2.8.1 and java 1.7.0_144.

Vasilii Ruzov
  • 554
  • 1
  • 10
  • 27
  • You things like this: `Access denied to: .. ReasonPhrase: Forbidden.`in your logs... That's the reason. Apart from that either Artifactory is your problem or more likely your network access is the problem... – khmarbaise Dec 01 '17 at 18:21
  • @khmarbaise , I receive 'access denied' because trying to redeploy existing artifact. What I want - to not redeploy artifacts which were deployed in previous attempt – Vasilii Ruzov Dec 01 '17 at 18:23
  • You can't redeploy release artifacts you need to make a different version for the second attempt. – khmarbaise Dec 01 '17 at 18:40
  • @khmarbaise, please read my question one more time. I never wrote I want to deploy my artifact twice. – Vasilii Ruzov Dec 02 '17 at 19:08
  • 1
    But you wrote `..trying to redeploy existing artifact` which means you want to deploy the same artifact with the same version a second time...please show your pom file and your exact command you are using... – khmarbaise Dec 04 '17 at 07:36

0 Answers0