5

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.

Naresh
  • 99
  • 3
  • 14
  • I have the same issue. Were you able to find a solution? – Andrey Cheptsov Jul 06 '20 at 10:17
  • Same problem. Sent sonatype a message, waiting to hear back. – John Caron Feb 14 '21 at 19:18
  • 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`](https://docs.gradle.org/current/dsl/org.gradle.api.Project.html#org.gradle.api.Project:configurations(groovy.lang.Closure)). This blog has solution https://newbedev.com/bootjar-mavenjar-artifact-wasn-t-produced-by-this-build – prayagupa Sep 15 '21 at 17:26

0 Answers0