diff --git a/jetty-core/jetty-websocket/jetty-websocket-jetty-client/pom.xml b/jetty-core/jetty-websocket/jetty-websocket-jetty-client/pom.xml index 1ff67787c5c9..d1248c4db9f3 100644 --- a/jetty-core/jetty-websocket/jetty-websocket-jetty-client/pom.xml +++ b/jetty-core/jetty-websocket/jetty-websocket-jetty-client/pom.xml @@ -14,26 +14,6 @@ ${project.groupId}.client - - - - org.apache.felix - maven-bundle-plugin - true - - - - osgi.extender; filter:="(osgi.extender=osgi.serviceloader.registrar)" - - - osgi.serviceloader; osgi.serviceloader=org.eclipse.jetty.ee10.webapp.Configuration - - - - - - - org.eclipse.jetty.websocket diff --git a/jetty-core/jetty-websocket/jetty-websocket-jetty-server/src/main/java/module-info.java b/jetty-core/jetty-websocket/jetty-websocket-jetty-server/src/main/java/module-info.java index 7a92d4c26876..fecc85644689 100644 --- a/jetty-core/jetty-websocket/jetty-websocket-jetty-server/src/main/java/module-info.java +++ b/jetty-core/jetty-websocket/jetty-websocket-jetty-server/src/main/java/module-info.java @@ -13,11 +13,11 @@ module org.eclipse.jetty.websocket.server { - requires org.eclipse.jetty.server; requires org.eclipse.jetty.websocket.core.server; requires org.eclipse.jetty.websocket.common; requires org.slf4j; + requires transitive org.eclipse.jetty.server; requires transitive org.eclipse.jetty.websocket.api; exports org.eclipse.jetty.websocket.server; diff --git a/jetty-core/jetty-websocket/jetty-websocket-jetty-server/src/main/java/org/eclipse/jetty/websocket/server/ServerWebSocketContainer.java b/jetty-core/jetty-websocket/jetty-websocket-jetty-server/src/main/java/org/eclipse/jetty/websocket/server/ServerWebSocketContainer.java index 475f7910c9d9..af3974cbac35 100644 --- a/jetty-core/jetty-websocket/jetty-websocket-jetty-server/src/main/java/org/eclipse/jetty/websocket/server/ServerWebSocketContainer.java +++ b/jetty-core/jetty-websocket/jetty-websocket-jetty-server/src/main/java/org/eclipse/jetty/websocket/server/ServerWebSocketContainer.java @@ -31,7 +31,6 @@ import org.eclipse.jetty.websocket.api.WebSocketContainer; import org.eclipse.jetty.websocket.api.WebSocketSessionListener; 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.server.FrameHandlerFactory; import org.eclipse.jetty.websocket.core.server.WebSocketMappings; @@ -58,7 +57,7 @@ public class ServerWebSocketContainer extends ContainerLifeCycle implements WebS private final FrameHandlerFactory factory; private InvocationType invocationType = InvocationType.BLOCKING; - public ServerWebSocketContainer(WebSocketMappings mappings) + ServerWebSocketContainer(WebSocketMappings mappings) { this.mappings = mappings; this.factory = new ServerFrameHandlerFactory(this, mappings.getWebSocketComponents()); @@ -66,15 +65,10 @@ public ServerWebSocketContainer(WebSocketMappings mappings) addBean(sessionTracker); } - public WebSocketComponents getWebSocketComponents() - { - return mappings.getWebSocketComponents(); - } - @Override public Executor getExecutor() { - return getWebSocketComponents().getExecutor(); + return mappings.getWebSocketComponents().getExecutor(); } @Override diff --git a/jetty-core/jetty-websocket/jetty-websocket-jetty-server/src/main/java/org/eclipse/jetty/websocket/server/WebSocketUpgradeHandler.java b/jetty-core/jetty-websocket/jetty-websocket-jetty-server/src/main/java/org/eclipse/jetty/websocket/server/WebSocketUpgradeHandler.java index d1cc6dbd6ed6..7a1ad5ced9b2 100644 --- a/jetty-core/jetty-websocket/jetty-websocket-jetty-server/src/main/java/org/eclipse/jetty/websocket/server/WebSocketUpgradeHandler.java +++ b/jetty-core/jetty-websocket/jetty-websocket-jetty-server/src/main/java/org/eclipse/jetty/websocket/server/WebSocketUpgradeHandler.java @@ -84,16 +84,20 @@ public class WebSocketUpgradeHandler extends Handler.Wrapper */ public static WebSocketUpgradeHandler from(Server server, ContextHandler context) { - WebSocketUpgradeHandler wsHandler = new WebSocketUpgradeHandler(WebSocketServerComponents.ensureWebSocketComponents(server, context)); - context.getContext().setAttribute(WebSocketContainer.class.getName(), wsHandler.container); + WebSocketComponents components = WebSocketServerComponents.ensureWebSocketComponents(server, context); + 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; } - 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); } @@ -106,14 +110,14 @@ private WebSocketUpgradeHandler(WebSocketComponents components) */ public WebSocketUpgradeHandler configure(Consumer configurator) { - configurator.accept(container); + configurator.accept(_container); return this; } @Override 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 super.handle(request, response, callback); } @@ -125,6 +129,6 @@ public InvocationType getInvocationType() return InvocationType.BLOCKING; Handler handler = getHandler(); InvocationType handlerInvocationType = handler == null ? InvocationType.NON_BLOCKING : handler.getInvocationType(); - return Invocable.combine(handlerInvocationType, container.getInvocationType()); + return Invocable.combine(handlerInvocationType, _container.getInvocationType()); } } diff --git a/jetty-core/jetty-websocket/jetty-websocket-jetty-tests/src/test/java/org/eclipse/jetty/websocket/tests/MaxOutgoingFramesTest.java b/jetty-core/jetty-websocket/jetty-websocket-jetty-tests/src/test/java/org/eclipse/jetty/websocket/tests/MaxOutgoingFramesTest.java index 0e55a17a7930..f274cb02f675 100644 --- a/jetty-core/jetty-websocket/jetty-websocket-jetty-tests/src/test/java/org/eclipse/jetty/websocket/tests/MaxOutgoingFramesTest.java +++ b/jetty-core/jetty-websocket/jetty-websocket-jetty-tests/src/test/java/org/eclipse/jetty/websocket/tests/MaxOutgoingFramesTest.java @@ -27,7 +27,9 @@ import org.eclipse.jetty.websocket.client.WebSocketClient; import org.eclipse.jetty.websocket.core.AbstractExtension; 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.server.WebSocketServerComponents; import org.eclipse.jetty.websocket.server.WebSocketUpgradeHandler; import org.eclipse.jetty.websocket.tests.util.FutureCallback; import org.junit.jupiter.api.AfterEach; @@ -66,7 +68,8 @@ public void start() throws Exception wsHandler.configure(container -> { 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); diff --git a/jetty-ee10/jetty-ee10-bom/pom.xml b/jetty-ee10/jetty-ee10-bom/pom.xml index f1143f9b9d18..40b66a8e20ae 100644 --- a/jetty-ee10/jetty-ee10-bom/pom.xml +++ b/jetty-ee10/jetty-ee10-bom/pom.xml @@ -125,6 +125,11 @@ jetty-ee10-websocket-jakarta-client 12.0.0-SNAPSHOT + + org.eclipse.jetty.ee10.websocket + jetty-ee10-websocket-jakarta-client-webapp + 12.0.0-SNAPSHOT + org.eclipse.jetty.ee10.websocket jetty-ee10-websocket-jakarta-common @@ -137,7 +142,7 @@ org.eclipse.jetty.ee10.websocket - jetty-ee10-websocket-jetty-client + jetty-ee10-websocket-jetty-client-webapp 12.0.0-SNAPSHOT diff --git a/jetty-ee10/jetty-ee10-home/pom.xml b/jetty-ee10/jetty-ee10-home/pom.xml index 3967baaee89b..737483174530 100644 --- a/jetty-ee10/jetty-ee10-home/pom.xml +++ b/jetty-ee10/jetty-ee10-home/pom.xml @@ -428,7 +428,7 @@ org.eclipse.jetty.ee10.websocket - jetty-ee10-websocket-jetty-client + jetty-ee10-websocket-jetty-client-webapp org.eclipse.jetty.ee10.websocket diff --git a/jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jakarta-client-webapp/pom.xml b/jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jakarta-client-webapp/pom.xml new file mode 100644 index 000000000000..f1b8fbef44e6 --- /dev/null +++ b/jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jakarta-client-webapp/pom.xml @@ -0,0 +1,58 @@ + + + + org.eclipse.jetty.ee10.websocket + jetty-ee10-websocket + 12.0.0-SNAPSHOT + + + 4.0.0 + jetty-ee10-websocket-jakarta-client-webapp + EE10 :: Websocket :: Jakarta Client WebApp + + + ${project.groupId}.jakarta.client.webapp + + + + + org.eclipse.jetty.ee10.websocket + jetty-ee10-websocket-jakarta-client + + + jakarta.servlet + jakarta.servlet-api + + + + + + + org.apache.felix + maven-bundle-plugin + true + + + + manifest + + + + jakarta.websocket.client WebApp Implementation + + org.eclipse.jetty.ee10.websocket.jakarta.client.webapp.*;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}" + + + osgi.extender; filter:="(osgi.extender=osgi.serviceloader.registrar)";resolution:=optional + + + osgi.serviceloader;osgi.serviceloader=jakarta.servlet.ServletContainerInitializer + + + + + + + + + diff --git a/jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jakarta-client-webapp/src/main/java/module-info.java b/jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jakarta-client-webapp/src/main/java/module-info.java new file mode 100644 index 000000000000..adfc9280b69a --- /dev/null +++ b/jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jakarta-client-webapp/src/main/java/module-info.java @@ -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; +} diff --git a/jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jakarta-client/src/main/java/org/eclipse/jetty/ee10/websocket/jakarta/client/internal/JakartaWebSocketShutdownContainer.java b/jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jakarta-client-webapp/src/main/java/org/eclipse/jetty/ee10/websocket/jakarta/client/webapp/JakartaWebSocketShutdownContainer.java similarity index 97% rename from jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jakarta-client/src/main/java/org/eclipse/jetty/ee10/websocket/jakarta/client/internal/JakartaWebSocketShutdownContainer.java rename to jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jakarta-client-webapp/src/main/java/org/eclipse/jetty/ee10/websocket/jakarta/client/webapp/JakartaWebSocketShutdownContainer.java index 35ea4797501a..b3c639cac5b4 100644 --- a/jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jakarta-client/src/main/java/org/eclipse/jetty/ee10/websocket/jakarta/client/internal/JakartaWebSocketShutdownContainer.java +++ b/jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jakarta-client-webapp/src/main/java/org/eclipse/jetty/ee10/websocket/jakarta/client/webapp/JakartaWebSocketShutdownContainer.java @@ -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; diff --git a/jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jakarta-client-webapp/src/main/resources/META-INF/services/jakarta.servlet.ServletContainerInitializer b/jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jakarta-client-webapp/src/main/resources/META-INF/services/jakarta.servlet.ServletContainerInitializer new file mode 100644 index 000000000000..00ad6683f26b --- /dev/null +++ b/jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jakarta-client-webapp/src/main/resources/META-INF/services/jakarta.servlet.ServletContainerInitializer @@ -0,0 +1 @@ +org.eclipse.jetty.ee10.websocket.jakarta.client.webapp.JakartaWebSocketShutdownContainer diff --git a/jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jakarta-client/pom.xml b/jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jakarta-client/pom.xml index 74c69ba2f1bc..af76385a1e33 100644 --- a/jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jakarta-client/pom.xml +++ b/jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jakarta-client/pom.xml @@ -38,7 +38,7 @@ jakarta.servlet jakarta.servlet-api - true + test org.eclipse.jetty @@ -78,8 +78,7 @@ osgi.extender; filter:="(osgi.extender=osgi.serviceloader.registrar)";resolution:=optional - osgi.serviceloader;osgi.serviceloader=jakarta.websocket.ContainerProvider, - osgi.serviceloader;osgi.serviceloader=jakarta.servlet.ServletContainerInitializer + osgi.serviceloader;osgi.serviceloader=jakarta.websocket.ContainerProvider diff --git a/jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jakarta-client/src/main/java/module-info.java b/jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jakarta-client/src/main/java/module-info.java index bb8be8a6eaf8..ec694b0e8ead 100644 --- a/jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jakarta-client/src/main/java/module-info.java +++ b/jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jakarta-client/src/main/java/module-info.java @@ -17,13 +17,8 @@ requires transitive org.eclipse.jetty.ee10.websocket.jakarta.common; - requires static jakarta.servlet; - exports org.eclipse.jetty.ee10.websocket.jakarta.client; provides jakarta.websocket.ContainerProvider with org.eclipse.jetty.ee10.websocket.jakarta.client.JakartaWebSocketClientContainerProvider; - - provides jakarta.servlet.ServletContainerInitializer with - org.eclipse.jetty.ee10.websocket.jakarta.client.internal.JakartaWebSocketShutdownContainer; } diff --git a/jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jakarta-client/src/main/resources/META-INF/services/jakarta.servlet.ServletContainerInitializer b/jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jakarta-client/src/main/resources/META-INF/services/jakarta.servlet.ServletContainerInitializer deleted file mode 100644 index b0c738d80d2e..000000000000 --- a/jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jakarta-client/src/main/resources/META-INF/services/jakarta.servlet.ServletContainerInitializer +++ /dev/null @@ -1 +0,0 @@ -org.eclipse.jetty.ee10.websocket.jakarta.client.internal.JakartaWebSocketShutdownContainer diff --git a/jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jakarta-server/src/main/java/org/eclipse/jetty/ee10/websocket/jakarta/server/config/JakartaWebSocketConfiguration.java b/jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jakarta-server/src/main/java/org/eclipse/jetty/ee10/websocket/jakarta/server/config/JakartaWebSocketConfiguration.java index 923ab229fbf4..2ddd6457bb99 100644 --- a/jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jakarta-server/src/main/java/org/eclipse/jetty/ee10/websocket/jakarta/server/config/JakartaWebSocketConfiguration.java +++ b/jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jakarta-server/src/main/java/org/eclipse/jetty/ee10/websocket/jakarta/server/config/JakartaWebSocketConfiguration.java @@ -35,6 +35,6 @@ public JakartaWebSocketConfiguration() .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.client.JakartaWebSocketClientContainerProvider") - .protectAndExpose("org.eclipse.jetty.ee10.websocket.jakarta.client.internal.JakartaWebSocketShutdownContainer")); + .protectAndExpose("org.eclipse.jetty.ee10.websocket.jakarta.client.JakartaWebSocketShutdownContainer")); } } diff --git a/jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jakarta-tests/pom.xml b/jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jakarta-tests/pom.xml index 59325b9af6b6..d6bf4cfab3eb 100644 --- a/jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jakarta-tests/pom.xml +++ b/jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jakarta-tests/pom.xml @@ -23,7 +23,7 @@ org.eclipse.jetty.ee10.websocket - jetty-ee10-websocket-jakarta-client + jetty-ee10-websocket-jakarta-client-webapp org.eclipse.jetty.ee10.websocket diff --git a/jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jakarta-tests/src/test/java/org/eclipse/jetty/ee10/websocket/jakarta/tests/JakartaClientShutdownWithServerWebAppTest.java b/jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jakarta-tests/src/test/java/org/eclipse/jetty/ee10/websocket/jakarta/tests/JakartaClientShutdownWithServerWebAppTest.java index 0a9df6bd8563..499de09000e6 100644 --- a/jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jakarta-tests/src/test/java/org/eclipse/jetty/ee10/websocket/jakarta/tests/JakartaClientShutdownWithServerWebAppTest.java +++ b/jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jakarta-tests/src/test/java/org/eclipse/jetty/ee10/websocket/jakarta/tests/JakartaClientShutdownWithServerWebAppTest.java @@ -27,7 +27,7 @@ import org.eclipse.jetty.client.Response; import org.eclipse.jetty.ee10.webapp.Configuration; 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.server.config.JakartaWebSocketConfiguration; import org.eclipse.jetty.http.BadMessageException; @@ -95,6 +95,7 @@ public WSServer.WebApp createWebSocketWebapp(String contextName) throws Exceptio // Copy over the individual jars required for Jakarta WebSocket. app.createWebInf(); 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(ContainerLifeCycle.class, "jetty-util.jar"); app.copyLib(CoreClientUpgradeRequest.class, "jetty-websocket-core-client.jar"); diff --git a/jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jetty-client/pom.xml b/jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jetty-client-webapp/pom.xml similarity index 86% rename from jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jetty-client/pom.xml rename to jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jetty-client-webapp/pom.xml index 7deebe450822..347d2c5428a2 100644 --- a/jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jetty-client/pom.xml +++ b/jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jetty-client-webapp/pom.xml @@ -7,11 +7,11 @@ 4.0.0 - jetty-ee10-websocket-jetty-client - EE10 :: Websocket :: Jetty Client + jetty-ee10-websocket-jetty-client-webapp + EE10 :: Websocket :: Jetty Client WebApp - ${project.groupId}.client + ${project.groupId}.client.webapp @@ -42,7 +42,6 @@ org.eclipse.jetty.ee10 jetty-ee10-webapp - true diff --git a/jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jetty-client/src/main/config/modules/ee10-websocket-jetty-client.mod b/jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jetty-client-webapp/src/main/config/modules/ee10-websocket-jetty-client-webapp.mod similarity index 85% rename from jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jetty-client/src/main/config/modules/ee10-websocket-jetty-client.mod rename to jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jetty-client-webapp/src/main/config/modules/ee10-websocket-jetty-client-webapp.mod index fbadd5b7a766..8b67a488f864 100644 --- a/jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jetty-client/src/main/config/modules/ee10-websocket-jetty-client.mod +++ b/jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jetty-client-webapp/src/main/config/modules/ee10-websocket-jetty-client-webapp.mod @@ -15,7 +15,7 @@ ee10-annotations websocket-jetty-client [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] # The implementation needs to access method handles in diff --git a/jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jetty-client/src/main/java/module-info.java b/jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jetty-client-webapp/src/main/java/module-info.java similarity index 75% rename from jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jetty-client/src/main/java/module-info.java rename to jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jetty-client-webapp/src/main/java/module-info.java index 2e3c1a1223b9..ab0fbb3a532b 100644 --- a/jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jetty-client/src/main/java/module-info.java +++ b/jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jetty-client-webapp/src/main/java/module-info.java @@ -11,11 +11,15 @@ // ======================================================================== // +import org.eclipse.jetty.ee10.websocket.client.config.JettyWebSocketClientConfiguration; + module org.eclipse.jetty.ee10.websocket.jetty.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; + + provides org.eclipse.jetty.ee10.webapp.Configuration with JettyWebSocketClientConfiguration; } diff --git a/jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jetty-client/src/main/java/org/eclipse/jetty/ee10/websocket/client/config/JettyWebSocketClientConfiguration.java b/jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jetty-client-webapp/src/main/java/org/eclipse/jetty/ee10/websocket/client/config/JettyWebSocketClientConfiguration.java similarity index 100% rename from jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jetty-client/src/main/java/org/eclipse/jetty/ee10/websocket/client/config/JettyWebSocketClientConfiguration.java rename to jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jetty-client-webapp/src/main/java/org/eclipse/jetty/ee10/websocket/client/config/JettyWebSocketClientConfiguration.java diff --git a/jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jetty-client/src/main/resources/META-INF/services/org.eclipse.jetty.ee10.webapp.Configuration b/jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jetty-client-webapp/src/main/resources/META-INF/services/org.eclipse.jetty.ee10.webapp.Configuration similarity index 100% rename from jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jetty-client/src/main/resources/META-INF/services/org.eclipse.jetty.ee10.webapp.Configuration rename to jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jetty-client-webapp/src/main/resources/META-INF/services/org.eclipse.jetty.ee10.webapp.Configuration diff --git a/jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jetty-tests/pom.xml b/jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jetty-tests/pom.xml index 8e32c718a145..92053da9b2b4 100644 --- a/jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jetty-tests/pom.xml +++ b/jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jetty-tests/pom.xml @@ -64,7 +64,7 @@ org.eclipse.jetty.ee10.websocket - jetty-ee10-websocket-jetty-client + jetty-ee10-websocket-jetty-client-webapp test diff --git a/jetty-ee10/jetty-ee10-websocket/pom.xml b/jetty-ee10/jetty-ee10-websocket/pom.xml index e0b87510e458..f7f87a8a70fd 100644 --- a/jetty-ee10/jetty-ee10-websocket/pom.xml +++ b/jetty-ee10/jetty-ee10-websocket/pom.xml @@ -18,10 +18,11 @@ jetty-ee10-websocket-jakarta-client + jetty-ee10-websocket-jakarta-client-webapp jetty-ee10-websocket-jakarta-common jetty-ee10-websocket-jakarta-server jetty-ee10-websocket-jakarta-tests - jetty-ee10-websocket-jetty-client + jetty-ee10-websocket-jetty-client-webapp jetty-ee10-websocket-jetty-server jetty-ee10-websocket-jetty-tests jetty-ee10-websocket-servlet diff --git a/jetty-ee10/pom.xml b/jetty-ee10/pom.xml index f13d9f9b8244..0d98d8b8091a 100644 --- a/jetty-ee10/pom.xml +++ b/jetty-ee10/pom.xml @@ -160,6 +160,11 @@ jetty-ee10-websocket-jakarta-client ${project.version} + + org.eclipse.jetty.ee10.websocket + jetty-ee10-websocket-jakarta-client-webapp + ${project.version} + org.eclipse.jetty.ee10.websocket jetty-ee10-websocket-jakarta-common @@ -172,7 +177,7 @@ org.eclipse.jetty.ee10.websocket - jetty-ee10-websocket-jetty-client + jetty-ee10-websocket-jetty-client-webapp ${project.version} diff --git a/jetty-ee8/jetty-ee8-bom/pom.xml b/jetty-ee8/jetty-ee8-bom/pom.xml index 43d44018415d..b3570a05fe49 100644 --- a/jetty-ee8/jetty-ee8-bom/pom.xml +++ b/jetty-ee8/jetty-ee8-bom/pom.xml @@ -110,6 +110,11 @@ jetty-ee8-websocket-javax-client 12.0.0-SNAPSHOT + + org.eclipse.jetty.ee8.websocket + jetty-ee8-websocket-javax-client-webapp + 12.0.0-SNAPSHOT + org.eclipse.jetty.ee8.websocket jetty-ee8-websocket-javax-common @@ -130,6 +135,11 @@ jetty-ee8-websocket-jetty-client 12.0.0-SNAPSHOT + + org.eclipse.jetty.ee8.websocket + jetty-ee8-websocket-jetty-client-webapp + 12.0.0-SNAPSHOT + org.eclipse.jetty.ee8.websocket jetty-ee8-websocket-jetty-common diff --git a/jetty-ee8/jetty-ee8-home/pom.xml b/jetty-ee8/jetty-ee8-home/pom.xml index d5d0dc9a5495..9f6a3c1ae172 100644 --- a/jetty-ee8/jetty-ee8-home/pom.xml +++ b/jetty-ee8/jetty-ee8-home/pom.xml @@ -384,6 +384,10 @@ org.eclipse.jetty.ee8.websocket jetty-ee8-websocket-jetty-client + + org.eclipse.jetty.ee8.websocket + jetty-ee8-websocket-jetty-client-webapp + org.eclipse.jetty.ee8.websocket jetty-ee8-websocket-javax-server diff --git a/jetty-ee8/jetty-ee8-websocket/jetty-ee8-websocket-javax-client-webapp/pom.xml b/jetty-ee8/jetty-ee8-websocket/jetty-ee8-websocket-javax-client-webapp/pom.xml new file mode 100644 index 000000000000..10efa8a5c356 --- /dev/null +++ b/jetty-ee8/jetty-ee8-websocket/jetty-ee8-websocket-javax-client-webapp/pom.xml @@ -0,0 +1,53 @@ + + + + org.eclipse.jetty.ee8.websocket + jetty-ee8-websocket + 12.0.0-SNAPSHOT + ../pom.xml + + + 4.0.0 + jetty-ee8-websocket-javax-client-webapp + EE8 :: Websocket :: Javax Client Webapp + + + jetty-ee9-websocket/jetty-ee9-websocket-jakarta-client-webapp + ${project.groupId}.javax.client.webapp + + + + + org.eclipse.jetty.ee8.websocket + jetty-ee8-websocket-javax-client + + + org.eclipse.jetty.toolchain + jetty-servlet-api + + + + + + + org.apache.felix + maven-bundle-plugin + true + + + javax.websocket.client WebApp Implementation + + org.eclipse.jetty.ee8.websocket.javax.client.webapp.*;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}" + + + osgi.extender; filter:="(osgi.extender=osgi.serviceloader.registrar)";resolution:=optional + + + osgi.serviceloader;osgi.serviceloader=javax.servlet.ServletContainerInitializer + + + + + + + diff --git a/jetty-ee8/jetty-ee8-websocket/jetty-ee8-websocket-javax-client/pom.xml b/jetty-ee8/jetty-ee8-websocket/jetty-ee8-websocket-javax-client/pom.xml index 45a72800bf48..c2d33750a3d8 100644 --- a/jetty-ee8/jetty-ee8-websocket/jetty-ee8-websocket-javax-client/pom.xml +++ b/jetty-ee8/jetty-ee8-websocket/jetty-ee8-websocket-javax-client/pom.xml @@ -36,7 +36,7 @@ org.eclipse.jetty.toolchain jetty-servlet-api - true + test org.eclipse.jetty @@ -63,16 +63,15 @@ true - jakarta.websocket.client Implementation + javax.websocket.client Implementation - 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}" osgi.extender; filter:="(osgi.extender=osgi.serviceloader.registrar)";resolution:=optional - osgi.serviceloader;osgi.serviceloader=jakarta.websocket.ContainerProvider, - osgi.serviceloader;osgi.serviceloader=jakarta.servlet.ServletContainerInitializer + osgi.serviceloader;osgi.serviceloader=javax.websocket.ContainerProvider diff --git a/jetty-ee8/jetty-ee8-websocket/jetty-ee8-websocket-javax-server/pom.xml b/jetty-ee8/jetty-ee8-websocket/jetty-ee8-websocket-javax-server/pom.xml index 29b89a9ee7f4..ad27c1535226 100644 --- a/jetty-ee8/jetty-ee8-websocket/jetty-ee8-websocket-javax-server/pom.xml +++ b/jetty-ee8/jetty-ee8-websocket/jetty-ee8-websocket-javax-server/pom.xml @@ -49,7 +49,7 @@ maven-surefire-plugin - @{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 @@ -59,13 +59,13 @@ true - jakarta.websocket.server Implementation + javax.websocket.server Implementation - 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}" osgi.extender; filter:="(osgi.extender=osgi.serviceloader.registrar)";resolution:=optional - 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 diff --git a/jetty-ee8/jetty-ee8-websocket/jetty-ee8-websocket-javax-tests/pom.xml b/jetty-ee8/jetty-ee8-websocket/jetty-ee8-websocket-javax-tests/pom.xml index 88336f905da4..f1cb5c96ba2b 100644 --- a/jetty-ee8/jetty-ee8-websocket/jetty-ee8-websocket-javax-tests/pom.xml +++ b/jetty-ee8/jetty-ee8-websocket/jetty-ee8-websocket-javax-tests/pom.xml @@ -25,7 +25,7 @@ org.eclipse.jetty.ee8.websocket - jetty-ee8-websocket-javax-client + jetty-ee8-websocket-javax-client-webapp org.eclipse.jetty.ee8.websocket diff --git a/jetty-ee8/jetty-ee8-websocket/jetty-ee8-websocket-jetty-client-webapp/pom.xml b/jetty-ee8/jetty-ee8-websocket/jetty-ee8-websocket-jetty-client-webapp/pom.xml new file mode 100644 index 000000000000..9394c1cbfcc2 --- /dev/null +++ b/jetty-ee8/jetty-ee8-websocket/jetty-ee8-websocket-jetty-client-webapp/pom.xml @@ -0,0 +1,49 @@ + + + + org.eclipse.jetty.ee8.websocket + jetty-ee8-websocket + 12.0.0-SNAPSHOT + + + 4.0.0 + jetty-ee8-websocket-jetty-client-webapp + EE8 :: Websocket :: Jetty Client WebApp + + + jetty-ee9-websocket/jetty-ee9-websocket-jetty-client-webapp + ${project.groupId}.client.webapp + + + + + + org.apache.felix + maven-bundle-plugin + true + + + + osgi.extender; filter:="(osgi.extender=osgi.serviceloader.registrar)" + + + osgi.serviceloader; osgi.serviceloader=org.eclipse.jetty.ee8.webapp.Configuration + + + + + + + + + + org.eclipse.jetty.ee8.websocket + jetty-ee8-websocket-jetty-client + + + org.eclipse.jetty.ee8 + jetty-ee8-webapp + + + + diff --git a/jetty-ee8/jetty-ee8-websocket/jetty-ee8-websocket-jetty-client-webapp/src/main/config/modules/ee8-websocket-jetty-client-webapp.mod b/jetty-ee8/jetty-ee8-websocket/jetty-ee8-websocket-jetty-client-webapp/src/main/config/modules/ee8-websocket-jetty-client-webapp.mod new file mode 100644 index 000000000000..5834191f5ec2 --- /dev/null +++ b/jetty-ee8/jetty-ee8-websocket/jetty-ee8-websocket-jetty-client-webapp/src/main/config/modules/ee8-websocket-jetty-client-webapp.mod @@ -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 diff --git a/jetty-ee8/jetty-ee8-websocket/jetty-ee8-websocket-jetty-client/pom.xml b/jetty-ee8/jetty-ee8-websocket/jetty-ee8-websocket-jetty-client/pom.xml index 6c3a41e7dd64..29f8d5cfc349 100644 --- a/jetty-ee8/jetty-ee8-websocket/jetty-ee8-websocket-jetty-client/pom.xml +++ b/jetty-ee8/jetty-ee8-websocket/jetty-ee8-websocket-jetty-client/pom.xml @@ -52,15 +52,15 @@ org.eclipse.jetty jetty-client - - org.eclipse.jetty.ee8 - jetty-ee8-webapp - true - org.slf4j slf4j-api + + org.eclipse.jetty.ee8 + jetty-ee8-webapp + test + org.eclipse.jetty jetty-slf4j-impl diff --git a/jetty-ee8/jetty-ee8-websocket/jetty-ee8-websocket-jetty-tests/pom.xml b/jetty-ee8/jetty-ee8-websocket/jetty-ee8-websocket-jetty-tests/pom.xml index 1dcb994d2d7b..b5db35961752 100644 --- a/jetty-ee8/jetty-ee8-websocket/jetty-ee8-websocket-jetty-tests/pom.xml +++ b/jetty-ee8/jetty-ee8-websocket/jetty-ee8-websocket-jetty-tests/pom.xml @@ -30,7 +30,7 @@ org.eclipse.jetty.ee8.websocket - jetty-ee8-websocket-jetty-client + jetty-ee8-websocket-jetty-client-webapp test diff --git a/jetty-ee8/jetty-ee8-websocket/pom.xml b/jetty-ee8/jetty-ee8-websocket/pom.xml index b47df241977a..34aa52dec98a 100644 --- a/jetty-ee8/jetty-ee8-websocket/pom.xml +++ b/jetty-ee8/jetty-ee8-websocket/pom.xml @@ -22,9 +22,11 @@ jetty-ee8-websocket-jetty-api jetty-ee8-websocket-jetty-common jetty-ee8-websocket-javax-client + jetty-ee8-websocket-javax-client-webapp jetty-ee8-websocket-servlet jetty-ee8-websocket-javax-server jetty-ee8-websocket-jetty-client + jetty-ee8-websocket-jetty-client-webapp jetty-ee8-websocket-jetty-server jetty-ee8-websocket-javax-tests jetty-ee8-websocket-jetty-tests diff --git a/jetty-ee8/pom.xml b/jetty-ee8/pom.xml index b3bec31dbe5c..c18a9009e807 100644 --- a/jetty-ee8/pom.xml +++ b/jetty-ee8/pom.xml @@ -331,6 +331,11 @@ jetty-ee8-websocket-javax-client ${project.version} + + org.eclipse.jetty.ee8.websocket + jetty-ee8-websocket-javax-client-webapp + ${project.version} + org.eclipse.jetty.ee8.websocket jetty-ee8-websocket-servlet @@ -351,6 +356,11 @@ jetty-ee8-websocket-jetty-client ${project.version} + + org.eclipse.jetty.ee8.websocket + jetty-ee8-websocket-jetty-client-webapp + ${project.version} + org.eclipse.jetty.ee8.websocket jetty-ee8-websocket-jetty-server diff --git a/jetty-ee9/jetty-ee9-bom/pom.xml b/jetty-ee9/jetty-ee9-bom/pom.xml index c5f79418f252..73a2d583bfc0 100644 --- a/jetty-ee9/jetty-ee9-bom/pom.xml +++ b/jetty-ee9/jetty-ee9-bom/pom.xml @@ -140,6 +140,11 @@ jetty-ee9-websocket-jakarta-client 12.0.0-SNAPSHOT + + org.eclipse.jetty.ee9.websocket + jetty-ee9-websocket-jakarta-client-webapp + 12.0.0-SNAPSHOT + org.eclipse.jetty.ee9.websocket jetty-ee9-websocket-jakarta-common @@ -160,6 +165,11 @@ jetty-ee9-websocket-jetty-client 12.0.0-SNAPSHOT + + org.eclipse.jetty.ee9.websocket + jetty-ee9-websocket-jetty-client-webapp + 12.0.0-SNAPSHOT + org.eclipse.jetty.ee9.websocket jetty-ee9-websocket-jetty-common diff --git a/jetty-ee9/jetty-ee9-home/pom.xml b/jetty-ee9/jetty-ee9-home/pom.xml index d3892f29b88e..7f1c8f024ee0 100644 --- a/jetty-ee9/jetty-ee9-home/pom.xml +++ b/jetty-ee9/jetty-ee9-home/pom.xml @@ -434,6 +434,10 @@ org.eclipse.jetty.ee9.websocket jetty-ee9-websocket-jetty-client + + org.eclipse.jetty.ee9.websocket + jetty-ee9-websocket-jetty-client-webapp + org.eclipse.jetty.ee9.websocket jetty-ee9-websocket-jakarta-server diff --git a/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jakarta-client-webapp/pom.xml b/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jakarta-client-webapp/pom.xml new file mode 100644 index 000000000000..4495a340c3c3 --- /dev/null +++ b/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jakarta-client-webapp/pom.xml @@ -0,0 +1,52 @@ + + + + org.eclipse.jetty.ee9.websocket + jetty-ee9-websocket + 12.0.0-SNAPSHOT + ../pom.xml + + + 4.0.0 + jetty-ee9-websocket-jakarta-client-webapp + EE9 :: Websocket :: Jakarta Client Webapp + + + ${project.groupId}.jakarta.client.webapp + + + + + org.eclipse.jetty.ee9.websocket + jetty-ee9-websocket-jakarta-client + + + org.eclipse.jetty.toolchain + jetty-jakarta-servlet-api + + + + + + + org.apache.felix + maven-bundle-plugin + true + + + jakarta.websocket.client WebApp Implementation + + org.eclipse.jetty.ee9.websocket.jakarta.client.webapp.*;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}" + + + osgi.extender; filter:="(osgi.extender=osgi.serviceloader.registrar)";resolution:=optional + + + osgi.serviceloader;osgi.serviceloader=jakarta.servlet.ServletContainerInitializer + + + + + + + diff --git a/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jakarta-client-webapp/src/main/java/module-info.java b/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jakarta-client-webapp/src/main/java/module-info.java new file mode 100644 index 000000000000..b0a7a0ad7907 --- /dev/null +++ b/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jakarta-client-webapp/src/main/java/module-info.java @@ -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; +} diff --git a/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jakarta-client/src/main/java/org/eclipse/jetty/ee9/websocket/jakarta/client/internal/JakartaWebSocketShutdownContainer.java b/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jakarta-client-webapp/src/main/java/org/eclipse/jetty/ee9/websocket/jakarta/client/webapp/JakartaWebSocketShutdownContainer.java similarity index 97% rename from jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jakarta-client/src/main/java/org/eclipse/jetty/ee9/websocket/jakarta/client/internal/JakartaWebSocketShutdownContainer.java rename to jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jakarta-client-webapp/src/main/java/org/eclipse/jetty/ee9/websocket/jakarta/client/webapp/JakartaWebSocketShutdownContainer.java index 7c09ebfbc45f..1a1359268ab6 100644 --- a/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jakarta-client/src/main/java/org/eclipse/jetty/ee9/websocket/jakarta/client/internal/JakartaWebSocketShutdownContainer.java +++ b/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jakarta-client-webapp/src/main/java/org/eclipse/jetty/ee9/websocket/jakarta/client/webapp/JakartaWebSocketShutdownContainer.java @@ -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; diff --git a/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jakarta-client-webapp/src/main/resources/META-INF/services/jakarta.servlet.ServletContainerInitializer b/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jakarta-client-webapp/src/main/resources/META-INF/services/jakarta.servlet.ServletContainerInitializer new file mode 100644 index 000000000000..83a5d44ba660 --- /dev/null +++ b/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jakarta-client-webapp/src/main/resources/META-INF/services/jakarta.servlet.ServletContainerInitializer @@ -0,0 +1 @@ +org.eclipse.jetty.ee9.websocket.jakarta.client.webapp.JakartaWebSocketShutdownContainer \ No newline at end of file diff --git a/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jakarta-client/pom.xml b/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jakarta-client/pom.xml index ff0b4cadd840..1c3ab851ebb3 100644 --- a/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jakarta-client/pom.xml +++ b/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jakarta-client/pom.xml @@ -35,7 +35,7 @@ org.eclipse.jetty.toolchain jetty-jakarta-servlet-api - true + test org.eclipse.jetty @@ -70,8 +70,7 @@ osgi.extender; filter:="(osgi.extender=osgi.serviceloader.registrar)";resolution:=optional - osgi.serviceloader;osgi.serviceloader=jakarta.websocket.ContainerProvider, - osgi.serviceloader;osgi.serviceloader=jakarta.servlet.ServletContainerInitializer + osgi.serviceloader;osgi.serviceloader=jakarta.websocket.ContainerProvider diff --git a/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jakarta-client/src/main/java/module-info.java b/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jakarta-client/src/main/java/module-info.java index 9d6074fb198b..6fdbe73ab92d 100644 --- a/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jakarta-client/src/main/java/module-info.java +++ b/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jakarta-client/src/main/java/module-info.java @@ -17,13 +17,8 @@ requires transitive org.eclipse.jetty.ee9.websocket.jakarta.common; - requires static jetty.servlet.api; - exports org.eclipse.jetty.ee9.websocket.jakarta.client; provides jakarta.websocket.ContainerProvider with org.eclipse.jetty.ee9.websocket.jakarta.client.JakartaWebSocketClientContainerProvider; - - provides jakarta.servlet.ServletContainerInitializer with - org.eclipse.jetty.ee9.websocket.jakarta.client.internal.JakartaWebSocketShutdownContainer; } diff --git a/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jakarta-client/src/main/resources/META-INF/services/jakarta.servlet.ServletContainerInitializer b/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jakarta-client/src/main/resources/META-INF/services/jakarta.servlet.ServletContainerInitializer deleted file mode 100644 index f62648cbb8d5..000000000000 --- a/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jakarta-client/src/main/resources/META-INF/services/jakarta.servlet.ServletContainerInitializer +++ /dev/null @@ -1 +0,0 @@ -org.eclipse.jetty.ee9.websocket.jakarta.client.internal.JakartaWebSocketShutdownContainer \ No newline at end of file diff --git a/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jakarta-server/src/main/java/org/eclipse/jetty/ee9/websocket/jakarta/server/config/JakartaWebSocketConfiguration.java b/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jakarta-server/src/main/java/org/eclipse/jetty/ee9/websocket/jakarta/server/config/JakartaWebSocketConfiguration.java index d8ae0d6eee59..19439d61b26f 100644 --- a/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jakarta-server/src/main/java/org/eclipse/jetty/ee9/websocket/jakarta/server/config/JakartaWebSocketConfiguration.java +++ b/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jakarta-server/src/main/java/org/eclipse/jetty/ee9/websocket/jakarta/server/config/JakartaWebSocketConfiguration.java @@ -35,6 +35,6 @@ public JakartaWebSocketConfiguration() 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.client.JakartaWebSocketClientContainerProvider"); - protectAndExpose("org.eclipse.jetty.ee9.websocket.jakarta.client.internal.JakartaWebSocketShutdownContainer"); + protectAndExpose("org.eclipse.jetty.ee9.websocket.jakarta.client.JakartaWebSocketShutdownContainer"); } } diff --git a/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jakarta-tests/pom.xml b/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jakarta-tests/pom.xml index 3309bcae0f86..28190f8aa6cf 100644 --- a/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jakarta-tests/pom.xml +++ b/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jakarta-tests/pom.xml @@ -24,7 +24,7 @@ org.eclipse.jetty.ee9.websocket - jetty-ee9-websocket-jakarta-client + jetty-ee9-websocket-jakarta-client-webapp org.eclipse.jetty.ee9.websocket diff --git a/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jakarta-tests/src/test/java/org/eclipse/jetty/ee9/websocket/jakarta/tests/JakartaClientShutdownWithServerWebAppTest.java b/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jakarta-tests/src/test/java/org/eclipse/jetty/ee9/websocket/jakarta/tests/JakartaClientShutdownWithServerWebAppTest.java index a808e14258b3..1295bc3b7958 100644 --- a/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jakarta-tests/src/test/java/org/eclipse/jetty/ee9/websocket/jakarta/tests/JakartaClientShutdownWithServerWebAppTest.java +++ b/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jakarta-tests/src/test/java/org/eclipse/jetty/ee9/websocket/jakarta/tests/JakartaClientShutdownWithServerWebAppTest.java @@ -28,7 +28,7 @@ import org.eclipse.jetty.ee9.webapp.Configuration; import org.eclipse.jetty.ee9.webapp.Configurations; 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.server.config.JakartaWebSocketConfiguration; import org.eclipse.jetty.http.BadMessageException; @@ -94,6 +94,7 @@ public WSServer.WebApp createWebSocketWebapp(String contextName) throws Exceptio // Copy over the individual jars required for Jakarta WebSocket. app.createWebInf(); 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(ContainerLifeCycle.class, "jetty-util.jar"); app.copyLib(CoreClientUpgradeRequest.class, "jetty-websocket-core-client.jar"); diff --git a/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jetty-client-webapp/pom.xml b/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jetty-client-webapp/pom.xml new file mode 100644 index 000000000000..4da76347b6f0 --- /dev/null +++ b/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jetty-client-webapp/pom.xml @@ -0,0 +1,48 @@ + + + + org.eclipse.jetty.ee9.websocket + jetty-ee9-websocket + 12.0.0-SNAPSHOT + + + 4.0.0 + jetty-ee9-websocket-jetty-client-webapp + EE9 :: Websocket :: Jetty Client WebApp + + + ${project.groupId}.client.webapp + + + + + + org.apache.felix + maven-bundle-plugin + true + + + + osgi.extender; filter:="(osgi.extender=osgi.serviceloader.registrar)" + + + osgi.serviceloader; osgi.serviceloader=org.eclipse.jetty.ee9.webapp.Configuration + + + + + + + + + + org.eclipse.jetty.ee9.websocket + jetty-ee9-websocket-jetty-client + + + org.eclipse.jetty.ee9 + jetty-ee9-webapp + + + + diff --git a/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jetty-client/src/main/config/modules/ee9-websocket-jetty-client.mod b/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jetty-client-webapp/src/main/config/modules/ee9-websocket-jetty-client-webapp.mod similarity index 90% rename from jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jetty-client/src/main/config/modules/ee9-websocket-jetty-client.mod rename to jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jetty-client-webapp/src/main/config/modules/ee9-websocket-jetty-client-webapp.mod index f23c99567800..fce753cdf915 100644 --- a/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jetty-client/src/main/config/modules/ee9-websocket-jetty-client.mod +++ b/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jetty-client-webapp/src/main/config/modules/ee9-websocket-jetty-client-webapp.mod @@ -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-common-${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] # The implementation needs to access method handles in diff --git a/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jetty-client-webapp/src/main/java/module-info.java b/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jetty-client-webapp/src/main/java/module-info.java new file mode 100644 index 000000000000..dfb73fa6721e --- /dev/null +++ b/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jetty-client-webapp/src/main/java/module-info.java @@ -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; +} diff --git a/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jetty-client/src/main/java/org/eclipse/jetty/ee9/websocket/client/config/JettyWebSocketClientConfiguration.java b/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jetty-client-webapp/src/main/java/org/eclipse/jetty/ee9/websocket/client/config/JettyWebSocketClientConfiguration.java similarity index 100% rename from jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jetty-client/src/main/java/org/eclipse/jetty/ee9/websocket/client/config/JettyWebSocketClientConfiguration.java rename to jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jetty-client-webapp/src/main/java/org/eclipse/jetty/ee9/websocket/client/config/JettyWebSocketClientConfiguration.java diff --git a/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jetty-client/src/main/resources/META-INF/services/org.eclipse.jetty.ee9.webapp.Configuration b/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jetty-client-webapp/src/main/resources/META-INF/services/org.eclipse.jetty.ee9.webapp.Configuration similarity index 100% rename from jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jetty-client/src/main/resources/META-INF/services/org.eclipse.jetty.ee9.webapp.Configuration rename to jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jetty-client-webapp/src/main/resources/META-INF/services/org.eclipse.jetty.ee9.webapp.Configuration diff --git a/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jetty-client/pom.xml b/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jetty-client/pom.xml index 55bd0dd8d9f1..f1d115bc2675 100644 --- a/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jetty-client/pom.xml +++ b/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jetty-client/pom.xml @@ -14,26 +14,6 @@ ${project.groupId}.client - - - - org.apache.felix - maven-bundle-plugin - true - - - - osgi.extender; filter:="(osgi.extender=osgi.serviceloader.registrar)" - - - osgi.serviceloader; osgi.serviceloader=org.eclipse.jetty.ee9.webapp.Configuration - - - - - - - org.eclipse.jetty.ee9.websocket @@ -51,15 +31,15 @@ org.eclipse.jetty jetty-client - - org.eclipse.jetty.ee9 - jetty-ee9-webapp - true - org.slf4j slf4j-api + + org.eclipse.jetty.ee9 + jetty-ee9-webapp + test + org.eclipse.jetty jetty-slf4j-impl diff --git a/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jetty-client/src/main/java/module-info.java b/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jetty-client/src/main/java/module-info.java index bdc36b26c550..87e64b8090dc 100644 --- a/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jetty-client/src/main/java/module-info.java +++ b/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jetty-client/src/main/java/module-info.java @@ -20,7 +20,5 @@ requires transitive org.eclipse.jetty.client; requires transitive org.eclipse.jetty.ee9.websocket.jetty.api; - requires static org.eclipse.jetty.ee9.webapp; - exports org.eclipse.jetty.ee9.websocket.client; } diff --git a/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jetty-tests/pom.xml b/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jetty-tests/pom.xml index 831443fa37b2..b93e610cca1a 100644 --- a/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jetty-tests/pom.xml +++ b/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jetty-tests/pom.xml @@ -29,7 +29,7 @@ org.eclipse.jetty.ee9.websocket - jetty-ee9-websocket-jetty-client + jetty-ee9-websocket-jetty-client-webapp test diff --git a/jetty-ee9/jetty-ee9-websocket/pom.xml b/jetty-ee9/jetty-ee9-websocket/pom.xml index db884130e283..8b824f68bf3c 100644 --- a/jetty-ee9/jetty-ee9-websocket/pom.xml +++ b/jetty-ee9/jetty-ee9-websocket/pom.xml @@ -20,11 +20,13 @@ jetty-ee9-websocket-jakarta-common jetty-ee9-websocket-jakarta-client + jetty-ee9-websocket-jakarta-client-webapp jetty-ee9-websocket-jakarta-server jetty-ee9-websocket-jakarta-tests jetty-ee9-websocket-jetty-api jetty-ee9-websocket-jetty-common jetty-ee9-websocket-jetty-client + jetty-ee9-websocket-jetty-client-webapp jetty-ee9-websocket-jetty-server jetty-ee9-websocket-jetty-tests jetty-ee9-websocket-servlet diff --git a/jetty-ee9/pom.xml b/jetty-ee9/pom.xml index 5803f56ad0ab..fd7fbbf5c00d 100644 --- a/jetty-ee9/pom.xml +++ b/jetty-ee9/pom.xml @@ -173,6 +173,11 @@ jetty-ee9-websocket-jakarta-client ${project.version} + + org.eclipse.jetty.ee9.websocket + jetty-ee9-websocket-jakarta-client-webapp + ${project.version} + org.eclipse.jetty.ee9.websocket jetty-ee9-websocket-jakarta-common @@ -193,6 +198,11 @@ jetty-ee9-websocket-jetty-client ${project.version} + + org.eclipse.jetty.ee9.websocket + jetty-ee9-websocket-jetty-client-webapp + ${project.version} + org.eclipse.jetty.ee9.websocket jetty-ee9-websocket-jetty-common diff --git a/tests/test-distribution/test-distribution-common/src/test/java/org/eclipse/jetty/tests/distribution/DistributionTests.java b/tests/test-distribution/test-distribution-common/src/test/java/org/eclipse/jetty/tests/distribution/DistributionTests.java index 67e9fb0113c8..582609f26d9f 100644 --- a/tests/test-distribution/test-distribution-common/src/test/java/org/eclipse/jetty/tests/distribution/DistributionTests.java +++ b/tests/test-distribution/test-distribution-common/src/test/java/org/eclipse/jetty/tests/distribution/DistributionTests.java @@ -348,8 +348,8 @@ public void testLog4j2ModuleWithSimpleWebAppWithJSP(String env) throws Exception } @ParameterizedTest - @CsvSource({"http,ee9", "https,ee9", "http,ee10", "https,ee10"}) - public void testWebsocketClientInWebappProvidedByServer(String scheme, String env) throws Exception + @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, String jpms) throws Exception { Path jettyBase = newTestJettyBaseDirectory(); String jettyVersion = System.getProperty("jettyVersion"); @@ -367,7 +367,7 @@ public void testWebsocketClientInWebappProvidedByServer(String scheme, String en toEnvironment("websocket-jakarta", env), toEnvironment("deploy", 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)) { @@ -378,7 +378,11 @@ public void testWebsocketClientInWebappProvidedByServer(String scheme, String en distribution.installWarFile(webApp, "test"); int port = distribution.freePort(); - try (JettyHomeTester.Run run2 = distribution.start(ssl ? "jetty.ssl.port=" + port : "jetty.http.port=" + port)) + List 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)); @@ -395,8 +399,8 @@ public void testWebsocketClientInWebappProvidedByServer(String scheme, String en } @ParameterizedTest - @CsvSource({"http,ee9", "https,ee9", "http,ee10", "https,ee10"}) - public void testWebsocketClientInWebapp(String scheme, String env) throws Exception + @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, String jpms) throws Exception { Path jettyBase = newTestJettyBaseDirectory(); String jettyVersion = System.getProperty("jettyVersion"); @@ -424,7 +428,11 @@ public void testWebsocketClientInWebapp(String scheme, String env) throws Except distribution.installWarFile(webApp, "test"); int port = distribution.freePort(); - try (JettyHomeTester.Run run2 = distribution.start(ssl ? "jetty.ssl.port=" + port : "jetty.http.port=" + port)) + List 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));