Skip to content

Instantly share code, notes, and snippets.

@keiono
Created April 4, 2011 18:11
Show Gist options
  • Save keiono/902101 to your computer and use it in GitHub Desktop.
Save keiono/902101 to your computer and use it in GitHub Desktop.
Sample pom for OSGi bundles
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>${maven-bundle-plugin.version}</version>
<!-- | the following instructions build a simple set of public/private classes into an OSGi bundle -->
<configuration>
<instructions>
<Bundle-SymbolicName>${bundle.symbolicName}</Bundle-SymbolicName>
<Bundle-Version>${project.version}</Bundle-Version>
<!-- | assume public classes are in the top package, and private classes are under ".internal" -->
<Export-Package>!${bundle.namespace}.internal.*,${bundle.namespace}.*;version="${project.version}"</Export-Package>
<Private-Package>${bundle.namespace}.internal.*</Private-Package>
<!-- | each module can override these defaults in their osgi.bnd file -->
<_include>-osgi.bnd</_include>
</instructions>
</configuration>
</plugin>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment