Merge pull request #9915 from eclipse/jetty-12.0.x-9396-websocket-jpms-review

Issue #9396 - fixes to resolve WebSocket JPMS warnings
This commit is contained in:
Lachlan 2023-07-03 17:42:05 +10:00 committed by GitHub
commit 643c11c7a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
60 changed files with 512 additions and 126 deletions

View File

@ -14,26 +14,6 @@
<bundle-symbolic-name>${project.groupId}.client</bundle-symbolic-name> <bundle-symbolic-name>${project.groupId}.client</bundle-symbolic-name>
</properties> </properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<instructions>
<Require-Capability>
osgi.extender; filter:="(osgi.extender=osgi.serviceloader.registrar)"
</Require-Capability>
<Provide-Capability>
osgi.serviceloader; osgi.serviceloader=org.eclipse.jetty.ee10.webapp.Configuration
</Provide-Capability>
</instructions>
</configuration>
</plugin>
</plugins>
</build>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>org.eclipse.jetty.websocket</groupId> <groupId>org.eclipse.jetty.websocket</groupId>

View File

@ -13,11 +13,11 @@
module org.eclipse.jetty.websocket.server module org.eclipse.jetty.websocket.server
{ {
requires org.eclipse.jetty.server;
requires org.eclipse.jetty.websocket.core.server; requires org.eclipse.jetty.websocket.core.server;
requires org.eclipse.jetty.websocket.common; requires org.eclipse.jetty.websocket.common;
requires org.slf4j; requires org.slf4j;
requires transitive org.eclipse.jetty.server;
requires transitive org.eclipse.jetty.websocket.api; requires transitive org.eclipse.jetty.websocket.api;
exports org.eclipse.jetty.websocket.server; exports org.eclipse.jetty.websocket.server;

View File

@ -31,7 +31,6 @@ import org.eclipse.jetty.websocket.api.Session;
import org.eclipse.jetty.websocket.api.WebSocketContainer; import org.eclipse.jetty.websocket.api.WebSocketContainer;
import org.eclipse.jetty.websocket.api.WebSocketSessionListener; import org.eclipse.jetty.websocket.api.WebSocketSessionListener;
import org.eclipse.jetty.websocket.common.SessionTracker; import org.eclipse.jetty.websocket.common.SessionTracker;
import org.eclipse.jetty.websocket.core.WebSocketComponents;
import org.eclipse.jetty.websocket.core.exception.WebSocketException; import org.eclipse.jetty.websocket.core.exception.WebSocketException;
import org.eclipse.jetty.websocket.core.server.FrameHandlerFactory; import org.eclipse.jetty.websocket.core.server.FrameHandlerFactory;
import org.eclipse.jetty.websocket.core.server.WebSocketMappings; import org.eclipse.jetty.websocket.core.server.WebSocketMappings;
@ -58,7 +57,7 @@ public class ServerWebSocketContainer extends ContainerLifeCycle implements WebS
private final FrameHandlerFactory factory; private final FrameHandlerFactory factory;
private InvocationType invocationType = InvocationType.BLOCKING; private InvocationType invocationType = InvocationType.BLOCKING;
public ServerWebSocketContainer(WebSocketMappings mappings) ServerWebSocketContainer(WebSocketMappings mappings)
{ {
this.mappings = mappings; this.mappings = mappings;
this.factory = new ServerFrameHandlerFactory(this, mappings.getWebSocketComponents()); this.factory = new ServerFrameHandlerFactory(this, mappings.getWebSocketComponents());
@ -66,15 +65,10 @@ public class ServerWebSocketContainer extends ContainerLifeCycle implements WebS
addBean(sessionTracker); addBean(sessionTracker);
} }
public WebSocketComponents getWebSocketComponents()
{
return mappings.getWebSocketComponents();
}
@Override @Override
public Executor getExecutor() public Executor getExecutor()
{ {
return getWebSocketComponents().getExecutor(); return mappings.getWebSocketComponents().getExecutor();
} }
@Override @Override

View File

@ -84,16 +84,20 @@ public class WebSocketUpgradeHandler extends Handler.Wrapper
*/ */
public static WebSocketUpgradeHandler from(Server server, ContextHandler context) public static WebSocketUpgradeHandler from(Server server, ContextHandler context)
{ {
WebSocketUpgradeHandler wsHandler = new WebSocketUpgradeHandler(WebSocketServerComponents.ensureWebSocketComponents(server, context)); WebSocketComponents components = WebSocketServerComponents.ensureWebSocketComponents(server, context);
context.getContext().setAttribute(WebSocketContainer.class.getName(), wsHandler.container); WebSocketMappings mappings = new WebSocketMappings(components);
ServerWebSocketContainer container = new ServerWebSocketContainer(mappings);
WebSocketUpgradeHandler wsHandler = new WebSocketUpgradeHandler(container);
context.getContext().setAttribute(WebSocketContainer.class.getName(), wsHandler._container);
return wsHandler; return wsHandler;
} }
private final ServerWebSocketContainer container; private final ServerWebSocketContainer _container;
private WebSocketUpgradeHandler(WebSocketComponents components) private WebSocketUpgradeHandler(ServerWebSocketContainer container)
{ {
this.container = new ServerWebSocketContainer(new WebSocketMappings(components)); _container = container;
addBean(container); addBean(container);
} }
@ -106,14 +110,14 @@ public class WebSocketUpgradeHandler extends Handler.Wrapper
*/ */
public WebSocketUpgradeHandler configure(Consumer<ServerWebSocketContainer> configurator) public WebSocketUpgradeHandler configure(Consumer<ServerWebSocketContainer> configurator)
{ {
configurator.accept(container); configurator.accept(_container);
return this; return this;
} }
@Override @Override
public boolean handle(Request request, Response response, Callback callback) throws Exception public boolean handle(Request request, Response response, Callback callback) throws Exception
{ {
if (container.handle(request, response, callback)) if (_container.handle(request, response, callback))
return true; return true;
return super.handle(request, response, callback); return super.handle(request, response, callback);
} }
@ -125,6 +129,6 @@ public class WebSocketUpgradeHandler extends Handler.Wrapper
return InvocationType.BLOCKING; return InvocationType.BLOCKING;
Handler handler = getHandler(); Handler handler = getHandler();
InvocationType handlerInvocationType = handler == null ? InvocationType.NON_BLOCKING : handler.getInvocationType(); InvocationType handlerInvocationType = handler == null ? InvocationType.NON_BLOCKING : handler.getInvocationType();
return Invocable.combine(handlerInvocationType, container.getInvocationType()); return Invocable.combine(handlerInvocationType, _container.getInvocationType());
} }
} }

View File

@ -27,7 +27,9 @@ import org.eclipse.jetty.websocket.client.ClientUpgradeRequest;
import org.eclipse.jetty.websocket.client.WebSocketClient; import org.eclipse.jetty.websocket.client.WebSocketClient;
import org.eclipse.jetty.websocket.core.AbstractExtension; import org.eclipse.jetty.websocket.core.AbstractExtension;
import org.eclipse.jetty.websocket.core.Frame; import org.eclipse.jetty.websocket.core.Frame;
import org.eclipse.jetty.websocket.core.WebSocketComponents;
import org.eclipse.jetty.websocket.core.client.WebSocketCoreClient; import org.eclipse.jetty.websocket.core.client.WebSocketCoreClient;
import org.eclipse.jetty.websocket.core.server.WebSocketServerComponents;
import org.eclipse.jetty.websocket.server.WebSocketUpgradeHandler; import org.eclipse.jetty.websocket.server.WebSocketUpgradeHandler;
import org.eclipse.jetty.websocket.tests.util.FutureCallback; import org.eclipse.jetty.websocket.tests.util.FutureCallback;
import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.AfterEach;
@ -66,7 +68,8 @@ public class MaxOutgoingFramesTest
wsHandler.configure(container -> wsHandler.configure(container ->
{ {
container.addMapping("/", (rq, rs, cb) -> serverSocket); container.addMapping("/", (rq, rs, cb) -> serverSocket);
container.getWebSocketComponents().getExtensionRegistry().register(BlockingOutgoingExtension.class.getName(), BlockingOutgoingExtension.class); WebSocketComponents components = WebSocketServerComponents.getWebSocketComponents(context);
components.getExtensionRegistry().register(BlockingOutgoingExtension.class.getName(), BlockingOutgoingExtension.class);
}); });
server.setHandler(context); server.setHandler(context);

View File

@ -125,6 +125,11 @@
<artifactId>jetty-ee10-websocket-jakarta-client</artifactId> <artifactId>jetty-ee10-websocket-jakarta-client</artifactId>
<version>12.0.0-SNAPSHOT</version> <version>12.0.0-SNAPSHOT</version>
</dependency> </dependency>
<dependency>
<groupId>org.eclipse.jetty.ee10.websocket</groupId>
<artifactId>jetty-ee10-websocket-jakarta-client-webapp</artifactId>
<version>12.0.0-SNAPSHOT</version>
</dependency>
<dependency> <dependency>
<groupId>org.eclipse.jetty.ee10.websocket</groupId> <groupId>org.eclipse.jetty.ee10.websocket</groupId>
<artifactId>jetty-ee10-websocket-jakarta-common</artifactId> <artifactId>jetty-ee10-websocket-jakarta-common</artifactId>
@ -137,7 +142,7 @@
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.eclipse.jetty.ee10.websocket</groupId> <groupId>org.eclipse.jetty.ee10.websocket</groupId>
<artifactId>jetty-ee10-websocket-jetty-client</artifactId> <artifactId>jetty-ee10-websocket-jetty-client-webapp</artifactId>
<version>12.0.0-SNAPSHOT</version> <version>12.0.0-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>

View File

@ -428,7 +428,7 @@
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.eclipse.jetty.ee10.websocket</groupId> <groupId>org.eclipse.jetty.ee10.websocket</groupId>
<artifactId>jetty-ee10-websocket-jetty-client</artifactId> <artifactId>jetty-ee10-websocket-jetty-client-webapp</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.eclipse.jetty.ee10.websocket</groupId> <groupId>org.eclipse.jetty.ee10.websocket</groupId>

View File

@ -0,0 +1,58 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.eclipse.jetty.ee10.websocket</groupId>
<artifactId>jetty-ee10-websocket</artifactId>
<version>12.0.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jetty-ee10-websocket-jakarta-client-webapp</artifactId>
<name>EE10 :: Websocket :: Jakarta Client WebApp</name>
<properties>
<bundle-symbolic-name>${project.groupId}.jakarta.client.webapp</bundle-symbolic-name>
</properties>
<dependencies>
<dependency>
<groupId>org.eclipse.jetty.ee10.websocket</groupId>
<artifactId>jetty-ee10-websocket-jakarta-client</artifactId>
</dependency>
<dependency>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<executions>
<execution>
<goals>
<goal>manifest</goal>
</goals>
<configuration>
<instructions>
<Bundle-Description>jakarta.websocket.client WebApp Implementation</Bundle-Description>
<Export-Package>
org.eclipse.jetty.ee10.websocket.jakarta.client.webapp.*;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}"
</Export-Package>
<Require-Capability>
osgi.extender; filter:="(osgi.extender=osgi.serviceloader.registrar)";resolution:=optional
</Require-Capability>
<Provide-Capability>
osgi.serviceloader;osgi.serviceloader=jakarta.servlet.ServletContainerInitializer
</Provide-Capability>
</instructions>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@ -0,0 +1,26 @@
//
// ========================================================================
// Copyright (c) 1995 Mort Bay Consulting Pty Ltd and others.
//
// This program and the accompanying materials are made available under the
// terms of the Eclipse Public License v. 2.0 which is available at
// https://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0
// which is available at https://www.apache.org/licenses/LICENSE-2.0.
//
// SPDX-License-Identifier: EPL-2.0 OR Apache-2.0
// ========================================================================
//
import org.eclipse.jetty.ee10.websocket.jakarta.client.webapp.JakartaWebSocketShutdownContainer;
module org.eclipse.jetty.ee10.websocket.jakarta.client.webapp
{
requires org.slf4j;
requires transitive jakarta.servlet;
requires transitive org.eclipse.jetty.ee10.websocket.jakarta.client;
exports org.eclipse.jetty.ee10.websocket.jakarta.client.webapp;
provides jakarta.servlet.ServletContainerInitializer with
JakartaWebSocketShutdownContainer;
}

View File

@ -11,7 +11,7 @@
// ======================================================================== // ========================================================================
// //
package org.eclipse.jetty.ee10.websocket.jakarta.client.internal; package org.eclipse.jetty.ee10.websocket.jakarta.client.webapp;
import java.util.Set; import java.util.Set;

View File

@ -0,0 +1 @@
org.eclipse.jetty.ee10.websocket.jakarta.client.webapp.JakartaWebSocketShutdownContainer

View File

@ -38,7 +38,7 @@
<dependency> <dependency>
<groupId>jakarta.servlet</groupId> <groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId> <artifactId>jakarta.servlet-api</artifactId>
<optional>true</optional> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.eclipse.jetty</groupId> <groupId>org.eclipse.jetty</groupId>
@ -78,8 +78,7 @@
osgi.extender; filter:="(osgi.extender=osgi.serviceloader.registrar)";resolution:=optional osgi.extender; filter:="(osgi.extender=osgi.serviceloader.registrar)";resolution:=optional
</Require-Capability> </Require-Capability>
<Provide-Capability> <Provide-Capability>
osgi.serviceloader;osgi.serviceloader=jakarta.websocket.ContainerProvider, osgi.serviceloader;osgi.serviceloader=jakarta.websocket.ContainerProvider
osgi.serviceloader;osgi.serviceloader=jakarta.servlet.ServletContainerInitializer
</Provide-Capability> </Provide-Capability>
</instructions> </instructions>
</configuration> </configuration>

View File

@ -17,13 +17,8 @@ module org.eclipse.jetty.ee10.websocket.jakarta.client
requires transitive org.eclipse.jetty.ee10.websocket.jakarta.common; requires transitive org.eclipse.jetty.ee10.websocket.jakarta.common;
requires static jakarta.servlet;
exports org.eclipse.jetty.ee10.websocket.jakarta.client; exports org.eclipse.jetty.ee10.websocket.jakarta.client;
provides jakarta.websocket.ContainerProvider with provides jakarta.websocket.ContainerProvider with
org.eclipse.jetty.ee10.websocket.jakarta.client.JakartaWebSocketClientContainerProvider; org.eclipse.jetty.ee10.websocket.jakarta.client.JakartaWebSocketClientContainerProvider;
provides jakarta.servlet.ServletContainerInitializer with
org.eclipse.jetty.ee10.websocket.jakarta.client.internal.JakartaWebSocketShutdownContainer;
} }

View File

@ -1 +0,0 @@
org.eclipse.jetty.ee10.websocket.jakarta.client.internal.JakartaWebSocketShutdownContainer

View File

@ -35,6 +35,6 @@ public class JakartaWebSocketConfiguration extends AbstractConfiguration
.protectAndExpose("org.eclipse.jetty.ee10.websocket.servlet.") // For WebSocketUpgradeFilter .protectAndExpose("org.eclipse.jetty.ee10.websocket.servlet.") // For WebSocketUpgradeFilter
.protectAndExpose("org.eclipse.jetty.ee10.websocket.jakarta.server.config.") .protectAndExpose("org.eclipse.jetty.ee10.websocket.jakarta.server.config.")
.protectAndExpose("org.eclipse.jetty.ee10.websocket.jakarta.client.JakartaWebSocketClientContainerProvider") .protectAndExpose("org.eclipse.jetty.ee10.websocket.jakarta.client.JakartaWebSocketClientContainerProvider")
.protectAndExpose("org.eclipse.jetty.ee10.websocket.jakarta.client.internal.JakartaWebSocketShutdownContainer")); .protectAndExpose("org.eclipse.jetty.ee10.websocket.jakarta.client.JakartaWebSocketShutdownContainer"));
} }
} }

View File

@ -23,7 +23,7 @@
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.eclipse.jetty.ee10.websocket</groupId> <groupId>org.eclipse.jetty.ee10.websocket</groupId>
<artifactId>jetty-ee10-websocket-jakarta-client</artifactId> <artifactId>jetty-ee10-websocket-jakarta-client-webapp</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.eclipse.jetty.ee10.websocket</groupId> <groupId>org.eclipse.jetty.ee10.websocket</groupId>

View File

@ -27,7 +27,7 @@ import org.eclipse.jetty.client.HttpClient;
import org.eclipse.jetty.client.Response; import org.eclipse.jetty.client.Response;
import org.eclipse.jetty.ee10.webapp.Configuration; import org.eclipse.jetty.ee10.webapp.Configuration;
import org.eclipse.jetty.ee10.websocket.jakarta.client.JakartaWebSocketClientContainerProvider; import org.eclipse.jetty.ee10.websocket.jakarta.client.JakartaWebSocketClientContainerProvider;
import org.eclipse.jetty.ee10.websocket.jakarta.client.internal.JakartaWebSocketShutdownContainer; import org.eclipse.jetty.ee10.websocket.jakarta.client.webapp.JakartaWebSocketShutdownContainer;
import org.eclipse.jetty.ee10.websocket.jakarta.common.JakartaWebSocketContainer; import org.eclipse.jetty.ee10.websocket.jakarta.common.JakartaWebSocketContainer;
import org.eclipse.jetty.ee10.websocket.jakarta.server.config.JakartaWebSocketConfiguration; import org.eclipse.jetty.ee10.websocket.jakarta.server.config.JakartaWebSocketConfiguration;
import org.eclipse.jetty.http.BadMessageException; import org.eclipse.jetty.http.BadMessageException;
@ -95,6 +95,7 @@ public class JakartaClientShutdownWithServerWebAppTest
// Copy over the individual jars required for Jakarta WebSocket. // Copy over the individual jars required for Jakarta WebSocket.
app.createWebInf(); app.createWebInf();
app.copyLib(JakartaWebSocketClientContainerProvider.class, "jetty-ee10-websocket-jakarta-client.jar"); app.copyLib(JakartaWebSocketClientContainerProvider.class, "jetty-ee10-websocket-jakarta-client.jar");
app.copyLib(JakartaWebSocketShutdownContainer.class, "jetty-ee10-websocket-jakarta-client-webapp.jar");
app.copyLib(JakartaWebSocketContainer.class, "jetty-ee10-websocket-jakarta-common.jar"); app.copyLib(JakartaWebSocketContainer.class, "jetty-ee10-websocket-jakarta-common.jar");
app.copyLib(ContainerLifeCycle.class, "jetty-util.jar"); app.copyLib(ContainerLifeCycle.class, "jetty-util.jar");
app.copyLib(CoreClientUpgradeRequest.class, "jetty-websocket-core-client.jar"); app.copyLib(CoreClientUpgradeRequest.class, "jetty-websocket-core-client.jar");

View File

@ -7,11 +7,11 @@
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>jetty-ee10-websocket-jetty-client</artifactId> <artifactId>jetty-ee10-websocket-jetty-client-webapp</artifactId>
<name>EE10 :: Websocket :: Jetty Client</name> <name>EE10 :: Websocket :: Jetty Client WebApp</name>
<properties> <properties>
<bundle-symbolic-name>${project.groupId}.client</bundle-symbolic-name> <bundle-symbolic-name>${project.groupId}.client.webapp</bundle-symbolic-name>
</properties> </properties>
<build> <build>
@ -42,7 +42,6 @@
<dependency> <dependency>
<groupId>org.eclipse.jetty.ee10</groupId> <groupId>org.eclipse.jetty.ee10</groupId>
<artifactId>jetty-ee10-webapp</artifactId> <artifactId>jetty-ee10-webapp</artifactId>
<optional>true</optional>
</dependency> </dependency>
</dependencies> </dependencies>

View File

@ -15,7 +15,7 @@ ee10-annotations
websocket-jetty-client websocket-jetty-client
[lib] [lib]
lib/ee10-websocket/jetty-ee10-websocket-jetty-client-${jetty.version}.jar lib/ee10-websocket/jetty-ee10-websocket-jetty-client-webapp-${jetty.version}.jar
[jpms] [jpms]
# The implementation needs to access method handles in # The implementation needs to access method handles in

View File

@ -11,11 +11,15 @@
// ======================================================================== // ========================================================================
// //
import org.eclipse.jetty.ee10.websocket.client.config.JettyWebSocketClientConfiguration;
module org.eclipse.jetty.ee10.websocket.jetty.client module org.eclipse.jetty.ee10.websocket.jetty.client
{ {
requires org.eclipse.jetty.websocket.client; requires org.eclipse.jetty.websocket.client;
requires static org.eclipse.jetty.ee10.webapp; requires transitive org.eclipse.jetty.ee10.webapp;
exports org.eclipse.jetty.ee10.websocket.client.config; exports org.eclipse.jetty.ee10.websocket.client.config;
provides org.eclipse.jetty.ee10.webapp.Configuration with JettyWebSocketClientConfiguration;
} }

View File

@ -64,7 +64,7 @@
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.eclipse.jetty.ee10.websocket</groupId> <groupId>org.eclipse.jetty.ee10.websocket</groupId>
<artifactId>jetty-ee10-websocket-jetty-client</artifactId> <artifactId>jetty-ee10-websocket-jetty-client-webapp</artifactId>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>

View File

@ -18,10 +18,11 @@
<modules> <modules>
<module>jetty-ee10-websocket-jakarta-client</module> <module>jetty-ee10-websocket-jakarta-client</module>
<module>jetty-ee10-websocket-jakarta-client-webapp</module>
<module>jetty-ee10-websocket-jakarta-common</module> <module>jetty-ee10-websocket-jakarta-common</module>
<module>jetty-ee10-websocket-jakarta-server</module> <module>jetty-ee10-websocket-jakarta-server</module>
<module>jetty-ee10-websocket-jakarta-tests</module> <module>jetty-ee10-websocket-jakarta-tests</module>
<module>jetty-ee10-websocket-jetty-client</module> <module>jetty-ee10-websocket-jetty-client-webapp</module>
<module>jetty-ee10-websocket-jetty-server</module> <module>jetty-ee10-websocket-jetty-server</module>
<module>jetty-ee10-websocket-jetty-tests</module> <module>jetty-ee10-websocket-jetty-tests</module>
<module>jetty-ee10-websocket-servlet</module> <module>jetty-ee10-websocket-servlet</module>

View File

@ -160,6 +160,11 @@
<artifactId>jetty-ee10-websocket-jakarta-client</artifactId> <artifactId>jetty-ee10-websocket-jakarta-client</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
</dependency> </dependency>
<dependency>
<groupId>org.eclipse.jetty.ee10.websocket</groupId>
<artifactId>jetty-ee10-websocket-jakarta-client-webapp</artifactId>
<version>${project.version}</version>
</dependency>
<dependency> <dependency>
<groupId>org.eclipse.jetty.ee10.websocket</groupId> <groupId>org.eclipse.jetty.ee10.websocket</groupId>
<artifactId>jetty-ee10-websocket-jakarta-common</artifactId> <artifactId>jetty-ee10-websocket-jakarta-common</artifactId>
@ -172,7 +177,7 @@
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.eclipse.jetty.ee10.websocket</groupId> <groupId>org.eclipse.jetty.ee10.websocket</groupId>
<artifactId>jetty-ee10-websocket-jetty-client</artifactId> <artifactId>jetty-ee10-websocket-jetty-client-webapp</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
</dependency> </dependency>
<dependency> <dependency>

View File

@ -110,6 +110,11 @@
<artifactId>jetty-ee8-websocket-javax-client</artifactId> <artifactId>jetty-ee8-websocket-javax-client</artifactId>
<version>12.0.0-SNAPSHOT</version> <version>12.0.0-SNAPSHOT</version>
</dependency> </dependency>
<dependency>
<groupId>org.eclipse.jetty.ee8.websocket</groupId>
<artifactId>jetty-ee8-websocket-javax-client-webapp</artifactId>
<version>12.0.0-SNAPSHOT</version>
</dependency>
<dependency> <dependency>
<groupId>org.eclipse.jetty.ee8.websocket</groupId> <groupId>org.eclipse.jetty.ee8.websocket</groupId>
<artifactId>jetty-ee8-websocket-javax-common</artifactId> <artifactId>jetty-ee8-websocket-javax-common</artifactId>
@ -130,6 +135,11 @@
<artifactId>jetty-ee8-websocket-jetty-client</artifactId> <artifactId>jetty-ee8-websocket-jetty-client</artifactId>
<version>12.0.0-SNAPSHOT</version> <version>12.0.0-SNAPSHOT</version>
</dependency> </dependency>
<dependency>
<groupId>org.eclipse.jetty.ee8.websocket</groupId>
<artifactId>jetty-ee8-websocket-jetty-client-webapp</artifactId>
<version>12.0.0-SNAPSHOT</version>
</dependency>
<dependency> <dependency>
<groupId>org.eclipse.jetty.ee8.websocket</groupId> <groupId>org.eclipse.jetty.ee8.websocket</groupId>
<artifactId>jetty-ee8-websocket-jetty-common</artifactId> <artifactId>jetty-ee8-websocket-jetty-common</artifactId>

View File

@ -384,6 +384,10 @@
<groupId>org.eclipse.jetty.ee8.websocket</groupId> <groupId>org.eclipse.jetty.ee8.websocket</groupId>
<artifactId>jetty-ee8-websocket-jetty-client</artifactId> <artifactId>jetty-ee8-websocket-jetty-client</artifactId>
</dependency> </dependency>
<dependency>
<groupId>org.eclipse.jetty.ee8.websocket</groupId>
<artifactId>jetty-ee8-websocket-jetty-client-webapp</artifactId>
</dependency>
<dependency> <dependency>
<groupId>org.eclipse.jetty.ee8.websocket</groupId> <groupId>org.eclipse.jetty.ee8.websocket</groupId>
<artifactId>jetty-ee8-websocket-javax-server</artifactId> <artifactId>jetty-ee8-websocket-javax-server</artifactId>

View File

@ -0,0 +1,53 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.eclipse.jetty.ee8.websocket</groupId>
<artifactId>jetty-ee8-websocket</artifactId>
<version>12.0.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jetty-ee8-websocket-javax-client-webapp</artifactId>
<name>EE8 :: Websocket :: Javax Client Webapp</name>
<properties>
<ee9.module>jetty-ee9-websocket/jetty-ee9-websocket-jakarta-client-webapp</ee9.module>
<bundle-symbolic-name>${project.groupId}.javax.client.webapp</bundle-symbolic-name>
</properties>
<dependencies>
<dependency>
<groupId>org.eclipse.jetty.ee8.websocket</groupId>
<artifactId>jetty-ee8-websocket-javax-client</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.toolchain</groupId>
<artifactId>jetty-servlet-api</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<instructions>
<Bundle-Description>javax.websocket.client WebApp Implementation</Bundle-Description>
<Export-Package>
org.eclipse.jetty.ee8.websocket.javax.client.webapp.*;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}"
</Export-Package>
<Require-Capability>
osgi.extender; filter:="(osgi.extender=osgi.serviceloader.registrar)";resolution:=optional
</Require-Capability>
<Provide-Capability>
osgi.serviceloader;osgi.serviceloader=javax.servlet.ServletContainerInitializer
</Provide-Capability>
</instructions>
</configuration>
</plugin>
</plugins>
</build>
</project>

View File

@ -36,7 +36,7 @@
<dependency> <dependency>
<groupId>org.eclipse.jetty.toolchain</groupId> <groupId>org.eclipse.jetty.toolchain</groupId>
<artifactId>jetty-servlet-api</artifactId> <artifactId>jetty-servlet-api</artifactId>
<optional>true</optional> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.eclipse.jetty</groupId> <groupId>org.eclipse.jetty</groupId>
@ -63,16 +63,15 @@
<extensions>true</extensions> <extensions>true</extensions>
<configuration> <configuration>
<instructions> <instructions>
<Bundle-Description>jakarta.websocket.client Implementation</Bundle-Description> <Bundle-Description>javax.websocket.client Implementation</Bundle-Description>
<Export-Package> <Export-Package>
org.eclipse.jetty.ee8.websocket.jakarta.client.*;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}" org.eclipse.jetty.ee8.websocket.javax.client.*;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}"
</Export-Package> </Export-Package>
<Require-Capability> <Require-Capability>
osgi.extender; filter:="(osgi.extender=osgi.serviceloader.registrar)";resolution:=optional osgi.extender; filter:="(osgi.extender=osgi.serviceloader.registrar)";resolution:=optional
</Require-Capability> </Require-Capability>
<Provide-Capability> <Provide-Capability>
osgi.serviceloader;osgi.serviceloader=jakarta.websocket.ContainerProvider, osgi.serviceloader;osgi.serviceloader=javax.websocket.ContainerProvider
osgi.serviceloader;osgi.serviceloader=jakarta.servlet.ServletContainerInitializer
</Provide-Capability> </Provide-Capability>
</instructions> </instructions>
</configuration> </configuration>

View File

@ -49,7 +49,7 @@
<artifactId>maven-surefire-plugin</artifactId> <artifactId>maven-surefire-plugin</artifactId>
<configuration> <configuration>
<argLine> <argLine>
@{argLine} ${jetty.surefire.argLine} --add-reads org.eclipse.jetty.websocket.jakarta.server=org.eclipse.jetty.security --add-reads org.eclipse.jetty.websocket.jakarta.common=org.eclipse.jetty.websocket.jakarta.server @{argLine} ${jetty.surefire.argLine} --add-reads org.eclipse.jetty.websocket.javax.server=org.eclipse.jetty.security --add-reads org.eclipse.jetty.websocket.javax.common=org.eclipse.jetty.websocket.javax.server
</argLine> </argLine>
</configuration> </configuration>
</plugin> </plugin>
@ -59,13 +59,13 @@
<extensions>true</extensions> <extensions>true</extensions>
<configuration> <configuration>
<instructions> <instructions>
<Bundle-Description>jakarta.websocket.server Implementation</Bundle-Description> <Bundle-Description>javax.websocket.server Implementation</Bundle-Description>
<Export-Package> <Export-Package>
org.eclipse.jetty.websocket.jakarta.server.*;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}" org.eclipse.jetty.websocket.javax.server.*;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}"
</Export-Package> </Export-Package>
<Require-Capability>osgi.extender; filter:="(osgi.extender=osgi.serviceloader.registrar)";resolution:=optional</Require-Capability> <Require-Capability>osgi.extender; filter:="(osgi.extender=osgi.serviceloader.registrar)";resolution:=optional</Require-Capability>
<Provide-Capability> <Provide-Capability>
osgi.serviceloader;osgi.serviceloader=org.eclipse.jetty.ee8.webapp.Configuration,osgi.serviceloader;osgi.serviceloader=jakarta.servlet.ServletContainerInitializer,osgi.serviceloader;osgi.serviceloader=jakarta.websocket.server.ServerEndpointConfig$Configurator osgi.serviceloader;osgi.serviceloader=org.eclipse.jetty.ee8.webapp.Configuration,osgi.serviceloader;osgi.serviceloader=javax.servlet.ServletContainerInitializer,osgi.serviceloader;osgi.serviceloader=javax.websocket.server.ServerEndpointConfig$Configurator
</Provide-Capability> </Provide-Capability>
</instructions> </instructions>
</configuration> </configuration>

View File

@ -25,7 +25,7 @@
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.eclipse.jetty.ee8.websocket</groupId> <groupId>org.eclipse.jetty.ee8.websocket</groupId>
<artifactId>jetty-ee8-websocket-javax-client</artifactId> <artifactId>jetty-ee8-websocket-javax-client-webapp</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.eclipse.jetty.ee8.websocket</groupId> <groupId>org.eclipse.jetty.ee8.websocket</groupId>

View File

@ -0,0 +1,49 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.eclipse.jetty.ee8.websocket</groupId>
<artifactId>jetty-ee8-websocket</artifactId>
<version>12.0.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jetty-ee8-websocket-jetty-client-webapp</artifactId>
<name>EE8 :: Websocket :: Jetty Client WebApp</name>
<properties>
<ee9.module>jetty-ee9-websocket/jetty-ee9-websocket-jetty-client-webapp</ee9.module>
<bundle-symbolic-name>${project.groupId}.client.webapp</bundle-symbolic-name>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<instructions>
<Require-Capability>
osgi.extender; filter:="(osgi.extender=osgi.serviceloader.registrar)"
</Require-Capability>
<Provide-Capability>
osgi.serviceloader; osgi.serviceloader=org.eclipse.jetty.ee8.webapp.Configuration
</Provide-Capability>
</instructions>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.eclipse.jetty.ee8.websocket</groupId>
<artifactId>jetty-ee8-websocket-jetty-client</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.ee8</groupId>
<artifactId>jetty-ee8-webapp</artifactId>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,27 @@
# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html
[description]
Expose the Jetty WebSocket Client classes to deployed web applications.
[environment]
ee8
[tags]
websocket
[depend]
client
ee8-annotations
[lib]
lib/jetty-websocket-core-common-${jetty.version}.jar
lib/jetty-websocket-core-client-${jetty.version}.jar
lib/ee8-websocket/jetty-ee8-websocket-jetty-api-${jetty.version}.jar
lib/ee8-websocket/jetty-ee8-websocket-jetty-common-${jetty.version}.jar
lib/ee8-websocket/jetty-ee8-websocket-jetty-client-${jetty.version}.jar
lib/ee8-websocket/jetty-ee8-websocket-jetty-client-webapp-${jetty.version}.jar
[jpms]
# The implementation needs to access method handles in
# classes that are in the web application classloader.
add-reads: org.eclipse.jetty.websocket.jetty.common=ALL-UNNAMED

View File

@ -52,15 +52,15 @@
<groupId>org.eclipse.jetty</groupId> <groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-client</artifactId> <artifactId>jetty-client</artifactId>
</dependency> </dependency>
<dependency>
<groupId>org.eclipse.jetty.ee8</groupId>
<artifactId>jetty-ee8-webapp</artifactId>
<optional>true</optional>
</dependency>
<dependency> <dependency>
<groupId>org.slf4j</groupId> <groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId> <artifactId>slf4j-api</artifactId>
</dependency> </dependency>
<dependency>
<groupId>org.eclipse.jetty.ee8</groupId>
<artifactId>jetty-ee8-webapp</artifactId>
<scope>test</scope>
</dependency>
<dependency> <dependency>
<groupId>org.eclipse.jetty</groupId> <groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-slf4j-impl</artifactId> <artifactId>jetty-slf4j-impl</artifactId>

View File

@ -30,7 +30,7 @@
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.eclipse.jetty.ee8.websocket</groupId> <groupId>org.eclipse.jetty.ee8.websocket</groupId>
<artifactId>jetty-ee8-websocket-jetty-client</artifactId> <artifactId>jetty-ee8-websocket-jetty-client-webapp</artifactId>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>

View File

@ -22,9 +22,11 @@
<module>jetty-ee8-websocket-jetty-api</module> <module>jetty-ee8-websocket-jetty-api</module>
<module>jetty-ee8-websocket-jetty-common</module> <module>jetty-ee8-websocket-jetty-common</module>
<module>jetty-ee8-websocket-javax-client</module> <module>jetty-ee8-websocket-javax-client</module>
<module>jetty-ee8-websocket-javax-client-webapp</module>
<module>jetty-ee8-websocket-servlet</module> <module>jetty-ee8-websocket-servlet</module>
<module>jetty-ee8-websocket-javax-server</module> <module>jetty-ee8-websocket-javax-server</module>
<module>jetty-ee8-websocket-jetty-client</module> <module>jetty-ee8-websocket-jetty-client</module>
<module>jetty-ee8-websocket-jetty-client-webapp</module>
<module>jetty-ee8-websocket-jetty-server</module> <module>jetty-ee8-websocket-jetty-server</module>
<module>jetty-ee8-websocket-javax-tests</module> <module>jetty-ee8-websocket-javax-tests</module>
<module>jetty-ee8-websocket-jetty-tests</module> <module>jetty-ee8-websocket-jetty-tests</module>

View File

@ -331,6 +331,11 @@
<artifactId>jetty-ee8-websocket-javax-client</artifactId> <artifactId>jetty-ee8-websocket-javax-client</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
</dependency> </dependency>
<dependency>
<groupId>org.eclipse.jetty.ee8.websocket</groupId>
<artifactId>jetty-ee8-websocket-javax-client-webapp</artifactId>
<version>${project.version}</version>
</dependency>
<dependency> <dependency>
<groupId>org.eclipse.jetty.ee8.websocket</groupId> <groupId>org.eclipse.jetty.ee8.websocket</groupId>
<artifactId>jetty-ee8-websocket-servlet</artifactId> <artifactId>jetty-ee8-websocket-servlet</artifactId>
@ -351,6 +356,11 @@
<artifactId>jetty-ee8-websocket-jetty-client</artifactId> <artifactId>jetty-ee8-websocket-jetty-client</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
</dependency> </dependency>
<dependency>
<groupId>org.eclipse.jetty.ee8.websocket</groupId>
<artifactId>jetty-ee8-websocket-jetty-client-webapp</artifactId>
<version>${project.version}</version>
</dependency>
<dependency> <dependency>
<groupId>org.eclipse.jetty.ee8.websocket</groupId> <groupId>org.eclipse.jetty.ee8.websocket</groupId>
<artifactId>jetty-ee8-websocket-jetty-server</artifactId> <artifactId>jetty-ee8-websocket-jetty-server</artifactId>

View File

@ -140,6 +140,11 @@
<artifactId>jetty-ee9-websocket-jakarta-client</artifactId> <artifactId>jetty-ee9-websocket-jakarta-client</artifactId>
<version>12.0.0-SNAPSHOT</version> <version>12.0.0-SNAPSHOT</version>
</dependency> </dependency>
<dependency>
<groupId>org.eclipse.jetty.ee9.websocket</groupId>
<artifactId>jetty-ee9-websocket-jakarta-client-webapp</artifactId>
<version>12.0.0-SNAPSHOT</version>
</dependency>
<dependency> <dependency>
<groupId>org.eclipse.jetty.ee9.websocket</groupId> <groupId>org.eclipse.jetty.ee9.websocket</groupId>
<artifactId>jetty-ee9-websocket-jakarta-common</artifactId> <artifactId>jetty-ee9-websocket-jakarta-common</artifactId>
@ -160,6 +165,11 @@
<artifactId>jetty-ee9-websocket-jetty-client</artifactId> <artifactId>jetty-ee9-websocket-jetty-client</artifactId>
<version>12.0.0-SNAPSHOT</version> <version>12.0.0-SNAPSHOT</version>
</dependency> </dependency>
<dependency>
<groupId>org.eclipse.jetty.ee9.websocket</groupId>
<artifactId>jetty-ee9-websocket-jetty-client-webapp</artifactId>
<version>12.0.0-SNAPSHOT</version>
</dependency>
<dependency> <dependency>
<groupId>org.eclipse.jetty.ee9.websocket</groupId> <groupId>org.eclipse.jetty.ee9.websocket</groupId>
<artifactId>jetty-ee9-websocket-jetty-common</artifactId> <artifactId>jetty-ee9-websocket-jetty-common</artifactId>

View File

@ -434,6 +434,10 @@
<groupId>org.eclipse.jetty.ee9.websocket</groupId> <groupId>org.eclipse.jetty.ee9.websocket</groupId>
<artifactId>jetty-ee9-websocket-jetty-client</artifactId> <artifactId>jetty-ee9-websocket-jetty-client</artifactId>
</dependency> </dependency>
<dependency>
<groupId>org.eclipse.jetty.ee9.websocket</groupId>
<artifactId>jetty-ee9-websocket-jetty-client-webapp</artifactId>
</dependency>
<dependency> <dependency>
<groupId>org.eclipse.jetty.ee9.websocket</groupId> <groupId>org.eclipse.jetty.ee9.websocket</groupId>
<artifactId>jetty-ee9-websocket-jakarta-server</artifactId> <artifactId>jetty-ee9-websocket-jakarta-server</artifactId>

View File

@ -0,0 +1,52 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.eclipse.jetty.ee9.websocket</groupId>
<artifactId>jetty-ee9-websocket</artifactId>
<version>12.0.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jetty-ee9-websocket-jakarta-client-webapp</artifactId>
<name>EE9 :: Websocket :: Jakarta Client Webapp</name>
<properties>
<bundle-symbolic-name>${project.groupId}.jakarta.client.webapp</bundle-symbolic-name>
</properties>
<dependencies>
<dependency>
<groupId>org.eclipse.jetty.ee9.websocket</groupId>
<artifactId>jetty-ee9-websocket-jakarta-client</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.toolchain</groupId>
<artifactId>jetty-jakarta-servlet-api</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<instructions>
<Bundle-Description>jakarta.websocket.client WebApp Implementation</Bundle-Description>
<Export-Package>
org.eclipse.jetty.ee9.websocket.jakarta.client.webapp.*;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}"
</Export-Package>
<Require-Capability>
osgi.extender; filter:="(osgi.extender=osgi.serviceloader.registrar)";resolution:=optional
</Require-Capability>
<Provide-Capability>
osgi.serviceloader;osgi.serviceloader=jakarta.servlet.ServletContainerInitializer
</Provide-Capability>
</instructions>
</configuration>
</plugin>
</plugins>
</build>
</project>

View File

@ -0,0 +1,26 @@
//
// ========================================================================
// Copyright (c) 1995 Mort Bay Consulting Pty Ltd and others.
//
// This program and the accompanying materials are made available under the
// terms of the Eclipse Public License v. 2.0 which is available at
// https://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0
// which is available at https://www.apache.org/licenses/LICENSE-2.0.
//
// SPDX-License-Identifier: EPL-2.0 OR Apache-2.0
// ========================================================================
//
import org.eclipse.jetty.ee9.websocket.jakarta.client.webapp.JakartaWebSocketShutdownContainer;
module org.eclipse.jetty.ee9.websocket.jakarta.client.webapp
{
requires org.slf4j;
requires transitive jetty.servlet.api;
requires transitive org.eclipse.jetty.ee9.websocket.jakarta.client;
exports org.eclipse.jetty.ee9.websocket.jakarta.client.webapp;
provides jakarta.servlet.ServletContainerInitializer with
JakartaWebSocketShutdownContainer;
}

View File

@ -11,7 +11,7 @@
// ======================================================================== // ========================================================================
// //
package org.eclipse.jetty.ee9.websocket.jakarta.client.internal; package org.eclipse.jetty.ee9.websocket.jakarta.client.webapp;
import java.util.Set; import java.util.Set;

View File

@ -0,0 +1 @@
org.eclipse.jetty.ee9.websocket.jakarta.client.webapp.JakartaWebSocketShutdownContainer

View File

@ -35,7 +35,7 @@
<dependency> <dependency>
<groupId>org.eclipse.jetty.toolchain</groupId> <groupId>org.eclipse.jetty.toolchain</groupId>
<artifactId>jetty-jakarta-servlet-api</artifactId> <artifactId>jetty-jakarta-servlet-api</artifactId>
<optional>true</optional> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.eclipse.jetty</groupId> <groupId>org.eclipse.jetty</groupId>
@ -70,8 +70,7 @@
osgi.extender; filter:="(osgi.extender=osgi.serviceloader.registrar)";resolution:=optional osgi.extender; filter:="(osgi.extender=osgi.serviceloader.registrar)";resolution:=optional
</Require-Capability> </Require-Capability>
<Provide-Capability> <Provide-Capability>
osgi.serviceloader;osgi.serviceloader=jakarta.websocket.ContainerProvider, osgi.serviceloader;osgi.serviceloader=jakarta.websocket.ContainerProvider
osgi.serviceloader;osgi.serviceloader=jakarta.servlet.ServletContainerInitializer
</Provide-Capability> </Provide-Capability>
</instructions> </instructions>
</configuration> </configuration>

View File

@ -17,13 +17,8 @@ module org.eclipse.jetty.ee9.websocket.jakarta.client
requires transitive org.eclipse.jetty.ee9.websocket.jakarta.common; requires transitive org.eclipse.jetty.ee9.websocket.jakarta.common;
requires static jetty.servlet.api;
exports org.eclipse.jetty.ee9.websocket.jakarta.client; exports org.eclipse.jetty.ee9.websocket.jakarta.client;
provides jakarta.websocket.ContainerProvider with provides jakarta.websocket.ContainerProvider with
org.eclipse.jetty.ee9.websocket.jakarta.client.JakartaWebSocketClientContainerProvider; org.eclipse.jetty.ee9.websocket.jakarta.client.JakartaWebSocketClientContainerProvider;
provides jakarta.servlet.ServletContainerInitializer with
org.eclipse.jetty.ee9.websocket.jakarta.client.internal.JakartaWebSocketShutdownContainer;
} }

View File

@ -1 +0,0 @@
org.eclipse.jetty.ee9.websocket.jakarta.client.internal.JakartaWebSocketShutdownContainer

View File

@ -35,6 +35,6 @@ public class JakartaWebSocketConfiguration extends AbstractConfiguration
protectAndExpose("org.eclipse.jetty.ee9.websocket.servlet."); // For WebSocketUpgradeFilter protectAndExpose("org.eclipse.jetty.ee9.websocket.servlet."); // For WebSocketUpgradeFilter
protectAndExpose("org.eclipse.jetty.ee9.websocket.jakarta.server.config."); protectAndExpose("org.eclipse.jetty.ee9.websocket.jakarta.server.config.");
protectAndExpose("org.eclipse.jetty.ee9.websocket.jakarta.client.JakartaWebSocketClientContainerProvider"); protectAndExpose("org.eclipse.jetty.ee9.websocket.jakarta.client.JakartaWebSocketClientContainerProvider");
protectAndExpose("org.eclipse.jetty.ee9.websocket.jakarta.client.internal.JakartaWebSocketShutdownContainer"); protectAndExpose("org.eclipse.jetty.ee9.websocket.jakarta.client.JakartaWebSocketShutdownContainer");
} }
} }

View File

@ -24,7 +24,7 @@
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.eclipse.jetty.ee9.websocket</groupId> <groupId>org.eclipse.jetty.ee9.websocket</groupId>
<artifactId>jetty-ee9-websocket-jakarta-client</artifactId> <artifactId>jetty-ee9-websocket-jakarta-client-webapp</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.eclipse.jetty.ee9.websocket</groupId> <groupId>org.eclipse.jetty.ee9.websocket</groupId>

View File

@ -28,7 +28,7 @@ import org.eclipse.jetty.client.Response;
import org.eclipse.jetty.ee9.webapp.Configuration; import org.eclipse.jetty.ee9.webapp.Configuration;
import org.eclipse.jetty.ee9.webapp.Configurations; import org.eclipse.jetty.ee9.webapp.Configurations;
import org.eclipse.jetty.ee9.websocket.jakarta.client.JakartaWebSocketClientContainerProvider; import org.eclipse.jetty.ee9.websocket.jakarta.client.JakartaWebSocketClientContainerProvider;
import org.eclipse.jetty.ee9.websocket.jakarta.client.internal.JakartaWebSocketShutdownContainer; import org.eclipse.jetty.ee9.websocket.jakarta.client.webapp.JakartaWebSocketShutdownContainer;
import org.eclipse.jetty.ee9.websocket.jakarta.common.JakartaWebSocketContainer; import org.eclipse.jetty.ee9.websocket.jakarta.common.JakartaWebSocketContainer;
import org.eclipse.jetty.ee9.websocket.jakarta.server.config.JakartaWebSocketConfiguration; import org.eclipse.jetty.ee9.websocket.jakarta.server.config.JakartaWebSocketConfiguration;
import org.eclipse.jetty.http.BadMessageException; import org.eclipse.jetty.http.BadMessageException;
@ -94,6 +94,7 @@ public class JakartaClientShutdownWithServerWebAppTest
// Copy over the individual jars required for Jakarta WebSocket. // Copy over the individual jars required for Jakarta WebSocket.
app.createWebInf(); app.createWebInf();
app.copyLib(JakartaWebSocketClientContainerProvider.class, "jetty-ee9-websocket-jakarta-client.jar"); app.copyLib(JakartaWebSocketClientContainerProvider.class, "jetty-ee9-websocket-jakarta-client.jar");
app.copyLib(JakartaWebSocketShutdownContainer.class, "jetty-ee9-websocket-jakarta-client-webapp.jar");
app.copyLib(JakartaWebSocketContainer.class, "jetty-ee9-websocket-jakarta-common.jar"); app.copyLib(JakartaWebSocketContainer.class, "jetty-ee9-websocket-jakarta-common.jar");
app.copyLib(ContainerLifeCycle.class, "jetty-util.jar"); app.copyLib(ContainerLifeCycle.class, "jetty-util.jar");
app.copyLib(CoreClientUpgradeRequest.class, "jetty-websocket-core-client.jar"); app.copyLib(CoreClientUpgradeRequest.class, "jetty-websocket-core-client.jar");

View File

@ -0,0 +1,48 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.eclipse.jetty.ee9.websocket</groupId>
<artifactId>jetty-ee9-websocket</artifactId>
<version>12.0.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jetty-ee9-websocket-jetty-client-webapp</artifactId>
<name>EE9 :: Websocket :: Jetty Client WebApp</name>
<properties>
<bundle-symbolic-name>${project.groupId}.client.webapp</bundle-symbolic-name>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<instructions>
<Require-Capability>
osgi.extender; filter:="(osgi.extender=osgi.serviceloader.registrar)"
</Require-Capability>
<Provide-Capability>
osgi.serviceloader; osgi.serviceloader=org.eclipse.jetty.ee9.webapp.Configuration
</Provide-Capability>
</instructions>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.eclipse.jetty.ee9.websocket</groupId>
<artifactId>jetty-ee9-websocket-jetty-client</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.ee9</groupId>
<artifactId>jetty-ee9-webapp</artifactId>
</dependency>
</dependencies>
</project>

View File

@ -19,6 +19,7 @@ lib/jetty-websocket-core-client-${jetty.version}.jar
lib/ee9-websocket/jetty-ee9-websocket-jetty-api-${jetty.version}.jar lib/ee9-websocket/jetty-ee9-websocket-jetty-api-${jetty.version}.jar
lib/ee9-websocket/jetty-ee9-websocket-jetty-common-${jetty.version}.jar lib/ee9-websocket/jetty-ee9-websocket-jetty-common-${jetty.version}.jar
lib/ee9-websocket/jetty-ee9-websocket-jetty-client-${jetty.version}.jar lib/ee9-websocket/jetty-ee9-websocket-jetty-client-${jetty.version}.jar
lib/ee9-websocket/jetty-ee9-websocket-jetty-client-webapp-${jetty.version}.jar
[jpms] [jpms]
# The implementation needs to access method handles in # The implementation needs to access method handles in

View File

@ -0,0 +1,24 @@
//
// ========================================================================
// Copyright (c) 1995 Mort Bay Consulting Pty Ltd and others.
//
// This program and the accompanying materials are made available under the
// terms of the Eclipse Public License v. 2.0 which is available at
// https://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0
// which is available at https://www.apache.org/licenses/LICENSE-2.0.
//
// SPDX-License-Identifier: EPL-2.0 OR Apache-2.0
// ========================================================================
//
import org.eclipse.jetty.ee9.websocket.client.config.JettyWebSocketClientConfiguration;
module org.eclipse.jetty.ee9.websocket.jetty.client.webapp
{
requires org.slf4j;
requires transitive org.eclipse.jetty.ee9.webapp;
exports org.eclipse.jetty.ee9.websocket.client.config;
provides org.eclipse.jetty.ee9.webapp.Configuration with JettyWebSocketClientConfiguration;
}

View File

@ -14,26 +14,6 @@
<bundle-symbolic-name>${project.groupId}.client</bundle-symbolic-name> <bundle-symbolic-name>${project.groupId}.client</bundle-symbolic-name>
</properties> </properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<instructions>
<Require-Capability>
osgi.extender; filter:="(osgi.extender=osgi.serviceloader.registrar)"
</Require-Capability>
<Provide-Capability>
osgi.serviceloader; osgi.serviceloader=org.eclipse.jetty.ee9.webapp.Configuration
</Provide-Capability>
</instructions>
</configuration>
</plugin>
</plugins>
</build>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>org.eclipse.jetty.ee9.websocket</groupId> <groupId>org.eclipse.jetty.ee9.websocket</groupId>
@ -51,15 +31,15 @@
<groupId>org.eclipse.jetty</groupId> <groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-client</artifactId> <artifactId>jetty-client</artifactId>
</dependency> </dependency>
<dependency>
<groupId>org.eclipse.jetty.ee9</groupId>
<artifactId>jetty-ee9-webapp</artifactId>
<optional>true</optional>
</dependency>
<dependency> <dependency>
<groupId>org.slf4j</groupId> <groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId> <artifactId>slf4j-api</artifactId>
</dependency> </dependency>
<dependency>
<groupId>org.eclipse.jetty.ee9</groupId>
<artifactId>jetty-ee9-webapp</artifactId>
<scope>test</scope>
</dependency>
<dependency> <dependency>
<groupId>org.eclipse.jetty</groupId> <groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-slf4j-impl</artifactId> <artifactId>jetty-slf4j-impl</artifactId>

View File

@ -20,7 +20,5 @@ module org.eclipse.jetty.ee9.websocket.jetty.client
requires transitive org.eclipse.jetty.client; requires transitive org.eclipse.jetty.client;
requires transitive org.eclipse.jetty.ee9.websocket.jetty.api; requires transitive org.eclipse.jetty.ee9.websocket.jetty.api;
requires static org.eclipse.jetty.ee9.webapp;
exports org.eclipse.jetty.ee9.websocket.client; exports org.eclipse.jetty.ee9.websocket.client;
} }

View File

@ -29,7 +29,7 @@
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.eclipse.jetty.ee9.websocket</groupId> <groupId>org.eclipse.jetty.ee9.websocket</groupId>
<artifactId>jetty-ee9-websocket-jetty-client</artifactId> <artifactId>jetty-ee9-websocket-jetty-client-webapp</artifactId>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>

View File

@ -20,11 +20,13 @@
<modules> <modules>
<module>jetty-ee9-websocket-jakarta-common</module> <module>jetty-ee9-websocket-jakarta-common</module>
<module>jetty-ee9-websocket-jakarta-client</module> <module>jetty-ee9-websocket-jakarta-client</module>
<module>jetty-ee9-websocket-jakarta-client-webapp</module>
<module>jetty-ee9-websocket-jakarta-server</module> <module>jetty-ee9-websocket-jakarta-server</module>
<module>jetty-ee9-websocket-jakarta-tests</module> <module>jetty-ee9-websocket-jakarta-tests</module>
<module>jetty-ee9-websocket-jetty-api</module> <module>jetty-ee9-websocket-jetty-api</module>
<module>jetty-ee9-websocket-jetty-common</module> <module>jetty-ee9-websocket-jetty-common</module>
<module>jetty-ee9-websocket-jetty-client</module> <module>jetty-ee9-websocket-jetty-client</module>
<module>jetty-ee9-websocket-jetty-client-webapp</module>
<module>jetty-ee9-websocket-jetty-server</module> <module>jetty-ee9-websocket-jetty-server</module>
<module>jetty-ee9-websocket-jetty-tests</module> <module>jetty-ee9-websocket-jetty-tests</module>
<module>jetty-ee9-websocket-servlet</module> <module>jetty-ee9-websocket-servlet</module>

View File

@ -173,6 +173,11 @@
<artifactId>jetty-ee9-websocket-jakarta-client</artifactId> <artifactId>jetty-ee9-websocket-jakarta-client</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
</dependency> </dependency>
<dependency>
<groupId>org.eclipse.jetty.ee9.websocket</groupId>
<artifactId>jetty-ee9-websocket-jakarta-client-webapp</artifactId>
<version>${project.version}</version>
</dependency>
<dependency> <dependency>
<groupId>org.eclipse.jetty.ee9.websocket</groupId> <groupId>org.eclipse.jetty.ee9.websocket</groupId>
<artifactId>jetty-ee9-websocket-jakarta-common</artifactId> <artifactId>jetty-ee9-websocket-jakarta-common</artifactId>
@ -193,6 +198,11 @@
<artifactId>jetty-ee9-websocket-jetty-client</artifactId> <artifactId>jetty-ee9-websocket-jetty-client</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
</dependency> </dependency>
<dependency>
<groupId>org.eclipse.jetty.ee9.websocket</groupId>
<artifactId>jetty-ee9-websocket-jetty-client-webapp</artifactId>
<version>${project.version}</version>
</dependency>
<dependency> <dependency>
<groupId>org.eclipse.jetty.ee9.websocket</groupId> <groupId>org.eclipse.jetty.ee9.websocket</groupId>
<artifactId>jetty-ee9-websocket-jetty-common</artifactId> <artifactId>jetty-ee9-websocket-jetty-common</artifactId>

View File

@ -348,8 +348,8 @@ public class DistributionTests extends AbstractJettyHomeTest
} }
@ParameterizedTest @ParameterizedTest
@CsvSource({"http,ee9", "https,ee9", "http,ee10", "https,ee10"}) @CsvSource({"http,ee9,false,", "http,ee9,true", "https,ee9,false", "http,ee10,false", "http,ee10,true", "https,ee10,false"})
public void testWebsocketClientInWebappProvidedByServer(String scheme, String env) throws Exception public void testWebsocketClientInWebappProvidedByServer(String scheme, String env, String jpms) throws Exception
{ {
Path jettyBase = newTestJettyBaseDirectory(); Path jettyBase = newTestJettyBaseDirectory();
String jettyVersion = System.getProperty("jettyVersion"); String jettyVersion = System.getProperty("jettyVersion");
@ -367,7 +367,7 @@ public class DistributionTests extends AbstractJettyHomeTest
toEnvironment("websocket-jakarta", env), toEnvironment("websocket-jakarta", env),
toEnvironment("deploy", env), toEnvironment("deploy", env),
toEnvironment("apache-jsp", env), toEnvironment("apache-jsp", env),
toEnvironment("websocket-jetty-client", env) toEnvironment("websocket-jetty-client-webapp", env)
); );
try (JettyHomeTester.Run run1 = distribution.start("--approve-all-licenses", "--add-modules=" + mods)) try (JettyHomeTester.Run run1 = distribution.start("--approve-all-licenses", "--add-modules=" + mods))
{ {
@ -378,7 +378,11 @@ public class DistributionTests extends AbstractJettyHomeTest
distribution.installWarFile(webApp, "test"); distribution.installWarFile(webApp, "test");
int port = distribution.freePort(); int port = distribution.freePort();
try (JettyHomeTester.Run run2 = distribution.start(ssl ? "jetty.ssl.port=" + port : "jetty.http.port=" + port)) List<String> args = new ArrayList<>();
args.add(ssl ? "jetty.ssl.port=" + port : "jetty.http.port=" + port);
if (Boolean.parseBoolean(jpms))
args.add("--jpms");
try (JettyHomeTester.Run run2 = distribution.start(args))
{ {
assertTrue(run2.awaitConsoleLogsFor("Started oejs.Server@", START_TIMEOUT, TimeUnit.SECONDS)); assertTrue(run2.awaitConsoleLogsFor("Started oejs.Server@", START_TIMEOUT, TimeUnit.SECONDS));
@ -395,8 +399,8 @@ public class DistributionTests extends AbstractJettyHomeTest
} }
@ParameterizedTest @ParameterizedTest
@CsvSource({"http,ee9", "https,ee9", "http,ee10", "https,ee10"}) @CsvSource({"http,ee9,false", "http,ee9,true", "https,ee9,false", "http,ee10,false", "http,ee10,true", "https,ee10,false"})
public void testWebsocketClientInWebapp(String scheme, String env) throws Exception public void testWebsocketClientInWebapp(String scheme, String env, String jpms) throws Exception
{ {
Path jettyBase = newTestJettyBaseDirectory(); Path jettyBase = newTestJettyBaseDirectory();
String jettyVersion = System.getProperty("jettyVersion"); String jettyVersion = System.getProperty("jettyVersion");
@ -424,7 +428,11 @@ public class DistributionTests extends AbstractJettyHomeTest
distribution.installWarFile(webApp, "test"); distribution.installWarFile(webApp, "test");
int port = distribution.freePort(); int port = distribution.freePort();
try (JettyHomeTester.Run run2 = distribution.start(ssl ? "jetty.ssl.port=" + port : "jetty.http.port=" + port)) List<String> args = new ArrayList<>();
args.add(ssl ? "jetty.ssl.port=" + port : "jetty.http.port=" + port);
if (Boolean.parseBoolean(jpms))
args.add("--jpms");
try (JettyHomeTester.Run run2 = distribution.start(args))
{ {
assertTrue(run2.awaitConsoleLogsFor("Started oejs.Server@", START_TIMEOUT, TimeUnit.SECONDS)); assertTrue(run2.awaitConsoleLogsFor("Started oejs.Server@", START_TIMEOUT, TimeUnit.SECONDS));