Search code examples
androidbintrayjcenter

Jcenter: How to upgrade library?


I am newbie to publishing library to Jcenter.

I have successfully created a library, uploaded it to bintray(v1.0) and linked it to Jcenter by following this

Now I did some improvement changes to my source code and wanted that to be the default version 1.0, so I logged into my bintray account and deleted version 1.0( which is linked to jcenter). Now when I pushed my library to bintray it forced me to upgrade my version, which I did(v 1.1) and it sucessfully got uploaded to bintray. Now I wanted to publish this to jcenter so I tried to linked it to jcenter but I got the following message from bintray team

Hi,

The package you requested to include already exists in JCenter:

http://jcenter.bintray.com/com/worldline/in/worldlineipg/1.0/

The simplest thing would be to go to the package page and make an ownership request, which will keep it linked to JCenter from your own repository.

Before you make the ownership request please make sure you remove existing versions of the package from your repo in order to prevent conflicts. This way the ownership request can go through successfully.

After the ownership request has been approved, you may deploy modules directly into your package.

Kind Regards, JFrog Support

But at bintray's homepage I see 0 packages linked to Jcenter enter image description here

I can see both the version at bintray but Jcenter have only v1.0 published there.enter image description here

So I need little help in understanding

  1. How can I make v 1.1 as the deafult 1.0 and delete the current 1.0?
  2. If that's not possible then how do I push my v1.1 to Jcenter ?

Solution

  • With regards to the issue you are experiencing, it seems that the package 'worldlineipg' is not owned by you, and the owner of the package is "Bintray". You can verify it here. In addition, you can see that the package in your personal Bintray repository is not linked to JCenter. (See below screenshot) worldlineipg package

    This scenario, which "Bintray" user takes the ownership of the package, usually happens if the user deletes the package / rename the package after it is linked to JCenter.

    Since JCenter is an OSS repository and other people might use the files in it, we do not allow deleting packages from it. The scenario which "Bintray" user takes the ownership of the package promise that there will be no content loss.

    In order to regain ownership of the package, go to the package page and make an ownership request. (Click on the "I'm the creator" button).

    Before doing the above, please make sure to remove any packages with the same name or path prefix from your personal account. In this case, since you have a new version which is not in JCenter, you will have to add it manually again after you will re-gain ownership of the package.

    We hope this clarifies. Please let us know if you have any follow up questions regarding this.

    Best Regards,

    Yonatan Brand