Monday, March 10, 2008

Eclipse Spaces - one step closer to code blogging

Wouldn't it be nice to be able to "blog your code" directly from inside Eclipse? Envision being able to share what you just implemented with others. Sometimes it is easy to post a few lines of example code in a blog, but a lot of the time a more elaborate configuration is needed to make it valuable for others. You would perhaps have to create an update site, or point the user to several source locations and let the user create a workable environment. Why isn't it as simple as just pressing "publish"? This was the fundamental question when we started the spaces project. The Eclipse Spaces project is now making a 0.1 version available where both "immediate publishing" and convenient consumption is available.

Here is how it works

Eclipse Spaces manages Publishing Areas of different types (such as an Update Site, or a flat list of files) inside a Space. A space is provided by a Space Provider such as AOL's Xdrive, SourceForge, or something generic like a File System Provider. To publish plugins to an Update Site, all that is needed is to select "Spaces > Publish" and then select the Space and Area where the plugin should be published. This will add the plugin to the update site with all update site meta data automatically generated. The update site is a normal Eclipse Update Site, and can be consumed with the normal Update Manager. But, Eclipse Spaces does more - when publishing is done, spaces also produces information in the update site for the Spaces Import Wizard which makes it possible to import not only the binaries bundles, but also the source (if it is publicly available), and to control if bundles should be installed in the target platform, or placed in the workspace. In addition to this, the Spaces Import Wizard can consult a mapping service and resolve and install bundles that are missing in the user's target platform. If you want to try this out here are some simple steps:

Preparation:

  1. Install Eclipse Spaces - you need Eclipse 3.3, and enter this remote site URL: http://dev.cloudsmith.com/updates
  2. Sign up for a free AOL Xdrive account (you get 5GB or free space) - note that AOL gives you an AOL email account when you do this, and this is the 'login' that you will be using later. Go to AOL Xdrive for Eclipse to sign up.

Publishing a plugin for the first time:

  1. Select "Spaces > Publish" in the context menu for a plugin project - this opens the space publishing wizard.
  2. Add the location to a new space by pressing "Add Space Location..." (then enter the address to your Xdrive account (i.e. your AOLemail, and the Xdrive host) + a name you select e.g . 'MyEclipseSpace')
  3. Select 'Update Site Publishing' (currently the only publishing operation available)
  4. Add an Update Site by entering a name (e.g. 'MyUpdateSite') and pressing "Add Update Site"
  5. Press Next and publishing is performed
  6. The URL to the update site is presented (and copied to the clipboard if you want)
  7. Use the URL in the update manager, or Spaces Import Wizard (explained below)

Publishing a plugin again:

  1. Select "Spaces > Publish"
  2. Select "Republish using previously used settings"
  3. Press Finish

Adding a second plugin to 'MyUpdateSite':

  1. Select "Spaces > Publish"
  2. Select the space, then the Update Site Publishing, and then the 'MyUpdateSite' publishing area.
  3. Press Next and publishing is done

Importing the Update Site:

  1. Select "File > Import "
  2. Enter the update site URL and Select where you want bundles to go
  3. Press Finish.

Spaces View

There is also a Spaces View, where it is possible to look at address information, reset password, discard a location, add a space location etc. Here is a screen shot
For more info on spaces visit Spaces at Eclipse.org

5 comments:

Antoine said...

I tried to publish my plugins to a space but it did not work. The operation seems to be running ok, but the URL at the end refers to a 404 page, and when looking at my xdrive account I just see the update site folders, and a XML file in it, no trace of my plugins.

Henrik said...

Hi, the URL you get is not browseable. If you append a "/" to it and use that URL in your browser you should see an index page. Also, if you feed the URL to the update manager, or to "Import > Spaces" - it should work fine.

The AOL xdrive HTTP publishing does not allow browsing of folders, you have to know the exact URLs. But this is enough for the update manager and imports to find what it needs. You can also try THEURL/site.xml to see the URLs to the other files.

If you want to talk live, you can contact the spaces team on irc.mainloop.net channel #spaces, or skype me at henrik.lindberg.

Henrik said...

note, it is important to update to the latest version of spaces and buckminster - this is done most easily by using the "http://dev.cloudsmith.com/updates" update site.

Mark Melvin said...

Hi Henrik,

I also could not install Spaces. However, I noticed your blog mentions the URL as http://www.cloudsmith.com/updates, but it should be http://dev.cloudsmith.com/updates (note the 'dev' instead of 'www').

I'm trying it out now...

Henrik said...

The bad URL has been fixed. Thanks for spotting that.