Closed pavolloffay closed 5 years ago
It's a big problem, I'm also not able to automatically release my project using Travis. In fact, it happens in the upload phase (multiple staging repositories are created) and closeRepository
only visualize a problem. It affects also one-thread execution, even for a single module projects. I don't know how it could be solved at the gradle-nexus-staging-plugin level (merging staging repositories via API is not an option :) ).
Unfortunately Travis is unlikely to fix it on their side. There is an open issue for Gradle. You can comment there, as it seems to be a good place to fix it (it would be possible for gradle-nexus-staging-plugin to track one particular staging repository not to check number of them in a given state).
Update. I changed the title to more accurate.
It works fine with nexus-publish-plugin.
I updated the project FAQ to address it. A copy-paste for people hitting that issue.
To cut a long story short:
For releasing from Travis (and in general) it's recommended to add nexus-publish-plugin to your project and use its publishToNexus
task to upload/publish artifacts to Nexus (instead of vanilla publish...
from Gradle). It integrates seamlessly with gradle-nexus-staging-plugin to release to Maven Central (especially with 0.20.0+) - no other changes are required. What's more, with that enhancement implemented the releasing to Nexus will be even more reliable
(e.g. an ability to run multiple releases for the same staging profile).
However, there is one caveat. uploadArchives
from the maven
plugin is not supported by nexus-publish-plugin (only publish...
from maven-publish
).
Hi,
we are having issues to use this plugin when VM (travis) changes public IP during the release.
From https://help.sonatype.com/repomanager2/staging-releases/managing-staging-repositories
This jira https://issues.sonatype.org/browse/OSSRH-19485?focusedCommentId=340094&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-340094 advices to use profile id.
We have added
stagingProfileId
to our gradle config however the build still fails e.g. https://travis-ci.org/jaegertracing/jaeger-client-java/jobs/441639782#L775 and it still creates multiple staging repositories:Here is out gradle config https://github.com/jaegertracing/jaeger-client-java/blob/master/build.gradle#L87 and also https://github.com/jaegertracing/jaeger-client-java/blob/master/gradle/publish.gradle.
Any help is appreciated.