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
byte-buddy sources bundle specifies symoblic name "net.bytebuddy.byte-buddy" #894
Comments
Not really sure how r where to report this, so I'm reporting it here. Would be great if the sources bundle manifest is not a copy of the actual bundle. |
From a bit of research, this seems to be expected behavior. How is this a problem? Are you including the sources jar in your application? |
Odd, in our Eclipse platform this is the first source bundle to have the same symbolic name as the bundle itself. E.g. for Eclipse JDT core source bundle we have:
Yes, we include source bundles (when available) in our Eclipse platform. When doing so, debugging an Eclipse application from Eclipse itself is streamlined.
In our case, our tooling validates that we don't include a bundle twice, so we check the symbolic name and version. I believe this prevents OSGI problems later down the line, though this is not my area. I'll ask in my team and will provide more info. |
I see. I just checked and the reason the symbolic name is added to the source jar is a result of the shade plugin's application. I will try to remove the OSGI headers from the source manifest. |
This would need to be fixed in the Maven Shade plugin, I created a patch and issue: apache/maven-shade-plugin#59 |
Thanks! |
Just experienced the same issue when building an Eclipse p2 repository (using Tycho) including byte-buddy as a dependency. This resulted in very inconsistent behaviour in the consuming Eclipse application as the Tycho p2 build would sometimes match the correct (classes) jar but other times match the sources jar resulting in runtime failures. If this area is being looked at then a nice improvement would be to add headers (including Eclipse-SourceBundle) to the source bundle that allow Eclipse/p2 to be capable of including the source jar automatically when materializing. A typical manifest would look like e.g. https://github.com/h2database/h2database/blob/master/h2/src/installer/source-manifest.mf. Instead of including a template file this is often configured in the maven-source-plugin e.g. https://github.com/jline/jline3/blob/master/pom.xml#L490. I'm not sure how all this plays with the Shade plugin however. |
Sure, I am still waiting for the (merged) PR to be released but once the new version of the shade plugin is out the door, I can try adding this. |
Any news on this? Especially the wrong |
Waiting for a new release of maven-shade-plugin I guess. The current release is 3.2.4 (from May 2020). |
Yes, I am waiting for the release of the patch I sent them a couple of months ago. It's already merged, even. |
We were affected by this bug of having two bundles with the same symbolic name. We managed to fix that by configuring the Maven Source plugin this way:
|
The source jar is copied, that is the issue. It would require a release of the linked change but unfortunately, there was no release yet. |
A new version of maven-shade-plugin (3.3.0) has finally been released. |
Brilliant, just added it to the build. |
Thanks, which |
It's set for 1.12.10 which I released yesterday. |
Great, tyvm! |
When downloading byte-buddy and the respective source bundle from
maven
(https://repo1.maven.org/maven2/net/bytebuddy/byte-buddy/1.10.11/), both bundles have the same manifest contents:In particular both bundles specify the same symbolic name, which can confuse tooling (in our case, we validate that no 2 bundles with the same symbolic name and versions are included in our Eclipse based product).
In contrast, e.g.
byte-buddy-agent
has a mostly empty manifest in the respective sources bundle.The text was updated successfully, but these errors were encountered: