Hosting your Eclipse update site (P2) on Bintray.com

Did you know you can easily host your Eclipse update site on Bintray.com?

After registering to Bintray (and optionally, creating or joining an organization), it’s as easy as 1-2-3:

  1. Use the predefined ‘generic’ repo (or create a new one) if you are generating a plain P2 update site, or ‘maven’ repo if you are generating a Tycho zipped site, and create a package for your site.
  2. Upload the Eclipse update site meta files (content.jar, artifacts.jar, etc. for site, or zip file with Tycho site) under the latest version, typically to the root path.
  3. Click on the “Set me up” button on the package page to get the necessary URL to use in Eclipse.

That’s pretty much it. Here’s an example:

Nodeclipse hosts their update site on Bintray:

Nodeclipse Eclipse update site on Bintray

Click to see Nodeclipse Eclipse update site on Bintray

In Eclipse, users just use the Bintray package link as an Update Site URL:

Install Bintray packages from eclipse

Install Bintray packages from eclipse

Cool, right? Well, almost :). Nodeclipse created an update site for each version (notice the ’0.10.0′ at the end of the URL). It means that users may need to change this URL in their Eclipse settings for every new version released. That’s because up until recently you couldn’t override P2 metadata files.
But that’s not the case anymore! By using the REST API upload method you can always override P2 metadata files with new ones. Putting these files in the root of the repo lets users point at a permanent, single URL to configure Eclipse. Expect the upcoming release of Nodeclipse to follow this improvement :).

So here’s a win-win situation for you:
You get an awesome and free distribution platform with near-real time statistics, download-able request logs and and metadata.
Your users get lightening-fast downloads via a CDN directly from Eclipse, plus lots of new ways to get involved with your package. For example, the ability to follow organizations and users, or to review, rate and watch packages.

And oh, did we mention that Bintray is completely free to use for open-source packages?

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.

Increase your package visibility, the social way!

So, your binaries are hosted on Bintray and you are watching your package download stats grow.
It’s time for a boost!
Two great new features online today; they might be small but they are powerful in spreading the word about your packages, or packages you like.

The Latest Download Image

Add a Download Link badge to your GitHub or Bitbucket ReadMe’s using our new Latest Download Image generator.
This will create a badge showing a download button, linking to the latest version of your package.
Currently we support: Markdown and Asciidoc, or plain old HTML.
Latest Version Download Badge

The Version Notification 

Visit any package hosted on Bintray and you will now find a “version notification link” badge that you can copy-paste to your website / blog / email.
Version Notification Link Badge
When your visitors click the badge, Bintray will encourage them to Watch the package, in Bintray’s usual friendly, non-obtrusive kind of way.
 
Watch alert - after clicking a version notification badge
Enjoy…

Tracking New Java Libraries Has Never Been Easier!

Want to know when a new version of $YourFavoriteJavaLibrary is released (and I mean – any Java library)? With Bintray, it’s one-two-three.

  1. Go to bintray.com and search.

    Search Bintray

    Click to enlarge

  2. Click on the package you’d like to watch.

    Bintray Smart Sorting

    Click to Enlarge

  3. Click “watch”, (log in if needed).

    Bintray Watch Package

    Click to Enlarge

  4. Done.
  5. Watch your mailbox, you’ll get an email.

    Bintray Email Notification

    Click to Enlarge

It can’t be simpler than this, can it? :-)

P.S. Of course, this functionality is not limited to Java packages only. Any binary in Bintray can be watched for new versions.

It’s Your Content, Claim The Logs For It

Improved statistics we introduced last month give you much more information about the users that download open source software you publish than any other binaries distribution platform ever.

But why stop there? What if you want even more? One of the most powerful ways to slice and dice your download stats is to play with Apache-style logs. This standard, known as Common Log Format, is well familiar and there are tons of utilities for parsing, analyzing and generally going wild with these logs.

If you you’re an open source developer distributing your packages on Bintray, you may have wished for the logs. You may have also thought that since Bintray is SaaS and the platform’s logs are part of how the backend works, then you’ll need to settle with what we give you in the UI.

Well, wrong! The good news are – we give you all your logs, in standard Apache format, and it’s up to you how to get them – by a REST call or from the UI:

Download logs

Click to Enlarge

If your package is included in JCenter, you can go a head and download your log files today. Other repositories will get their logs soon.

Share Your JavaScript Libraries With The World

laziness

Let’s face it, developers are lazy (including myself). Philipp Lenssen agrees with this saying in his post by stating:

Only lazy programmers will want to write the kind of tools that might replace them in the end. Lazy, because only a lazy programmer will avoid writing monotonous, repetitive code – thus avoiding redundancy, the enemy of software maintenance and flexible refactoring. Mostly, the tools and processes that come out of this endeavor fired by laziness will speed up the production.

You, being a brilliant JavaScript developer building this awesome library that everyone has been waiting for, looking for a tool which will help you avoid writing monotonous, repetitive code.

Validating, compiling, minimizing, concatenating and the list goes on, these are the tasks you need to do before releasing your library to the wild.

Fortunately, those are the tasks almost anyone writing JavaScript code needs to do and that’s the problem Ben Alman set out to solve when he created Grunt.

Meet Grunt: The Build Tool for JavaScript

grunt

Grunt is a task-based command line build tool for JavaScript projects that facilitates creating new projects and makes performing repetitive but necessary tasks such as linting, unit testing, concatenating and minifying files (among other things) trivial.

That’s what Grunt aims to be. It has a bunch of built-in tasks that will get you pretty far, with the ability to build your own plugins and scripts that extend the basic functionality.

For more Grunt intro goodness, see Ben’s post on his personal blog and the Bocoup blog.

So, now you are sold and your project is fully automated in just about few minutes of work, now what? Well, now it’s time to distribute it to the people. That’s the whole point of software anyway, we want people to use our stuff.

Bintray + Grunt + grunt-bintray-deploy = Pure Awesomeness

The Grunt ecosystem is huge and it’s growing every day. With literally hundreds of plugins to choose from, you can use Grunt to automate just about anything with a minimum of effort, that’s exactly what I decided to do.

I’ve written a grunt plugin which will help you share and distribute your project to Bintray and from there to the rest of the world.

By using Bintray you are are able to distribute your library through a high speed CDN, your users could point their HTML JavaScript tags directly to a URL Bintray gives you!

With Bintray you know how your library is being consumed. Not only do you get download stats per version, but users are also able to communicate with you; comment and rate your libraries; or otherwise give you feedback.

Setup

Let’s use Yeoman to scaffload a Node.js module which later on will be distributed to Bintray:

mkdir mylib

Install Yeoman globally:

npm install -g yo

Install the nodejs generator globally:

npm install -g generator-nodejs

Download the grunt-bintray-plugin and save it as a development dependency into our package.json:

npm install grunt-bintray-deploy --save-dev

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

grunt.loadNpmTasks('grunt-bintray-deploy');

Now let’s configure the task to publish our index.js and package.json files to Bintray!

grunt.initConfig({
  bintrayDeploy: {
    bintray: {
      options: {
        user: "bintray_user",
        apikey: "bintray_api_key",
        pkg: {
          repo: "repo",
        }
      },
      files: [{
        expand: true,
        flatten: true,
        src: ["index.js", "package.json"],
        dest: "<%= pkg.version %>",
        filter: "isFile"
      }]
    }
}})

Now we are ready to run our grunt task:

grunt bintrayDeploy

Running "bintrayDeploy:bintray" (bintrayDeploy) task
>> Successfully created new package 'mylib'.
>> Deploying files to 'https://bintray.com/shayy/repo/mylib/0.0.1/files'
>> Successfully deployed 'index.js'
>> Successfully deployed 'package.json'

Done, without errors.

That’s it, here is how it looks like under your Bintray account:
Publish to Bintray

Look, this is the URL your users will use to consume your library from a fast CDN:
Download from Bintray

Now that everything is automated, we can finally go taking a nap and leave our CI server to do this nasty job.

Piece out.