dev@glassfish.java.net

Re: Glassfish OSGI bundle

From: Sahoo <sanjeeb.sahoo_at_oracle.com>
Date: Fri, 10 Dec 2010 00:18:22 +0530

bnd is the right tool to make the bundle.
If you are using maven, then use maven-bundle-plugin.
If you are using Ant, then use ant plugin of bnd.

You can drop your bundles in glassfish/modules/.

Can you tell a bit more about what kind of container you are writing? If
you are using any of the HK2 annotations like @Service, then you must
use hk2-maven-plugin in conjunction with maven-bundle-plugin to make
your bundle.

Sahoo
On Thursday 09 December 2010 02:01 PM, Lee Chuk Munn wrote:
> Hi
>
> I'm writing a container for GF. I need to create some OSGi bundle for
> JARs that my container uses. Can you help me with a few questions?
>
> 1. What is the best way to bundle these JARs? Are there any tools that
> you use in GF to bundle these? I'm currently using bnd.
>
> 2. I looked into one of the manifest files of one of the bundle
> grizzly-container.jar and found some properties like HK2-Import-Bundles,
> HK2-Class-Path-Id, HK2-Bundle-Name keys. Are these similar to the OSGi
> properties?
>
> 3. Where do I drop the bundles after I have created them? In
> glassfish/modules directory? Is there a felix command to see if my
> bundle have been 'deposited' correctly?
>
> Appreciate you help as I'm fairly new to OSGi.
>
> Thanks
>
> Regards
> Chuk
>