[
https://issues.apache.org/jira/browse/STANBOL-774?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13475622#comment-13475622
]
Rupert Westenthaler commented on STANBOL-774:
---------------------------------------------
from the Bnd Tool documentation (http://www.aqute.biz/Bnd/Versioning)
## Substitution
> After the bundle has been created and analyzed bnd will see if an exported
> package is eligible for import.
> An export is automatically imported when the following are true:
>
> * There exists at least one reference to the exported package from a private
> package
> * The exported package has no references to any private packages
> * The exported package does not have a -noimport: directive.
>
> If a package is imported it will use the version as defined by the version
> policy.
## Import Version Policy
> If you import a package bnd will look at the exported version of that
> package.
> This version is not directly suitable for the import because it is usually
> too specific,
> it needs a policy to convert this export version to an import version.
Two policies
> -provider-policy : ${range;[==,=+)}
> -consumer-policy : ${range;[==,+)}
consumer-policy is the default and should be used for everything other than
packages containing Interfaces the current module/bundle actually implements.
> Stanbol Bundels that export packages containing service interfaces or classes
> that are referenced in service interfaces need also import those packages
> -------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: STANBOL-774
> URL: https://issues.apache.org/jira/browse/STANBOL-774
> Project: Stanbol
> Issue Type: Sub-task
> Reporter: Rupert Westenthaler
>
> Host Applications that do run Stanbol in an embedded OSGI environment need to
> export all packages of used Interfaces (and all Classes used in those
> Interfaces). This is required to ensure that the java Classes used by Stanbol
> (running within the embedded OSGI environment) are the same as the one
> available to the Host application (see [1] for details).
> However Bundles that do not explicitly import packages they export will
> rather user their internal version instead of the version exported by the
> Host application causing the Class version to become incompatible (see [2]
> for details).
> [1]
> http://felix.apache.org/site/apache-felix-framework-launching-and-embedding.html#ApacheFelixFrameworkLaunchingandEmbedding-hostserviceusage
> [2]
> http://felix.apache.org/site/apache-felix-osgi-faq.html#ApacheFelixOSGiFAQ-Shouldabundleimportitsownexportedpackages?
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira