Title: OSGi manifest headers missing from published JARs since 26.0 · Issue #4547 · graphql-java/graphql-java · GitHub
Open Graph Title: OSGi manifest headers missing from published JARs since 26.0 · Issue #4547 · graphql-java/graphql-java
X Title: OSGi manifest headers missing from published JARs since 26.0 · Issue #4547 · graphql-java/graphql-java
Description: Describe the bug Since 26.0, the published graphql-java JAR no longer contains OSGi headers (Bundle-SymbolicName, Bundle-Version, Export-Package, Import-Package). As a result, it can't be deployed as a bundle in an OSGi container, and do...
Open Graph Description: Describe the bug Since 26.0, the published graphql-java JAR no longer contains OSGi headers (Bundle-SymbolicName, Bundle-Version, Export-Package, Import-Package). As a result, it can't be deployed ...
X Description: Describe the bug Since 26.0, the published graphql-java JAR no longer contains OSGi headers (Bundle-SymbolicName, Bundle-Version, Export-Package, Import-Package). As a result, it can't be deplo...
Opengraph URL: https://github.com/graphql-java/graphql-java/issues/4547
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"OSGi manifest headers missing from published JARs since 26.0","articleBody":"**Describe the bug**\n\nSince 26.0, the published `graphql-java` JAR no longer contains OSGi headers (`Bundle-SymbolicName`, `Bundle-Version`, `Export-Package`, `Import-Package`). As a result, it can't be deployed as a bundle in an OSGi container, and downstream bundles built with bnd no longer get version ranges on their `graphql.*` imports.\n\n| Version | OSGi headers in `META-INF/MANIFEST.MF` |\n|---|---|\n| 24.3, 25.0, 25.1 | present (`Bundle-SymbolicName: graphql-java`, `Export-Package: graphql.*`, ...) |\n| 26.0, 26.1 | missing (only `Manifest-Version` and `Automatic-Module-Name`) |\n\n**To Reproduce**\n\n```sh\nfor v in 25.1 26.0 26.1; do\n curl -s -o gj-$v.jar https://repo1.maven.org/maven2/com/graphql-java/graphql-java/$v/graphql-java-$v.jar\n echo \"== $v\"; unzip -p gj-$v.jar META-INF/MANIFEST.MF | grep -E '^(Bundle-SymbolicName|Export-Package)' | cut -c1-60\ndone\n```\n\n**Cause**\n\nThis appears to have been introduced by 4db3cc40 (#4171, Gradle 9.2.0 upgrade). That's the only change to the bnd setup between 25.0 and 26.0. The previous setup was:\n\n```groovy\nshadowJar {\n convention.plugins.bundle = new aQute.bnd.gradle.BundleTaskConvention(it)\n doLast { buildBundle() }\n bnd('''...''')\n}\n```\n\nIt was replaced with:\n\n```groovy\ntasks.named('shadowJar').configure {\n def bundle = extensions.findByType(BundleTaskExtension)\n if (bundle != null) {\n bundle.bnd('''...''')\n }\n}\n```\n\nThe bnd builder plugin only adds `BundleTaskExtension` to the `jar` task, so on `shadowJar` `findByType` returns `null` and the block is skipped silently. The `doLast { buildBundle() }` step was also dropped, so bnd never rewrites the manifest.\n\n**Suggested fix**\n\nThe bnd Gradle plugin documents this pattern for tasks other than `jar`:\n\n```groovy\ntasks.named('shadowJar').configure {\n def bundle = extensions.create(BundleTaskExtension.NAME, BundleTaskExtension, it)\n bundle.bnd('''...same instructions as today...''')\n doLast(bundle.buildAction())\n}\n```\n\nI haven't built graphql-java with this change, so it's a suggestion, not a tested patch. A build check that fails if `Bundle-SymbolicName` is missing from the shadow JAR would stop this from happening again.\n","author":{"url":"https://github.com/RedN4ks","@type":"Person","name":"RedN4ks"},"datePublished":"2026-11-10T10:22:35Z","url":"https://github.com/graphql-java/graphql-java/issues/4547"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:a7e508bb-c26d-dad0-1c9d-21ca8e75247d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A51A:34CAB:2303CE3:2CB71D8:6B0188C1 |
| html-safe-nonce | e2d9cb22ce45f5fe2760052215c141b67aed1e6049a00b69f588a438500bb735 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNTFBOjM0Q0FCOjIzMDNDRTM6MkNCNzFEODo2QjAxODhDMSIsInZpc2l0b3JfaWQiOiIyODc5NTM3MjgwMzg3NzQ1OTg1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 41b1f73fc3e416894005262c0cc09210c9f0d4191ec16133b8576879499dc6a9 |
| hovercard-subject-tag | issue:6304879242 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/graphql-java/graphql-java/4547/issue_layout |
| twitter:image | https://opengraph.githubassets.com/6c8c67d2b19c0f1921e9967b23a5afe2de056d7d6411c398e5d1baa65c961436/graphql-java/graphql-java/issues/4547 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/6c8c67d2b19c0f1921e9967b23a5afe2de056d7d6411c398e5d1baa65c961436/graphql-java/graphql-java/issues/4547 |
| og:image:alt | Describe the bug Since 26.0, the published graphql-java JAR no longer contains OSGi headers (Bundle-SymbolicName, Bundle-Version, Export-Package, Import-Package). As a result, it can't be deployed ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | RedN4ks |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| go-import | github.com/graphql-java/graphql-java git https://github.com/graphql-java/graphql-java.git |
| octolytics-dimension-user_id | 14289921 |
| octolytics-dimension-user_login | graphql-java |
| octolytics-dimension-repository_id | 38602457 |
| octolytics-dimension-repository_nwo | graphql-java/graphql-java |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 38602457 |
| octolytics-dimension-repository_network_root_nwo | graphql-java/graphql-java |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width