buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <>
Subject Re: Building OSGi bundles with Buildr and Bnd
Date Fri, 19 Mar 2010 23:33:53 GMT
On Tue, Mar 16, 2010 at 11:46 AM, Antoine Toulme
<> wrote:
> We don't do bnd but I implemented a plugin to do OSGi. We enforce
> dependencies from the manifest to the Buildfile rather than the contrary.
> It's named buildr4osgi.

That looks neat. I am just new to OSGi so I am just getting my feet
wet and I like the ease with which bnd creates the jars. So I plan to
stick with that for now.

On Tue, Mar 16, 2010 at 11:55 AM, Rhett Sutphin
<> wrote:
> I use bnd with buildr in this project:
> 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.

That was a great example thanks. I finally got back to look at this
and ended up customizing your extension so it worked the same way as
my brain does ;) I basically made a :bundle package type and had bnd
create the jar rather than replacing one created by jar. An example of
using the extension is

 desc 'Bundle of jms utility classes'
  define 'link', :layout =>'link') do
    bnd['Export-Package'] = "#{group}.#{leaf_project_name}.*;version=#{version}"

    package :bundle
    compile.with JMS

I have attached a version of the extension so that you can see what I
have done. I plan on continuing to refactor the way properties are
handled so that it easier to share sets of properties between
projects. Any thoughts?

Also is it a good idea to submit this extension to the project? Or is
there another place where tasks like this should live?


Peter Donald

  • Unnamed multipart/mixed (inline, None, 0 bytes)
View raw message