felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aaron Siri" <Aaron.S...@efi.com>
Subject RE: Bundle plugin: Importing packages from non-bundles
Date Wed, 06 Dec 2006 21:04:47 GMT
After our discussion I decided to go back and give the old plugin a try.  It
is definitely buggy.  It seems to randomly add packages to Import-Package no
matter where they come from (plain old jars or bundles.)  Maybe it is just me
but I can't make any sense in what it is doing.

I think Emil (correct me if I'm wrong) and I would both like to see only
packages from bundle dependencies added to Import-Package, not stuff from
embedded plain old jars (which should instead be added to the classpath.)
The new plugin's behavior for this is nice, as long as it only looks at
bundle dependencies and not jar dependencies.  I think Emil is then saying
that if both a bundle and a plain old jar provide a package then don't put it
on Import-Package (i.e. let it resolve to the plain old jar via the
classpath.)  The embedded plain old jars should override bundles (maybe OSGi
spec already dictates this.)

The Bundle-Classpath entry from the old plugin looks good though.

So, is anybody invited to work on the plugins?

-Aaron

P.S. I want to thank Richard and Peter for putting up with all of my
questions/complaints.  I'm learning a lot in this newsgroup.

-----Original Message-----
From: Richard S. Hall [mailto:heavy@ungoverned.org] 
Sent: Wednesday, December 06, 2006 2:25 PM
To: felix-dev@incubator.apache.org
Subject: Re: Bundle plugin: Importing packages from non-bundles


Emil Eifrém wrote:
> On 12/6/06, Peter Kriens <Peter.Kriens@aqute.biz> wrote:
>> How can it NOT generate Import-Package for bundles that are on the 
>> Bundle-Classpath?
>
> Maybe this is a typo, but maybe it's important. I'm not going to have 
> any *bundles* on the Bundle-Classpath, I'm going to have plain jars.
> (See my commons-logging example.) Does this make a difference?
>
>> This means you have unresolved dependencies in your code, which can 
>> give you very nasty problems during deployment and running the code. 
>> That is like putting out class files that have compile errors.
>
> Hmm, then I'm mistaken about some OSGi fundamentals. I thought the 
> framework matched my bundle's Import-Packages to other bundles 
> Export-Packages. In this case, I don't want the framework to find a 
> bundle that provides the package since the package is provided by the 
> (plain, non-bundle) embedded jar on the Bundle-Classpath. That's why I 
> thought the plugin shouldn't add the package to the Import-Package 
> statement.
>
> Is this an incorrect understanding of how OSGi works?
Your understanding of OSGi is correct.

I think there is a misunderstanding about what you are describing.

You are saying that you don't want imports generated for the same packages
contained inside of embedded JAR files on your bundle class path, correct? I
think Peter thought you meant that you didn't want to generate imports for
the packages required by the packages in your embedded JAR files. You want
the latter, but not the former...you indicate that the former is probably a
bug in the old plugin. Correct?

-> richard

Mime
View raw message