felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Richard S. Hall <he...@ungoverned.org>
Subject Re: Bundle plugin: Importing packages from non-bundles
Date Tue, 05 Dec 2006 22:51:34 GMT
On Dec 5, 2006, at 5:47 PM, Steven E. Harris wrote:

> I brought up this point -- somewhat by accident -- just a few days
> ago, and the work I'm interrupting to type this once again has me
> considering whether it's worth it to rely upon the compendium
> bundle. In my case, I just wanted the org.osgi.util.tracker package,
> which consists of two files. But using the compendium bundle as it's
> intended has me also dragging in some servlet-related bundle -- and my
> application does nothing related to servlets.
> Is the compendium bundle's content specified by OSGi, or is this a
> Felix-specific combination of things? That is, would it still be
> possible to cut up the compendium bundle into smaller pieces without
> violating any OSGi specifications?

Yes, we can cut it up, but the reason the osgi.core and osgi.compendium 
JARs are the way they are is to replicate the standard JAR files that 
the OSGi Alliance makes available.

If you want to cut them up and you use the maven-bundle-plugin, you 
don't need to do anything other than create a new pom file for a bundle 
that depends on the compendium and grabs the packages you want to cut 

Any time you "cut out" a piece of another bundle/JA it implies that you 
have some knowledge about what you are doing. If you don't know what 
you are doing then you should just let the plugin generate 
Import-Package statements. If you know what you are doing, then you can 
cut it up. It doesn't really make a difference whether this cutting 
happens on the source version or the binary version.

The main point is that the maven-bundle-plugin gives you another option 
of dealing with less than perfectly cohesive dependencies, by allowing 
you to grab what you need when it makes sense.

There is no requirement that forces anyone to cut up and copy pieces of 
their dependencies; however, I admit that it could be easier for those 
whom want to embed their dependencies wholesale, so maybe that can be 

-> richard

View raw message