Skip to content

Bundle org.eclipse.jetty.websocket.server OSGI metadata exports internal instead of public package #14522

@shartte

Description

@shartte

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugFor general bugs on Jetty side

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions