2024-03-19
Bintray shutdown : cheap alternative with Google App Engine

Bintray shutdown : your own cheap Maven repository with Google App Engine.

https://sylvainleroy.com/wp-admin/options-general.php?page=ad-inserter.php#tab-2

Since shut down in 2021, numerous OSS projects have been annoyed with the lack of availability from Maven repository hosting solutions. Of course Sonatype – Maven central exists but to the price of a long, annoying, and cumbersome uploading process. I still maintain several maven Java and some are hosted on Maven central ( because I consider them as original work) and some are simple forks. For the latter one, I want to host my own repository.

Contents

shut down

JFrog has announced that they are shutting down the Bintray hosting service, which includes the popular JCenter hosting service for Java artifacts, as well as GoCenter (which hosted Go packages) and ChartCenter (which hosted Helm charts).

On May 1, 2021, the sunset will impact all existing users. users will be blocked and will no longer be able to use the service.

Possible alternatives

Several alternatives exist now, but often not free like was before.

  • Self-hosted: Sonatype Nexus OSS
  • Self-hosted:
  • Self-hosted: Web server (Apache, NGINX)
  • SAAS: Cloudsmith
  • SAAS: Packagecloud
  • SAAS: Maven central with Sonatype
  • Self-hosed/SAAS: Gitlab repositories
Cloudsmith Opensource offer
Cloudsmith Opensource offer

Indeed, we have several solutions however it comes with several drawbacks :

Self-hosted solutions Maven repository based on Nexus or JFrog

The solutions are extremely expensive to host on GCP or AWS, they suck RAM like a newborn baby his milk.

You may try to find another Cloud provider offering 2Go+RAM for your instance, but still, it’s expensive.

You will have to maintain a tightened security configuration of Nexus or JFrog, and I think you don’t want to spend time on it.

Well, it seems overkill for two maven libraries…

Self-hosted solution based on Webserver

Dead easy to set up, a simple light compute instance + persistent disk

Drawback: it does not handle maven artifact uploading. You need to set up WebDAV or an FTP or an SSH tunnel. And I personally hate Maven wagons.

SAAS Offers you lost all the history from your repositories on Bintray and you would put your trust into another Artifact repository solution with a mix of premium and free services? No way. Bintray was the biggest one and they fail.

Maven Central + Sonatype

if you think your work is good enough and is not a fork from another original work, let’s upload on Maven central after a long tiring and cumbersome process. But I won’t recommend going through these steps if you are often working on a fork from an original work and for some reason, they do not integrate your modifications. You will duplicate the maven artifactID in Maven central and mvnrepository.com and just for this it is a bad idea.

My solution is originally taken from Renaud Cerrato

Finally, I was in the favor of a simple Webserver solution with uploading ability. I also wanted something almost static to decrease to the maximum the operational costs and if possible stored into persistence storage like S3 or Google Cloud Storage.

 

Maven repository with GCP AppEngine
Maven repository with GCP AppEngine: https://github.com/renaudcerrato/appengine-maven-repository

I discovered this project https://github.com/renaudcerrato/appengine-maven-repository that matches my need and I successfully applied it.

The advantages of this project are :

  • Cloud compatible: it uses GCP
  • Cost-effective: Google AppEngine is really cheap
  • Permanent storage: everything is stored in Bucket Storage
  • Serverless: no or limited administration effort.

The drawbacks :

  • no snapshot purge
  • some limitations ( see the issues in the Github project)
  • limited user and roles.

The project worked fine, the differences with the readme are  :

  • Create a custom domain: you need to map your maven repository with a custom DNS
  • Eventually, add a load balancer above with a CDN to limit the calls to your Google AppEngine.

In this article, I presented the solution I retained to replace Bintray and to host now my maven artifacts using GCloud and Google App Engine.

Sylvain Leroy

Senior Software Quality Manager and Solution Architect in Switzerland, I have previously created my own company, Tocea, in Software Quality Assurance. Now I am offering my knowledge and services in a small IT Consulting company : Byoskill and a website www.byoskill.com Currently living in Lausanne (CH)

View all posts by Sylvain Leroy →