On 01.04.2016 16:01, Quinn Stevenson wrote:
One clarification on the bnd-maven-plugin configuration - it will inherit
configuration from parent bnd.bnd files, so we can have the common
configuration we want in the top-level directory, and only override it when
needed.
Also - there are some “information only” headers in put in the MANIFEST.MF now
(like Import-Service and Export-Service) - do we need those?
The Import-Service and Export-Service headers are not only for
information. They are actually used at resolve time in karaf. Even more
karaf 4 by default applies a strict validation
that for all services that are imported there is also an export. This is
not defined in the OSGi specs and can also be switched off in karaf. It
only applies though if we use the new
1.3.0 feature namespace.
As David wrote it makes sense to use the Capability headers instead of
the service ones. As creating those headers by hand is quite a lot of
effort I think we need to automate this process.
I created an issue for this a long time ago but never actually got it
implemented. See https://issues.apache.org/jira/browse/CAMEL-8046
As Christian said, the tools do a very good job of calculating imported
packages. Depending on what we want exported, the Export-Package header may be
configured globally as well.
For import I agree it should be done as automated as possible. Normally
it should not be necessary to set global defaults for it.
For exports it depends how clean the design is. In an ideal OSGi design
you would normally export. bnd can help with this by a new setting that
only exports packages that also define a package version.
In Camel though users access a lot of the implementations too. So maybe
the simplest thing is to export all packages by default.
Christian
--
Christian Schneider
http://www.liquid-reality.de
Open Source Architect
http://www.talend.com