Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>When you embed any jar via Embed-Dependency tag then the maven-bundle-plugin would analyze that jar also and add the referred packages to the host bundle Import-Package list. Mostly such packages are optional depending on the feature used. For example in your usecase the H2 jar has dependency on Lucene, Servlet API for certain features. if your usage scenario does not require these features then you can mark these packages as optional</p> <pre class="lang-xml prettyprint-override"><code>&lt;plugin&gt; &lt;groupId&gt;org.apache.felix&lt;/groupId&gt; &lt;artifactId&gt;maven-bundle-plugin&lt;/artifactId&gt; &lt;version&gt;2.3.5&lt;/version&gt; &lt;extensions&gt;true&lt;/extensions&gt; &lt;configuration&gt; &lt;obrRepository&gt;NONE&lt;/obrRepository&gt; &lt;instructions&gt; &lt;Bundle-SymbolicName&gt;${project.artifactId}&lt;/Bundle-SymbolicName&gt; .. &lt;Embed-Dependency&gt; h2 &lt;/Embed-Dependency&gt; &lt;Import-Package&gt; org.osgi.service.jdbc.*; org.apache.lucene.*; javax.transaction.*;resolution:=optional, * &lt;/Import-Package&gt; &lt;/instructions&gt; &lt;/configuration&gt; &lt;/plugin&gt; </code></pre> <p>In above config we mark such packages as optional. The main problem is to determine the package list depending on your usage</p> <p>One quick and dirty way is to mark all as optional imports. <strong><em>Should be used as a last resort</em></strong>. As some valid imports would be marked optional and OSGi fwk would not be able to check them.</p> <pre class="lang-xml prettyprint-override"><code> &lt;Import-Package&gt; *;resolution:=optional &lt;/Import-Package&gt; </code></pre> <p>Also note that H2 jar is a valid OSGi bundle so you can deploy it directly.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload