2008/9/10 Patrick Forhan <[EMAIL PROTECTED]>
> On Wed, Sep 10, 2008 at 3:03 PM, Felix Meschberger <[EMAIL PROTECTED]>
> wrote:
> > The Import-Service tags have no practical use any more nowadays (plase
> > correct me if I am wrong).
>
> Well, when I said to "address" the issue, I'd like to see the
> import-service tags deleted. ;-)
>
> > What matters is the Import-Package: I declared the log service package
> > to resolve optionally, which means the bundle will resolve without the
> > log service package available.
>
> Certainly, this is good. We happened to have osgi-compendium in our
> OBR, so that package resolution didn't cause us trouble. The fact
> that none of our bundles have Export-Service did. We could run the
> bundle locally, but could not download it from the OBR.
If you use the maven-bundle-plugin, you can customize the bundle OBR
description, such as required and provided services; by creating and editing
a obr.xml file. The most part of Felix project have those files.
For the web console, it should be something like (I use the obr.xml file of
this project :-)):
<obr>
<require extend="false"
filter="(service=org.osgi.service.log.LogService)"
multiple="false" name="service" optional="true">
Import Service org.osgi.service.log.LogService
</require>
<require extend="false"
filter="(service=javax.servlet.Servlet)"
multiple="true" name="service" optional="true">
Import Service javax.servlet.Servlet
</require>
<require extend="false"
filter="(service=org.apache.felix.webconsole.Render)"
multiple="true" name="service" optional="true">
Import Service org.apache.felix.webconsole.Render
</require>
<require extend="false"
filter="(service=org.apache.felix.webconsole.Action)"
multiple="true" name="service" optional="true">
Import Service org.apache.felix.webconsole.Action
</require>
<require extend="false"
filter="(service=org.osgi.service.http.HttpService)"
multiple="false" name="service" optional="false">
Import Service org.osgi.service.http.HttpService
</require>
<capability name="service">
<p n="service" v="org.osgi.service.cm.ManagedService" />
<p n="service.description"
v="OSGi Management Console Configuration Receiver" />
<p n="service.pid"
v="org.apache.felix.webconsole.internal.servlet.OsgiManager" />
<p n="service.vendor" v="he Apache Software Foundation" />
</capability>
</obr>
Once created, this file is analyzed by the maven-bundle-plugin and add the
content to the bundle description. By this way, deploying the bundle will
also deployed "one" provider of required services.
Regards,
Clement
>
>
> Pat.
>
> --
> Defy mediocrity.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>