maven fails to upload maven-metadata.xml checksum

7

I'm investigating the use of CodeArtifact for our Maven projects and it's working well, but I notice that whenever I upload artifacts I get a warning about failure to upload the maven-metadata.xml.md5 file:

https://forums.aws.amazon.com/ Failed to upload checksum to com///1.0.0-SNAPSHOT/maven-metadata.xml.md5 org.apache.maven.wagon.TransferFailedException: transfer failed for https://.d.codeartifact.us-west-2.amazonaws.com/maven/evconnect/com/**//1.0.0-SNAPSHOT/maven-metadata.xml.md5 at org.apache.maven.wagon.providers.http.wagon.shared.AbstractHttpClientWagon.put (AbstractHttpClientWagon.java:855)

---snip---

Caused by: org.apache.maven.wagon.providers.http.httpclient.client.ClientProtocolException at org.apache.maven.wagon.providers.http.httpclient.impl.client.InternalHttpClient.doExecute (InternalHttpClient.java:187)

---snip---

Caused by: org.apache.maven.wagon.providers.http.httpclient.client.NonRepeatableRequestException: Cannot retry request with a non-repeatable request entity at org.apache.maven.wagon.providers.http.httpclient.impl.execchain.RetryExec.execute (RetryExec.java:108)

---snip---

Caused by: java.net.SocketException: Connection or outbound has closed at sun.security.ssl.SSLSocketImpl$AppOutputStream.write (SSLSocketImpl.java:1217)

is this normal, someone ran into such problem?

  • I've confirmed with AWS Support that this is a known issue. They have an internal case for it, but no ETA as yet. From my own investigation I've found that the issue occurs when Maven uploads more than one checksum algorithm (by default it uses 2) [1].

    As a workaround you can set Maven to only use one: mvn deploy "-Daether.checksums.algorithms=MD5"

    [1] https://maven.apache.org/resolver/configuration.html

  • Thanks for the update and workaround. I'm also experiencing this issue and interested in any updates you get. I'm adding this configuration to my MAVEN_OPTS and will report back if it works for me or not.

  • This is a bug i have it too

asked 2 years ago2618 views
3 Answers
1

Workaround: Do not mark as accepted

From my own investigation I've found that the issue occurs when Maven uploads more than one checksum algorithm (by default it uses 2).

As a workaround you can set Maven to only use one: mvn deploy "-Daether.checksums.algorithms=MD5"

AWS have confirmed that this is a known bug and that they have an internal case for it. However, like many AWS service teams, the CodeArtifact team have no publicly visible roadmap. Instead, we should rely on their service team updating this re:Port issue when the bug is fixed.

ANeeson
answered 2 years ago
  • This has been working for me as well. I'll look forward to the proper solution from AWS, but wanted to acknowledge this is working in the meantime.

  • This worked for me , however, this need to be fixed by CodeArtifact

0

sorry for long-time no update. Although have this issue in place but the artifact was uploaded to repository very well, that's the reason why I am not always putting an eye on this issue

answered 2 years ago
-2

This does not appear to be the normal behavior. In order to help troubleshoot this, the full log output, and some details about your environment would be needed.

Since these details are non-public information, please open a support case with AWS using this link, so that one of our support engineers can assist you directly.

AWS
SUPPORT ENGINEER
Wayne_G
answered 2 years ago
  • It looks like same problem appear in stackoverflow which means this happens often when we deploy our own jar to code artifact while missing maven-metadata.xml

  • We are also evaluating codeartifact for maven projects and we have exactly the same error.

    It would be good to get some answer here what the solution is.

  • I've replicated this behaviour on two of my own projects. Then, to ensure that it wasn't anything specific to those projects, I created a brand new Maven project (Intelli -> new Project) and applied the <distributionManagement> from the [View connection instructions] section in AWS CodeBuild.

    When I run mvn clean deploy it produces the same stacktrace as described in the description. I have opened a support ticket on my AWS Support account. If I get a good answer, I'll post it here.

  • Any updates on this issue?. Facing the problem with CodeArtifact. Seems to be related to the maven version. Getting this error with maven 3.8.5, but not with maven 3.3.9.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions