Codearte / gradle-nexus-staging-plugin

Automatize releasing Gradle projects to Maven Central.
Apache License 2.0
172 stars 26 forks source link

Task :releaseRepository FAILED #162

Closed RoRoche closed 4 years ago

RoRoche commented 4 years ago

When running the tasks ./gradlew closeAndReleaseRepository, I encounter the following error:

> Task :releaseRepository FAILED
Requested operation was executed successfully in attempt 13 (maximum allowed 21)

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':releaseRepository'.
> Wrong 'comgithubroroche-1005' repository state 'closed' after transition (expected [released, not_found]). Possible staging rules violation. Check repository status using Nexus UI.

In my https://oss.sonatype.org/#stagingRepositories, I get the following messages:

Event: Failed: Repository Writable

typeId | RepositoryWritePolicy
-- | --
failureMessage | Artifact updating: Repository ='releases:Releases' does not allow updating artifact='/com/github/roroche/eo-rest/maven-metadata.xml.sha512'
szpak commented 4 years ago

You hit the limitation of Sonatype Nexus - https://issues.sonatype.org/browse/MVNCENTRAL-5276 . Unfortunately for some reasons it is hard to fix at the Nexus side. You can use workaround available in Gradle: https://github.com/gradle/gradle/issues/11308#issuecomment-554317655