Enjoy Bintray and use it as pain-free gateway to Maven Central

What does it means when some tool or framework has literally dozens of guides, pages long each?maven central dinosaur
It probably means that it is popular, or complicated to use. Usually, both.

That’s the story of Maven Central (a.k.a. Central Repository, a.k.a. repo1, a.k.a. ibiblio). Of course, there is a better alternative nowadays – Bintray is already a super-set of Maven Central, both in terms of UI, UX and content, but Maven Central is still “hardwired” into the super-popular Maven 2. As such, it is being used by many – by Maven users of course, but also by Ivy, and even by Gradle users (those not familiar with Bintray’s ‘jcenter()’ repo yet). That means that you (still) want your package to also end up  there.

But getting it there is painful… *Very* painful.

Maven Central #fail

Click to enjoy the comments :P

To understand how painful, next time you take a break, here’s a nice old-school text quest.

So, you get the picture. There has to be a better way. Indeed there is. Why don’t you use a proper distribution platform, with easy and intuitive on-boarding, publishing and sharing, with rich near real-time statistics, downloadable logs, packages inclusion, watching and sharing abilities, and much more. You know, Bintray.

Here’s the deal:

First, some simple one-time setup needed to be done.

  1. Register to Bintray and set up auto-signing: Generate yourself a keypair, if you don’t have one. Add it to your profile, and setup your default Maven repo (or a new one) for signing with your GPG key: Bintray can then sign your jars automatically.
  2. Add your Sonatype account under “accounts”. If you don’t have one, follow this procedure (yeah, we know what you are saying when you see it, that’s the last “wtf” in this guide, we promise).
  3. Create and link your package: Import from a GitHub repo or create a new package for your Maven project (multi-module projects can map to a single package). Click on “Add to JCenter” to get your package linked to the largest Java Maven repository on the planet.
  4. Set up Maven up to deploy to Bintray by copy-pasting the pom.xml snippets from “Set me up!” guide, or use the bintray-gradle-plugin.

Now, for each release, it’s easy as 1-2-3:

  1. Deploy: Deploy files to Bintray by running your build tool*.
  2. Publish: Review the build artifacts in Bintray and publish the version files if satisfied. Don’t forget to advertise your new release using a single-click tweet.
  3. Sync: On the version page go to the Maven Central tab (the one with the dinosaur icon on it), enter your Sonatype password and click “Sync” and you’re done! Your package is now in https://oss.sonatype.org/content/repositories/releases and will be synced to Maven Central (and they usually take their time). In case of a sync problem, Bintray will automatically take care of any needed cleanup.

Next, you’ll probably feel the urge to to tweet something like this:

Don’t resist it. You are joining spring, netty, jenkins, joda-time, asciidoctor and many many others that already feel the same way.


* Remember: distribution platform is not for SNAPSHOT-s. Stay tuned for our post about oss.jfrog.org to see how you can get access to a free binary repository with one-click promotion to Bintray.

5 thoughts on “Enjoy Bintray and use it as pain-free gateway to Maven Central

  1. Your biggest problem, as I see it, is your poor record supporting users. I tried using JFrog for years and got absolutely no response for legitimate bug reports. This doesn’t speak well for Bintray or any other project you would like the community to adopt (and yes, Bintray is a great idea!)

    • Thanks for your input. There is no such product “JFrog”, with or without bugs :) I guess you refer to Artifactory when mention “tried using JFrog for years”? We are very surprised to hear that. Our customer support is one of the things we are most proud of (and our retention rate proves that).
      We’ll be glad to get any references for the unsolved problems you had. If you have any JIRA liks for the reported and non-responded bugs, please bring our attention to them.

      Thanks again for this comment.

      • Sorry yes. Artifactory :) and in retrospect, it isn’t as bad as I remembered it being.

        If you go into the issue tracker and query all issues reported by “cowwoc” you will find 7 issues. 4 were resolved, 3 are outstanding. My main complaint is that the outstanding issues received no reply for over 6 months. I’m not necessarily expecting issues to get fixed right away, but at the very least there should be follow-up to confirm whether you can reproduce the bug and/or plan to fix it in the future.

  2. Thanks for reporting the issues in our JIRA. The reason the issues are unanswered is that we do not communicate with our users using the JIRA comments (nor by blog comments BTW :-) ). There are much better channels, like the forum, the user-list and the customer support, of course. You are more than welcome to use one of them, and your query won’t remain unanswered, guaranteed.

  3. Pingback: Distribute project’s artifacts in Maven Central with OSSRH | Rule of Tech

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s