On Saturday 31 May 2008 15:02, Robert Burrell Donkin wrote:
> over in JAMES, we'd like to OSGi enable our upcoming library releases
> so that they can be used unforked in OSGi environments. the plan is to
> use the maven plugin but we don't have a lot of OSGi experience. so
> i'd like to add some integration tests to check that the libraries
> function ok when used in an OSGi environment. this seems a reasonably
> general requirement and i was wondering about a general integration
> testing micro library to test that a library was correctly enabled.

Robert,

I think the first necessary step is to incorporate the so called BND tool into 
your build. If you are using Maven, then there is a plugin available here to 
make it easier.

BND recursively walks through the classes and figures out what is needed and 
compares that against a "recipe" that you specify. The recipe can either be 
explicit (in which case every import has to specified or else an error) or 
you use wildcards (less recommended).
The recipe also contains information about which packages should be Exported, 
ignored and kept private.

With BND it is not too hard to maintain the recipe (typically an external 
file), and will lower the initial need for in-container tests.

Setting it up is easy, if you know what you are doing, so I suggest that 
someone here volunteers (Stuart???) to help you out.


Cheers
-- 
Niclas Hedhman, Software Developer

I  live here; http://tinyurl.com/2qq9er
I  work here; http://tinyurl.com/2ymelc
I relax here; http://tinyurl.com/2cgsug

Reply via email to