You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Can someone please help me with how to exclude certain file from the jar while generating OSGi bundle using p2-maven-plugin? I want to exclude INDEX.LIST file as it is causing issues in my project while loading the jar because of the jar name present in INDEX.LIST is different from the OSGi bundle.
I tried using invalidfilenames instructions but it had no impact. I might be using it incorrectly. The instruction format I used is "<_invalidfilenames>INDEX.LIST</_invalidfilenames>"
The text was updated successfully, but these errors were encountered:
Hi @sparsick, thanks for the quick response. I tried donotcopy option with p2-maven-plugin but it didn't work. Can you please confirm whether the plugin supports this or I would need to package my jar using bnd tool only and not using this plugin?
you can add BND instruction to your artifact configuration:
<artifact>
<id>commons-io:commons-io:2.1</id>
<transitive>true</transitive>
<source>false</source>
<override>false</override>
<singleton>false</singleton>
<instructions> <!-- here you can out bnd instruction-->
<Import-Package>*;resolution:=optional</Import-Package>
<Export-Package>*</Export-Package>
<_fixupmessages>"Classes found in the wrong directory";is:=warning</_fixupmessages>
<_removeheaders>Bnd-LastModified</_removeheaders>
<_reproducible>true</_reproducible>
</instructions>
<excludes/>
</artifact>
Here it is described how to put bnd instruction to the plugin. P2 Plugin uses the mechanism of the maven bundle plugin.
Hi,
Can someone please help me with how to exclude certain file from the jar while generating OSGi bundle using p2-maven-plugin? I want to exclude INDEX.LIST file as it is causing issues in my project while loading the jar because of the jar name present in INDEX.LIST is different from the OSGi bundle.
I tried using invalidfilenames instructions but it had no impact. I might be using it incorrectly. The instruction format I used is "<_invalidfilenames>INDEX.LIST</_invalidfilenames>"
The text was updated successfully, but these errors were encountered: