Failed to publish publication 'mavenJava' to repository 'maven'
Asked Answered
S

0

7

I am trying to upload a library to mavencentral for the first time. I get to build and run some tasks from maven-publish gradle plugin. But, On publish task, I get below error.

* What went wrong:
Execution failed for task ':publishMavenJavaPublicationToMavenRepository'.
> Failed to publish publication 'mavenJava' to repository 'maven'
   > Could not write to resource 'https://oss.sonatype.org/service/local/staging/deploy/maven2/dev/spiti/utilities/data-reader/1.0.0/data-reader-1.0.0.jar'.
      > Read timed out

Also, I tried the solution from here Gradle build configured signatory to complete :signArchives. Cmd ./gradlew assemble -x signArchives runs successfully but issue seem to persist.

Can someone guide me thru how to overcome this.

Seraphina answered 28/3, 2019 at 0:25 Comment(3)
I have the same issue. Were you able to find a solution?Public
Same problem. Sent sonatype a message, waiting to hear back.Antechamber
This could be related to error Read timed out. I had similar issue but failed on jar wasn't produced by this build which was fixed by updating configurations. This blog has solution newbedev.com/…Noria

© 2022 - 2024 — McMap. All rights reserved.