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.