On 11/4/10 9:18, [email protected] wrote:

Richard,



Sounds like having the default behavior for the export tag being to set 
noimport to true may be the best solution.  Do you agree?

Not really. I'm not sure which way is worse. The best solution, is to try to use a newer version of bnd and see if that helps.

-> richard



v/r,



Mike Van


----- Original Message -----
From: "Richard S. Hall"<[email protected]>
To: [email protected]
Sent: Wednesday, November 3, 2010 5:09:45 PM
Subject: Re: Default setting of<Import-Package>  of maven-bundle-plugin

On 11/3/10 17:04, [email protected] wrote:
All,



Recently I've been struggling with the issue of my packages importing what they 
export, and receiving unresolved constraint violations.



Currently, using the maven-bundle-plugin, I am using the default behavior of 
the<Import-Package>    and<Export-Package>    tags.  This results in (among 
other things), the Import-Package portion of my MANIFEST.MF file containing all packages 
exported in the Export-Package section.



To fix this, I have been 
using<Export-Package>*;-noimport:=true</Export-Package>.



When explaining this in the IRC channel for #karaf, I was told that bundles shouldn't 
be importing thier own packages.  If this is true, should the default behavior 
of<Export-Package>    be changed to -noimport:=true?
The issue here is that there is no single rule that works in all cases.
Pure API packages (e.g., service interfaces) should be exported and
imported, but only if they are packaged with an implementation of the
service. If they are packaged in just a library bundle with no
implementation, then there is no reason to import them and actually it
is bad to do so.

We need to get a new version of the maven-bundle-plugin out that
integrates with a newer version of bnd, because Peter Kriens and I have
tried to improve the heuristics for determining when to import what you
export, whereas the version of bnd currently used always imports what
you export (by default).

Unfortunately, there are some issues that I am not sure how to resolve
to getting a new release of maven-bundle-plugin out the door, so
hopefully people who are "in the know" can help out.

->  richard




v/r,



Mike Van

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to