publish-plugin
publish-plugin copied to clipboard
Improve presentation of errors from Nexus
For example:
> Task :closeSonatypeStagingRepository FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':closeSonatypeStagingRepository'.
> Failed to close staging repository, server at https://oss.sonatype.org/service/local/ responded with status code 500, body: io.github.gradlenexus.publishplugin.shadow.okhttp3.ResponseBody$1@1ac212a0
Might potentially show the body (if text/json) and maybe we could even try to determine that credentials were not provided.
This other plugin does a good job reporting logs from Nexus, printing all validation rules, reasons of failure, etc. https://plugins.gradle.org/plugin/name.remal.maven-publish-nexus-staging
May be you can join forces with them too for this