Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple deployments to sonatype for the same repository #244

Open
germanattanasio opened this issue Mar 12, 2018 · 11 comments
Open

Multiple deployments to sonatype for the same repository #244

germanattanasio opened this issue Mar 12, 2018 · 11 comments

Comments

@germanattanasio
Copy link

I use Travis to upload artifacts to a Nexus repository. Last week I tried to do a release and somehow and even that Travis looks ok.

Deploying application
The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.
The ConfigurableReport.setDestination(Object) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use the method ConfigurableReport.setDestination(File) instead.
	at build_1dfweaquewaruo334r91l4mq4$_run_closure10$_closure27.doCall(/home/travis/build/watson-developer-cloud/java-sdk/build.gradle:105)
:compileJava NO-SOURCE
:processResources NO-SOURCE
:classes UP-TO-DATE
:jar
:uploadArchives
:core:compileJava UP-TO-DATE
:core:processResources UP-TO-DATE
:core:classes UP-TO-DATE
:core:jar UP-TO-DATE
:conversation:compileJava UP-TO-DATE
:conversation:processResources NO-SOURCE
:conversation:classes UP-TO-DATE
:conversation:jar UP-TO-DATE
:core:javadoc UP-TO-DATE
:conversation:javadoc UP-TO-DATE
:conversation:javadocJar UP-TO-DATE
:conversation:sourcesJar UP-TO-DATE
:conversation:signArchives
:conversation:uploadArchives
:core:javadocJar UP-TO-DATE
:core:sourcesJar UP-TO-DATE
:core:signArchives
:core:uploadArchives
:discovery:compileJava UP-TO-DATE
:discovery:processResources NO-SOURCE
:discovery:classes UP-TO-DATE
:discovery:jar UP-TO-DATE
:discovery:javadoc UP-TO-DATE
:discovery:javadocJar UP-TO-DATE
:discovery:sourcesJar UP-TO-DATE
:discovery:signArchives
:discovery:uploadArchives
:language-translator:compileJava UP-TO-DATE
:language-translator:processResources NO-SOURCE
:language-translator:classes UP-TO-DATE
:language-translator:jar UP-TO-DATE
:natural-language-classifier:compileJava UP-TO-DATE
:natural-language-classifier:processResources NO-SOURCE
:natural-language-classifier:classes UP-TO-DATE
:natural-language-classifier:jar UP-TO-DATE
:natural-language-understanding:compileJava UP-TO-DATE
:natural-language-understanding:processResources NO-SOURCE
:natural-language-understanding:classes UP-TO-DATE
:natural-language-understanding:jar UP-TO-DATE
:personality-insights:compileJava UP-TO-DATE
:personality-insights:processResources NO-SOURCE
:personality-insights:classes UP-TO-DATE
:personality-insights:jar UP-TO-DATE
:speech-to-text:compileJava UP-TO-DATE
:speech-to-text:processResources NO-SOURCE
:speech-to-text:classes UP-TO-DATE
:speech-to-text:jar UP-TO-DATE
:text-to-speech:compileJava UP-TO-DATE
:text-to-speech:processResources NO-SOURCE
:text-to-speech:classes UP-TO-DATE
:text-to-speech:jar UP-TO-DATE
:tone-analyzer:compileJava UP-TO-DATE
:tone-analyzer:processResources NO-SOURCE
:tone-analyzer:classes UP-TO-DATE
:tone-analyzer:jar UP-TO-DATE
:visual-recognition:compileJava UP-TO-DATE
:visual-recognition:processResources NO-SOURCE
:visual-recognition:classes UP-TO-DATE
:visual-recognition:jar UP-TO-DATE
:java-sdk:compileJava NO-SOURCE
:java-sdk:processResources NO-SOURCE
:java-sdk:classes UP-TO-DATE
:java-sdk:jar UP-TO-DATE
:language-translator:javadoc UP-TO-DATE
:natural-language-classifier:javadoc UP-TO-DATE
:natural-language-understanding:javadoc UP-TO-DATE
:personality-insights:javadoc UP-TO-DATE
:speech-to-text:javadoc UP-TO-DATE
:text-to-speech:javadoc UP-TO-DATE
:tone-analyzer:javadoc UP-TO-DATE
:visual-recognition:javadoc UP-TO-DATE
:java-sdk:javadoc NO-SOURCE
:java-sdk:javadocJar UP-TO-DATE
:java-sdk:shadowJar UP-TO-DATE
:java-sdk:sourcesJar UP-TO-DATE
:java-sdk:signArchives
:java-sdk:uploadArchives
:language-translator:javadocJar UP-TO-DATE
:language-translator:sourcesJar UP-TO-DATE
:language-translator:signArchives
:language-translator:uploadArchives
:natural-language-classifier:javadocJar UP-TO-DATE
:natural-language-classifier:sourcesJar UP-TO-DATE
:natural-language-classifier:signArchives
:natural-language-classifier:uploadArchives
:natural-language-understanding:javadocJar UP-TO-DATE
:natural-language-understanding:sourcesJar UP-TO-DATE
:natural-language-understanding:signArchives
:natural-language-understanding:uploadArchives
:personality-insights:javadocJar UP-TO-DATE
:personality-insights:sourcesJar UP-TO-DATE
:personality-insights:signArchives
:personality-insights:uploadArchives
:speech-to-text:javadocJar UP-TO-DATE
:speech-to-text:sourcesJar UP-TO-DATE
:speech-to-text:signArchives
:speech-to-text:uploadArchives
:text-to-speech:javadocJar UP-TO-DATE
:text-to-speech:sourcesJar UP-TO-DATE
:text-to-speech:signArchives
:text-to-speech:uploadArchives
:tone-analyzer:javadocJar UP-TO-DATE
:tone-analyzer:sourcesJar UP-TO-DATE
:tone-analyzer:signArchives
:tone-analyzer:uploadArchives
:visual-recognition:javadocJar UP-TO-DATE
:visual-recognition:sourcesJar UP-TO-DATE
:visual-recognition:signArchives
:visual-recognition:uploadArchives

See: Travis log

I see multiple deployments in sonatype.

For some of them the javadocs or the metadata is missing.

screen shot 2018-03-11 at 11 14 55 pm

Why is the plugin using multiple repository deployments instead of just one like it always did?

Please let me know if you need more information.
BTW: This library is awesome

@lpatino10
Copy link

I've seen similar issues posted to the Sonatype issues board and it seems to have something to do with changing IP addresses during the release process creating multiple staging repositories.

See:

The solution seems to be using a release tool that allows you to specify your profile ID. Unfortunately, the recommended tools use Maven, and I haven't been able to find a Gradle alternative. Would it be feasible to add this option to the gradle-release tool? I would be happy to try and write a PR.

@Hillkorn
Copy link
Collaborator

From what I see it's not directly related to the release plugin. The problem is the gradle internal on uploading the artifacts as it is done in multiple requests and if they use different outbound ip adresses the nexus is splitting these artifacts up.
If I got it right from the issues you posted it can be fixed by using a stagingProfileId with the https://github.com/Codearte/gradle-nexus-staging-plugin/
Connecting this to the release tasks should fix it.

@germanattanasio
Copy link
Author

@Hillkorn can we add stagingProfileId to the upload so that nexus doesn't use the ip address?

@Hillkorn
Copy link
Collaborator

I would try out the gradle plugin is posted the link for. The issue is not the release plugin but the upload that is done in multiple steps + you uploaded the artifacts under different IPs

@pavolloffay
Copy link

Did anybody solve this? We have the same issue

@germanattanasio
Copy link
Author

@pavolloffay We are doing the releases manually for now.
I still think we can do send the stagingProfileId during the uploadArchives.
I really like this plugin, let's brainstorm possible solutions and I will create a PR

@szpak
Copy link
Contributor

szpak commented Sep 25, 2018

@germanattanasio Have you been able to tweak uploadArchives to consider the stagingProfileId value (or at least check it is not possible and report a feature request in Gradle)?

@szpak
Copy link
Contributor

szpak commented Sep 25, 2018

@Hillkorn Is there an (open) Travis issue related to using different different IP address? I believe I' ve read it then, but it's not linked here and I cannot find it anymore. If not, maybe it would be good to ask Travis guys about that? I assume the problem is in the same Travis build, only in different upload tasks (due to having multiple modules), right?

@Hillkorn
Copy link
Collaborator

As I remember the issues was that the ip address changed during the upload of the artifacts.
Have you tried the gradle-nexus-staging-plugin together with maven-publish? With this plugin you can open and close a repository to tell it when your'e done with your upload of artifacts
https://github.com/Codearte/gradle-nexus-staging-plugin/

@pavolloffay
Copy link

@szpak here is an issue reported in travis-ci travis-ci/travis-ci#9555

@szpak
Copy link
Contributor

szpak commented Oct 15, 2018

Thanks @pavolloffay . I have found it in the meantime :).

Just for a reference, this issue is tracked in gradle-nexus-staging-plugin as Codearte/gradle-nexus-staging-plugin#76

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants