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?

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

    • It overrides the metadata files – content.jar and/or artifacts.jar. Inside those files there are pointers to the plugin jars, and those are changing according to the version.

  1. This is very cool! Or it would have been if it worked…

    If I try to upload files calles artifacts.jar or content.jar, they seem to disappear in a black hole. The version is created, but there are no files.

    If I try to upload some other files, it works ok, but they can not be “overwritten”. So I guess that there is some magic handling of artifacts.jar and content.jar – but why don’t they show in the files list?

    • Thanks for getting in touch! It definitely works, lots of Eclipse plugins are successfully hosted on Bintray by now. The best way to seek help with Bintray is using the feedback widget. Just click on the “feedback” tab on the right side of any Bintray.com page and you’ll be contacted shortly.

  2. FYI-
    The supported P2 metadata files are:
    contents.jar, artifacts.jar, compositeContents.jar, compositeArtifacts.jar, and p2.index
    Once uploaded using the REST API – these files are available in the download path, but are not visible in the UI. They can be overridden without limitation.

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