On Wednesday 27 June 2012 07:13 PM, Neil Bartlett wrote:
On Wed, Jun 27, 2012 at 1:23 PM, Stuart McCulloch<[email protected]>  wrote:
On 27 Jun 2012, at 12:19, Sahoo wrote:

When I use maven-bundle-plugin 2.3.7, it seems to be a version of bnd that's 
smartly calculating the list of substitutable export packages. I am not 
convinced that it can correctly calculate such a list. So, I would like to 
configure it the old way, i.e., to make it generate Import-Package for every 
Exported-Package. How do I configure? I tried saying:
<Export-Package>xyz; -noimport:=false</Export-Package>
but that didn't help.
I don't know of a way to override this (except by explicitly adding entries to 
Import-Package) but then again I haven't heard of an occasion where it went 
wrong.

Probably best to raise this on the bnd issues page at 
https://github.com/bndtools/bnd/issues ... especially since they're very close 
to cutting the next release.
I agree with Stuart. If you have a test case showing this failing then
there is a very good chance we will get it fixed in the 2.0 release.

I can't really call it a bug. It's a garbage in garbage out case.
I think one of the rules it uses to decide whether to generate substitutable export is that if no private package uses an exported package, then there is no need to import the package. Consider this:

bundle b1-1:
Export-Package: p2

bundle b1-2:
Export-Package p2; uses:=p1

bundle b2:
Export-Package: p1
Import-Package: p2

When metadata for b2 is being generated using new bnd, if b1-1 is in classpath, then new bnd won't think it is necessary to make p1 a substitutable export. But then such a bundle won't work when b1-2 is the only provider for p2.

I know one can attribute the problem to bad metadata of b1-1, but that's what exactly my point. I need a configuration option from bnd. I thought Peter Kriens was watching this forum, so I didn't post the question in bnd forum.

Thanks,
Sahoo

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

Reply via email to