I have an OSGI
bundle that has a dependency on a 3rd Party library, I don't want to deploy that library in the container, I'd rather embed it in my bundle.
Of course, that library has its own dependencies, I want to embed them as well.
I'm using the Maven Bundle Plugin
:
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<configuration>
<instructions>
<Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
<Bundle-Description>${project.description}</Bundle-Description>
<Bundle-Vendor>${bundle.vendor}</Bundle-Vendor>
<Meta-Persistence>...</Meta-Persistence>
<Export-Package>...</Export-Package>
<Import-Package>...</Import-Package>
<Embed-Dependency>3rd-Party</Embed-Dependency>
<Embed-Transitive>true</Embed-Transitive>
</instructions>
</configuration>
</plugin>
As a result, 3rd-Party
is embedded in the resulting bundle, but NOT its transitive dependencies, as if <Embed-Transitive>true</Embed-Transitive>
doesn't have any effect.
So I have some questions
- Is this the correct way to embed a 3rd party library in a transitive way ?
- Does this take care of the generated Manifest file (not importing packages that belong to the 3rd party library and its dependencies) ?
Thank you