Skip to main content

[Hudson-Dev] Re: Hudson on OSGi

  • From: Jason Dillon <jason@...>
  • To: dev@...
  • Subject: [Hudson-Dev] Re: Hudson on OSGi
  • Date: Tue, 15 Mar 2011 19:04:12 -0700
  • Domainkey-signature: a=rsa-sha1; c=nofws;; s=gamma; h=sender:from:mime-version:content-type:subject:date:in-reply-to:to :references:message-id:x-mailer; b=HlZtohdcDnRvoH6lSw/6cCPKwb+zA0kXCpuDtb1LmZFCMbDDAV89EItx4n+O1RAyu5 LSZxi9746Ca6E8hUPRDLBA18c7DzO1yUxgVMDLBplPgsGYMfbVfq02Ha3/BIysgp5oEm UPJiHt0WArSkvWopMMB6ogfVY0jydWDfBE4cY=

Fricken awesome sauce!


On Mar 15, 2011, at 12:49 PM, Stuart McCulloch 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

[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