[XOM-interest] XOM built as an OSGi bundle
Tatu Saloranta
cowtowncoder at yahoo.com
Thu Apr 23 18:43:55 EDT 2009
--- On Thu, 4/23/09, Elliotte Harold <elharo at ibiblio.org> wrote:
> How would one test that the proper entries had been added to the
> manifest? That is, how do I know that I haven't missed or
> misspelled something? Is there an OSGI validator somewhere?
I use console from Apache Felix (http://felix.apache.org/site/index.html).
Start it with 'java -jar felix.jar', load jar (load file:/xxx.jar), install, start. If that succeeds, bundle is ok to some degree; for example, all dependencies it declares are resolved.
But to generate correct manifest entries there are Ant tasks & Maven plug-ins. These are useful in properly verifying that definitions make sense, all expected dependencies are resolvable and so on. For me this caught most problems and loading via console only fails if dependencies are not loaded in correct order.
On dependencies -- OSGi actually offers a way to resolve "private dependencies" problem; that is, allowing package to depend on specific version of another library. With XOM this could be used to enforce dependency to specific Jaxen version without having to bundle it or rename package. So OSGi bundle jar could avoid bundling Jaxen classes, just declaring correct version or version range for classes it depend on.
-+ Tatu +-
More information about the XOM-interest
mailing list