Skip to main content

[Hudson-Dev] Re: Hudson on OSGi

  • From: Stuart McCulloch <mcculls@...>
  • To: dev@...
  • Subject: [Hudson-Dev] Re: Hudson on OSGi
  • Date: Tue, 15 Mar 2011 20:46:36 +0000
  • Domainkey-signature: a=rsa-sha1; c=nofws;; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; b=puq+bu1NPeQJs0l96c/POnFhON4yt3Z0dC08ii1vaeUeKJvC/HHqb9MRdf10/uUqnM iBEtGe6OMuPaK0BZNYjHD1k7ffQnV3MzUuVugDrEy9OqD+DAN9jL5LC6/g7dAMXj6Lp5 E+cmQS6UTZ+878xUHh5yd2ASQud3ZTJlvwunw=

On 15 March 2011 20:25, Toni Menzel <toni@...> wrote:
Great, Stuart! Thats start of things i expect to see from Hudson (compared to the Jenkins branch).

Well I'm sure they'll be doing some interesting things too :)
Just wondering if the Gemini stuff is purely political or a technical advantage over its alternatives. ;)

Actually I was planning on showing a second example with Aries, but the Apache website happened to be down when I went to download it :/

The final OSGi-fied version of Hudson should run on any R4.2 framework, so people can choose their favourite runtime.


On Tue, Mar 15, 2011 at 8:49 PM, Stuart McCulloch <mcculls@...> wrote:

The last few days I've been experimenting with Hudson on OSGi - seeing what breaks, what can be split into bundles, and how plugins might work as OSGi bundles. At the moment I'm using the Eclipse Gemini-Web project to load and auto-convert the Hudson WAR into a Web Application Bundle (WAB) - part of the OSGi Enterprise Specification from

I can now get Hudson up and running with the following instructions:

1)  Setup Gemini-Web using the instructions from

2)  Launch Equinox from the Gemini-Web setup using:

    java "-Dorg.osgi.framework.bootdelegation=sun.*,*" -jar org.eclipse.osgi_3.6.0.v20100517.jar -console

     ^ the bootdelegation setting is currently needed by XStream (expects to "sun.misc" to be visible) and JChart (needs to see the Apple LaF on OS X)

3)  Install the Hudson WAR, which will be auto-converted by Gemini into an OSGi WAB... warning it can take a long time to convert because it's ~35mb!

    osgi> install webbundle:file:/tmp/hudson.war?Web-ContextPath=hudson
    Bundle id is 40

     ^ the webbundle: protocol does the wrapping, and we manually set the context path (won't be necessary when we add the header to the original WAR)

4)  Start the Hudson WAB:

    osgi> start 40

Here's a transcript of the console messages as Hudson starts up:  (includes a list of the installed bundles)

Note: remote builds fail at the moment because hudson.remoting.Which.jarFile() currently doesn't know how to handle the "bundleresource:" URL protocol. I'm working on fixing that, then I'll move onto loading Hudson plugins as bundles which is where the real fun starts! Another interesting topic is how to slice Hudson into smaller bundles, which should speed things up (no need to convert the WAR). Having a selection of smaller bundles also means people could choose which features to install (ie. reduced footprint) and provide a way to patch individual components without having to update everything. The classic WAR would then be a merge/assembly of the individual bundles.

My OSGi work will be available from  -  starting with the fix to Which.jarFile()

Cheers, Stuart

Toni Menzel -

Cheers, Stuart

[Hudson-Dev] Hudson on OSGi

Stuart McCulloch 03/15/2011

[Hudson-Dev] Re: Hudson on OSGi

Toni Menzel 03/15/2011

[Hudson-Dev] Re: Hudson on OSGi

Stuart McCulloch 03/15/2011

[Hudson-Dev] Re: Hudson on OSGi

Jason Dillon 03/16/2011
Please Confirm