-
-
Notifications
You must be signed in to change notification settings - Fork 304
Do not concat Bundle-Activator when already defined #6868
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Do not concat Bundle-Activator when already defined #6868
Conversation
47efbc4 to
450c62e
Compare
6144325 to
2398098
Compare
|
plans to merge, what blocks? |
The lack of feedback. And the controversy in the issue discussion. I think the PR fixes the problem reported in the #6868 . If it fixes it in the best way - I don't know. I will try to bring it up in the next bnd zoom call |
|
+1 |
|
The Mechanism should also make sure, that any bundle activator header is not just a singlton, but that the property in the bnd file wins, so I can overwrite whatever included classfiles may define here. |
That is the exact purpose of that PR. But only for the properties in the new Set
Is that what you mean? @juergen-albert |
2398098 to
67ebbf1
Compare
fixes a problem in Verifier.verifyActivator() ("The Bundle-Activator header only supports a single type. The following types were found") when the bnd instructions already define a Bundle-Activator but a processed jar also contributed a Bundle-Activator. Before this fix the Bundle-Activator header was concatenated to the existing Bundle-Activator header in bnd.bnd and thus contained multiple values (separated by comma). But for Bundle-Activator this does not make sense as it supports only a single value.
Added Constants.BUNDLE_HEADERS_SINGLE_VALUE for a list of other headers which should also not be concatenated
Signed-off-by: Christoph Rueger <[email protected]>
67ebbf1 to
30b1622
Compare
|
I renamed the private variable to |
|
Here is an example where i would use this |

Closes #6867
fixes a problem that
Verifier.verifyActivator()throws an error "The Bundle-Activator header only supports a single type. The following types were found" when the bnd instructions already define a Bundle-Activator but a processed jar also contributed a Bundle-Activator (e.g. via@Header(name = Constants.BUNDLE_ACTIVATOR, value = "${@class}")annotation).see org.apache.logging.log4j.util.Activator
Before this fix the Bundle-Activator header was concatenated to the existing
Bundle-Activatorheader in the outer bnd of the bundle and thus resulted in multiple values (separated by comma). But for Bundle-Activator this does not make sense as it supports only a single value, as there can only be one single Bundle-Activator in the manifest - which is correctly complained about byVerifier.verifyActivator().This PR fixes the root cause where the multiple-values are created, so that
Verifier.verifyActivator()does not complain anymore.This for example happened with
-includeresourceof a Bundle (unrolling or lib:=true) or other ways where bnd scans classes of jar files.I also identified some other Bundle headers in which should also only contain a single value and not be concatenated.