# Sonatype deployment problems

**URL:** <https://travis-ci.community/t/sonatype-deployment-problems/1353>\
**Category:** Travis CI Discussions & Feedback\
**Created:** [December 10, 2018, 8:23pm UTC](https://travis-ci.community/t/sonatype-deployment-problems/1353 "2018-12-10T20:23:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![zambrovski](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/zambrovski/32/722_2.png) [@zambrovski](https://travis-ci.community/u/zambrovski)\
**Post date:** [December 10, 2018, 8:23pm UTC](https://travis-ci.community/t/sonatype-deployment-problems/1353/1 "2018-12-10T20:23:51Z")

</div>

Hi Folks,

I was running release travis scripts for my Java/Kotlin FOSS to publish artifacts to Maven Central via OSS Sonatype Repository. Bu doing so, the default Maven Deploy plugin publishes to a so-called staging repository and then, the artifact can be synced and released to maven central.

Starting from today (at least I observed it today) this procedure stopped working. After some investigations and reading the change-log - here is my theory…

OSS Sonatype Nexus auto creates a staging repository for the build / deploy based on machine name, ip address and group name of the published artifact. They do have a problem for builds running behind firewalls and changing outgoing IP Address between artifact pushes (see [https://issues.sonatype.org/browse/OSSRH-5454](https://issues.sonatype.org/browse/OSSRH-5454)).

I read, that you changed your infrastructure setup from container-based towards VM based which involved the change of IP Addresses. This fact should not be a problem, but is it possible that you are using a different outgoing connection infrastructure, than it was for the containers?

Do you have any idea, if my theory is correct and how can I avoid that every upload from the Travis infrastructure comes from a different public IP address? Today I got seven staging repositories instead of one created - in fact this means that publishing of artifacts is not possible anymore, because it separates JARs from Source-JARs from JavaDoc files from POM.xmls to different staging repos and closing / releasing is not possible anymore…

P.S. to be more precise I just got the following IP addresses as sources:

- 35.192.85.2
- 35.193.7.13
- 104.154.120.187
- 35.184.226.236
- 35.224.112.202
- 35.202.145.110
- 35.188.1.99
- 35.184.96.71

here is the build [https://travis-ci.org/holunda-io/camunda-bpm-taskpool/builds/466091296](https://travis-ci.org/holunda-io/camunda-bpm-taskpool/builds/466091296)

Thanks,

Simon

---

<div class="post-metadata">

**Author:** ![mzk](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/mzk/32/1387_2.png) [@mzk](https://travis-ci.community/u/mzk)\
**Post date:** [March 19, 2019, 5:08pm UTC](https://travis-ci.community/t/sonatype-deployment-problems/1353/2 "2019-03-19T17:08:24Z")

</div>

Hello @zambrovski,

Thanks for bringing up this issue and sorry for the delay in providing feedback. @bbranan raised this issue with Sonatype here [1].

The primary recommendation from Sonatype came down to 2 things:

> 1. Use the nexus-staging-maven-plugin to perform the deployment (in place of the default maven deploy plugin)
> 2. Include a tag in the configuration in the configuration of that plugin

Can you try this solution as well and confirm it works for you? Thanks

[1] [Loading...](https://issues.sonatype.org/browse/OSSRH-46893)

---

<div class="post-metadata">

**Author:** ![szpak](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/szpak/32/1404_2.png) [@szpak](https://travis-ci.community/u/szpak)\
**Post date:** [March 20, 2019, 10:00pm UTC](https://travis-ci.community/t/sonatype-deployment-problems/1353/3 "2019-03-20T22:00:31Z")

</div>

@zambrovski You can also migrate to Gradle which (after proper configuration) works fine with the “new” Travis infrastructure 😉

> **[Reliable releasing to Maven Central from Travis using Gradle – 2019 edition](https://solidsoft.wordpress.com/2019/02/22/reliable-releasing-to-maven-central-from-travis-using-gradle-2019-edition/)**
>
> Make your (automatic) releasing to Maven Central from Travis (and not only) more reliable thanks to the explicit staging repository creation feature set implemented at the edge of 2018 and 2019. Ba…
