I want to create an osgi bundle with custom appenders in it and tried with
creating a simple maven project. The Plugins.dat file gets packed in the
jar with the simple maven pom. When I add the apache felix plugin and
change packaging to bundle to make it an OSGI bundle the Plugins.dat does
not get packed. The pom elements I used to convert it to an OSGI
bundle is as below.
<packaging>bundle</packaging> and
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>3.0.1</version>
<extensions>true</extensions>
<configuration>
<instructions>
<Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
<Bundle-Name>${project.artifactId}</Bundle-Name>
<Bundle-Version>1.0.0</Bundle-Version>
<Fragment-Host>com.example.host.bundle</Fragment-Host>
<Export-Package>
com.example.log4j2.plugins.*
</Export-Package>
<DynamicImport-Package>
*;resolution:=optional
</DynamicImport-Package>
<Import-Package>
!com.example.log4j2.plugins.*
</Import-Package>
</instructions>
</configuration>
</plugin>