Closed Marcono1234 closed 1 month ago
Sounds a little bit like this: https://bnd.discourse.group/t/stop-gradle-from-stepping-on-eclipses-long-toes/295/5 (or here)
I haven't tried it, but I would assume you can probably override the default m2e lifecycle mapping provided by the plugin using the lifecycle-mapping
plugin and set it to ignore
.
Thanks for the tips from both of you!
I was hoping more for a simple boolean plugin parameter for bnd-maven-plugin, but I might give the lifecycle-mapping
a try. The problem is that it is quite verbose, and keeping it in sync with bnd-maven-plugin might be a bit cumbersome / there is no direct connection between the two. So it can easily happen that one of the configurations becomes outdated, or when a user refactors their project they might forget to move or remove the lifecycle-mapping
configuration.
Can we close this?
Can we close this?
If bnd-maven-plugin itself does not provide an option for this, and you don't think adding a parameter for this would be worth it / possible, and instead users should use the solutions mentioned above, then yes feel free to close this. Thanks for asking though.
Version
Description
When you have bnd-maven-plugin's
bnd-process
goal configured, it seems Eclipse generates theMANIFEST.MF
automatically during build (without any extra Bnd Eclipse plugins).The problem is that this
MANIFEST.MF
does not seem to match what a regular Maven execution from command line would produce:MANIFEST.MF
containsRequire-Capability: ...(version=11)
(instead ofversion=7
)Import-Package
entries for JDK packages which are normally not added:For the project where I am seeing this behavior, the OSGi attributes are an additional feature, but it does not matter much whether Eclipse generates them or not (if necessary the integration test could tell users to use
mvn ...
instead of running the test in the IDE). However, due to the differences in the generatedMANIFEST.MF
, users will now see confusing assertions failures; especially if Eclipse is rebuilding the project while you are runningmvn ...
from command line.Therefore in this situation it might be easiest to just disable M2E integration in the bnd-maven-plugin configuration. Is that possible somehow?
(I originally noticed this for https://github.com/google/gson, whose
gson
module is using bnd-maven-plugin)[^1]: That is probably intended and the correct behavior, but for my use case that behavior is not helpful.