buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rhett Sutphin <rh...@detailedbalance.net>
Subject Re: Building OSGi bundles with Buildr and Bnd
Date Tue, 16 Mar 2010 00:55:57 GMT
Hi Peter,

On Mar 15, 2010, at 7:38 PM, Peter Donald wrote:

> Hi,
> 
> 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?

I use bnd with buildr in this project:

https://ncisvn.nci.nih.gov/svn/psc/trunk/

Take a look at the buildfile and tasks/bnd.rake

I do not use a custom package type, though if I were doing it again now I would.

Rhett

> 
> 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
> file.
> 
> My current plan is to support something like
> 
> package(:bundle).tap do |p|
>  p.directive("Export-Package", "#{id}.*;version=#{version}")
>  ...
> end
> 
> 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 ...
> end
> 
> Does this sound reasonable?
> 
> -- 
> Cheers,
> 
> Peter Donald


Mime
View raw message