2009/11/24 Toni Menzel <[email protected]>

> Why exactly do you want to do this ?
> It is common (and good) practice to import what you export to the framework
> more options for wiring. You don't lose anything. Its also known as
> "package
> substitution".
>

FYI, every rule or "best-practice" has exceptions ;) in this case if you
have a library (ie. non-API) that you don't expect to ever have multiple
implementations, or you have tightly coupled packages then it might
make sense to avoid importing:


http://felix.apache.org/site/apache-felix-osgi-faq.html#ApacheFelixOSGiFAQ-Shouldabundleimportitsownexportedpackages%3F

to put it another way, occasionally you just want to disallow substitution.

If you really want to do this, you try add a Import-Package:
> !myexportpackage,*
> But you usually do not want to do this.
>
> On Mon, Nov 23, 2009 at 7:14 PM, Alan D. Cabrera <[email protected]
> >wrote:
>
> > When converting 3rd party jars it's my understanding that it's a good
> idea
> > that if it's a "leaf" jar, i.e. has no deps, then it should not import
> what
> > it exports.
> >
> > It's not clear to me how I should configure the bundle plugin to do this.
> >
> >
> > Regards,
> > Alan
> >
> >
>
>
> --
> Toni Menzel
> Independent Software Developer
> Professional Profile: http://okidokiteam.com
> [email protected]
> http://www.ops4j.org     - New Energy for OSS Communities - Open
> Participation Software.
>



-- 
Cheers, Stuart

Reply via email to