You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Eugene Pechenezhsky (JIRA)" <ji...@apache.org> on 2011/09/07 17:16:12 UTC

[jira] [Commented] (FELIX-3065) Make inclusion of "Import-Package:org.osgi.service.blueprint" optional

    [ https://issues.apache.org/jira/browse/FELIX-3065?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13099013#comment-13099013 ] 

Eugene Pechenezhsky commented on FELIX-3065:
--------------------------------------------

This should be of interest:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=351755

Apparently, some container vendors did not export this package even though
importing it is proper behavior:

121.13.5 Type Compatibility
Two bundles are type compatible for a given class if they both load the same
class object, or if either bundle cannot load the given class.To mitigate
type incompatibility problems, a Blueprint extender must export
the org.osgi.service.blueprint package. In the uses: directive, it should
list any packages of classes that can be shared between the Blueprint
extender and the Blueprint bundle. Blueprint bundles should import this
package

(http://www.osgi.org/download/r4v42/r4.enterprise.pdf)


> Make inclusion of "Import-Package:org.osgi.service.blueprint" optional 
> -----------------------------------------------------------------------
>
>                 Key: FELIX-3065
>                 URL: https://issues.apache.org/jira/browse/FELIX-3065
>             Project: Felix
>          Issue Type: Improvement
>          Components: Maven Bundle Plugin
>    Affects Versions: maven-bundle-plugin-2.3.5
>         Environment: Any
>            Reporter: Matt Bishop
>
> The maven-bundle-plugin autoadds an "Import-Package:org.osgi.service.blueprint" directive in the manifest. This makes sense, as you want your blueprint dependencies to be manged once blueprint is loaded.
> However, if one is using Gemini for blueprint service, this package is never exported. This means that the bundle will never be loaded. I have filed a bug with Gemini on this topic already, but it leads developers to workarounds like this in the bundle <configuration> section:
>                         <Import-Package>
>                             javax.inject,
>                             org.apache.commons.lang;version="[2.6,3)",
>                             org.slf4j;version="[1.6,2)",
>                             !org.osgi.service.blueprint
>                         </Import-Package>
> This is a pain because you have to explicitly declare every import package manually rather than having the bundle plugin work it's auto-import-package magic.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira