But still the OSGI-INF from mybundle ends up in the resulting bundle. I guess this is because the services are referenced in the META-INF/MANIFEST.MF. For all other regular folders the exclusions work properly.
How can I build an uber-jar from multiple bundles but leaving out some declarative services? Is there some special instruction or bnd plugin for it or do I rather have to use something like maven-shade-plugin?
Thanks a lot for that pointer. Indeed the DS and metatype metadata were regenerated from the given bundle. For some reason I assumed that DS annotations had a SOURCE retention policy (RetentionPolicy (Java Platform SE 8 ))
I could disable generating DS component metadata but the metatype is still being generated for some reason…