Publish an Eclipse p2 update site at Bintray (via a shell script)

We at vogella GmbH recently started to use Bintray for the distribution of Eclipse p2 update sites. Bintray is a content delivery system which offers free hosting for Open Source projects. Bintray offers a REST API to upload content and we have written a small shell script which uploads the content of a p2 update side to Bintray and activates it.

You find it at Github https://github.com/vogellacompany/bintray-publish-p2-updatesite/. Pull requests to improve the script are welcome.

I used Bintray-Examples as blueprint for the script. This repo had an example how to upload a RPM to Bintray.

About Lars Vogel

Lars Vogel is the founder and CEO of the vogella GmbH and works as Eclipse and Android consultant, trainer and book author. He is a regular speaker at international conferences,

He is the primary author of vogella.com. With more than one million visitors per month this website is one of the central sources for Java, Eclipse and Android programming information.

This entry was posted in Eclipse, Lars Vogel. Bookmark the permalink.

4 Responses to Publish an Eclipse p2 update site at Bintray (via a shell script)

  1. Thanks for this example.
    It would be nice if you have the opportunity to turn it into a Maven Mojo one day, that would apply to eclipse-repository packages, so we could hook this to the deploy phase.

  2. alis says:

    Is it possible to get the pixel color?
    Hi,

    This is my first time that I’m using OpenGL in Android with Eclipse
    I want to make a simple app that will detect color of the current pixel by specifying X and Y coordinates of the main screen or other app like game.
    So if it is possible please give me function name or give me an example!

    Thanks in advance!

  3. Lonnie VanZandt says:

    Lars,

    Using a bit of your vast advice and the “Set me up” guidance from Bintray, I likewise added some plugin glue to a tycho eclipse-repository pom so that it will deploy the p2 update zip directly to bintray. Here’s the gist of it:

    Put your admin credentials for your bintray account (the serverId, the name, the API key) in your ~/.m2/settings.xml file.

    In the parent pom.xml:

    server-bintray-whatever
    Whatever
    https://api.bintray.com/content/${bintray.account}/${bintray.product_package_path}

    In the child pom.xml:

    org.apache.maven.plugins
    maven-deploy-plugin>

    true

    com.atlassian.maven.plugins
    maven-upload-plugin

    eg-upload-p2-update-site
    deploy

    upload

    ${project.build.directory}/${project.build.finalName}.zip
    ${project.version}
    server-bintray-whatever
    https://api.bintray.com/content/${bintray.account}/${bintray.product_package_path}

    Then from the parent module, you can “mvn deploy” the multi-module project and it will build the update site when the eclipse-repository project is visited and will skip the default deploy:deploy goal and will execute your upload:upload goal during the deploy phase.

    Note that this is using the “content” URL path parameter at bintray and not the “maven” one. You will get Bad Access HTTP responses if you try to push p2 sites to their maven URLs. Note that you will also get 401 and 409 errors if you try to push a SNAPSHOT site or if you already have uploaded a release site to that particular package version. (You need to create the product/package/version “folder” at bintray before you deploy, by the way. There is probably a REST API to pre-create that folder before the mvn deploy.)

  4. Lonnie VanZandt says:

    Looks like this site doesn’t like XML in a code element. Bummer.

Comments are closed.