-
Notifications
You must be signed in to change notification settings - Fork 194
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
Generated OSGi Metadata contains invalid Import-Package header #2941
Comments
@ptziegler can you please open an issue here: https://github.com/bndtools/bnd/issues that BND is not trying to generate invalid In the meanwhile I think you can fix this by providing custom BND instructions that don't export everything but only |
@ptziegler by they way you probably also want to create an issue for them to
|
Sadly not. Even if I manually set the imported/exported packages, the error still shows up. Which, from my perspective, doesn't make sense at all. :(
The first one sounds similar to the problem I'm facing right now. I also don't want to suddenly flood their issue tracker with problems, so let's wait and see what happens regarding the first one... |
If I must guess I think they are must have an import to their default package classes, so probably can you try using
if that at least pass without an error? |
No, even with the following instructions, the error is still the same:
My guess is that there really is something going wrong inside BND, when it runs into such a weird jar. |
Then I fear there is not much at Tycho/m2e side to workaround :-\ |
No worries. I already appreciate the help you've offered. |
The BND issue was closed as "not planned", but the suggested alternative worked like a charm:
I think that this is such a minor edge case that adding this extra instruction is appropriate, meaning I don't think there is anything for Tycho to do. |
I'm not sure if there is anything that can be done on the Tycho side or if this is a pure BND problem, but here it goes:
Our target platform definition contains following Maven dependency:
Given its age, this artifact doesn't contain any OSGi headers and is therefore rebundled by Tycho as part of the target resolution.
If I try to build our project with Tycho 4.0.3 (and also the nigthly build), it fails with the following error:
Looking at the original jar, it seems like the maintainers have been very naughty and put classes inside the root folder, which seems to be confusing the BND tool.
I assume that in the generated Manfest, all exported packages are also added to the
Import-Package
header, regardless of whether those are valid or not.Note that this problem also shows up in m2e, but only starting with 2.3.0
The text was updated successfully, but these errors were encountered: