I am thinking about a plugin which is executed after the Bnd-Scr-Plugin or some built-in bnd post processors which can fix a Manifest header.
Any pointers would be much appreciated.
Thanks in advance
Are you proposing to execute bnd-maven-plugin:bnd-process twice? First with Felix SCR Bnd Plugin and then without (wrapping the results of the first run and overwriting the Service-Component header in the Manifest)? I was hoping for a workaround with less build time overhead…
I was proposing to build the bundle in the old way but give it another name and then build it again using the -includeresource etc. Worst case you have to maintain the manifest but since you do not want to change this bundle, I guess the maintenance on it is low.
That said, in my 50 years of experience in builds, these kind of hacks to not wanna do it right tend to be at the root of all incredible complexity a few years later. Take the technical debt now instead of postponing it, it only gets worse. Always pick the right solution, not the most convenient. In this case, I would change the bundle using the old bnd plugin however painful it is. Anyway, 2cts of an old man.
I agree that cleaning up is the best solution (and get rid of the broken Bnd plugin). FTR: For now I just fix the Manifest with maven-shade-plugin transformers: Apache Maven Shade Plugin – Resource Transformers