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.
Yes, a plugin is needed to make it happen. Thanks, Antoine On Mon, Mar 15, 2010 at 17:38, Peter Donald <[email protected]> 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? > > 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 >
