buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <>
Subject Building OSGi bundles with Buildr and Bnd
Date Tue, 16 Mar 2010 00:38:41 GMT

I am investigating Buildr to build OSGi bundles using Bnd. Has anyone
done this before or know of any example build files that I could have
a look at?

If no one has done it I guess the best approach is to create a plugin?
In practical terms OSGi bundles are just jars with extra metadata in a
manifest. Bnd is a java tool that jars up resources and adds
appropriate metadata based on some directives in a supplied manifest

My current plan is to support something like

package(:bundle).tap do |p|
  p.directive("Export-Package", "#{id}.*;version=#{version}")

Which I believe means I need to define a method such as follows on the
project via an extension.

def package_as_bundle(file_name)
    ... insert magic here ...

Does this sound reasonable?


Peter Donald

View raw message