Bundle org.eclipse.jetty.websocket.server OSGI metadata exports internal instead of public package
envgap__jetty__jetty.project-14522
01 / FAILURE SIGNATURE
As reported upstream
No identifying execution failure has been captured.
Not a benchmark task.
- The project already builds and runs before the fix, so there is nothing to repair.
02 / ENVIRONMENT RECIPE
- Base commit
908fde0db91b9867feb9a9255a56fecbcf1bab7e- Manifest
jetty-core/jetty-websocket/jetty-websocket-jetty-server/pom.xml- Reproduce
Awaiting issue-specific recipe- Run under trace
Awaiting a meaningful runtime command
03 / ORIGINAL ISSUE TEXT
jetty/jetty.project #14522 · read the original issue
**Jetty version(s)** 12.1.6 **Jetty Environment** core **Description** The Maven artifact jetty-websocket-jetty-server (OSGI Bundle name org.eclipse.jetty.websocket.server) exports the wrong package, making it impossible to use from an Eclipse RCP project. From the MANIFEST.MF found in the jar file, it exports the internal package, but it doesn't export the actual main package: ``` Export-Package: org.eclipse.jetty.websocket.server.internal;version="12. 1.6";uses:="org.eclipse.jetty.server,org.eclipse.jetty.websocket.api,or g.eclipse.jetty.websocket.common,org.eclipse.jetty.websocket.core,org.e clipse.jetty.websocket.core.server" ``` As a result, Eclipse complains about using a non-api package when trying to use the contained types, as per the programming guide (see https://jetty.org/docs/jetty/12.1/programming-guide/server/websocket.html#jetty) The programming guide says one might only need to depend on the API, but the example code makes use of `WebSocketUpgradeHandler.from` and `ServerWebSocketContainer`, which are in the server jar. It's also unclear how the artifact relates to the *other* artifact that exposes types of the same name (`jetty-websocket-core-server`), these have correct OSGI metadata, but the documentation doesn't mention these bundles at all.
04 / LABELS
Labels from the report text only; not yet run
No supported category has been assigned.
Label rules and the text that matched
[]