felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Felix Meschberger (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FELIX-3065) Make inclusion of "Import-Package:org.osgi.service.blueprint" optional
Date Thu, 04 Aug 2011 10:01:27 GMT

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

Felix Meschberger commented on FELIX-3065:

The import for the blueprint package is generated because the class analyzer of the BND library
identified at least one class using the blueprint library. If you don't import it that class
(or these classes) will probably never be able to be loaded.

This may or may not be fine, the bundle plugin cannot decide (just with any other package).

What you can do, though is to just exclude the blueprint package and have the bundle plugin
resolve the rest using this:


The asterisk does the trick

> 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>
>                         <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


View raw message