DynamicImport-Package is more "dynamic" than an optional import.

If an optional import is not found at the time the bundle is resolved, then
it will never again bind to the package if that package arrives at some
later time.

One would have to force re-resolve of the bundle in order to bind to it,
which as you can imagine is a pain.

However, using DynamicImport-Package will behave the same up until the
package becomes available. It will bind on demand.

- Ray

On Sun, Jun 19, 2016 at 12:05 PM, Florian Pirchner <
[email protected]> wrote:

> Hi,
>
> you defined a "dynamic import" in resource:
> https://github.com/apache/felix/blob/trunk/http/jetty/pom.xml
>
> <DynamicImport-Package>
> org.osgi.service.metatype;version="[1.1,2)"
> </DynamicImport-Package>
>
> What's the mean that you did not use "import-package;optional"?
>
> Thanks for clearing up.
>
> Best florian
>



-- 
*Raymond Augé* <http://www.liferay.com/web/raymond.auge/profile>
 (@rotty3000)
Senior Software Architect *Liferay, Inc.* <http://www.liferay.com>
 (@Liferay)
Board Member & EEG Co-Chair, OSGi Alliance <http://osgi.org> (@OSGiAlliance)

Reply via email to