Skip to content

Commit

Permalink
Merge pull request #9981 from eclipse/jetty-12.0.x-9396-websocket-cli…
Browse files Browse the repository at this point in the history
…ent-webapp

Split websocket client modules for webapp configuration.
  • Loading branch information
lachlan-roberts authored Jun 30, 2023
2 parents 2d17473 + e1b0d01 commit 9036777
Show file tree
Hide file tree
Showing 52 changed files with 474 additions and 104 deletions.
7 changes: 6 additions & 1 deletion jetty-ee10/jetty-ee10-bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,11 @@
<artifactId>jetty-ee10-websocket-jakarta-client</artifactId>
<version>12.0.0-SNAPSHOT</version>
</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>
<groupId>org.eclipse.jetty.ee10.websocket</groupId>
<artifactId>jetty-ee10-websocket-jakarta-common</artifactId>
Expand All @@ -137,7 +142,7 @@
</dependency>
<dependency>
<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>
</dependency>
<dependency>
Expand Down
2 changes: 1 addition & 1 deletion jetty-ee10/jetty-ee10-home/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@
</dependency>
<dependency>
<groupId>org.eclipse.jetty.ee10.websocket</groupId>
<artifactId>jetty-ee10-websocket-jetty-client</artifactId>
<artifactId>jetty-ee10-websocket-jetty-client-webapp</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.ee10.websocket</groupId>
Expand Down
Original file line number Diff line number Diff line change
@@ -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>
Original file line number Diff line number Diff line change
@@ -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;
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
// ========================================================================
//

package org.eclipse.jetty.ee9.websocket.jakarta.client;
package org.eclipse.jetty.ee10.websocket.jakarta.client.webapp;

import java.util.Set;

Expand All @@ -20,6 +20,7 @@
import jakarta.servlet.ServletContextEvent;
import jakarta.servlet.ServletContextListener;
import jakarta.servlet.ServletException;
import org.eclipse.jetty.ee10.websocket.jakarta.client.JakartaWebSocketClientContainer;
import org.eclipse.jetty.util.component.ContainerLifeCycle;
import org.eclipse.jetty.util.component.LifeCycle;
import org.slf4j.Logger;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
org.eclipse.jetty.ee10.websocket.jakarta.client.webapp.JakartaWebSocketShutdownContainer
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<dependency>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<optional>true</optional>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
Expand Down Expand Up @@ -78,8 +78,7 @@
osgi.extender; filter:="(osgi.extender=osgi.serviceloader.registrar)";resolution:=optional
</Require-Capability>
<Provide-Capability>
osgi.serviceloader;osgi.serviceloader=jakarta.websocket.ContainerProvider,
osgi.serviceloader;osgi.serviceloader=jakarta.servlet.ServletContainerInitializer
osgi.serviceloader;osgi.serviceloader=jakarta.websocket.ContainerProvider
</Provide-Capability>
</instructions>
</configuration>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,8 @@

requires transitive org.eclipse.jetty.ee10.websocket.jakarta.common;

requires static transitive 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.JakartaWebSocketShutdownContainer;
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
</dependency>
<dependency>
<groupId>org.eclipse.jetty.ee10.websocket</groupId>
<artifactId>jetty-ee10-websocket-jakarta-client</artifactId>
<artifactId>jetty-ee10-websocket-jakarta-client-webapp</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.ee10.websocket</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.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;
Expand Down Expand Up @@ -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");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
</parent>

<modelVersion>4.0.0</modelVersion>
<artifactId>jetty-ee10-websocket-jetty-client</artifactId>
<name>EE10 :: Websocket :: Jetty Client</name>
<artifactId>jetty-ee10-websocket-jetty-client-webapp</artifactId>
<name>EE10 :: Websocket :: Jetty Client WebApp</name>

<properties>
<bundle-symbolic-name>${project.groupId}.client</bundle-symbolic-name>
<bundle-symbolic-name>${project.groupId}.client.webapp</bundle-symbolic-name>
</properties>

<build>
Expand Down Expand Up @@ -42,7 +42,6 @@
<dependency>
<groupId>org.eclipse.jetty.ee10</groupId>
<artifactId>jetty-ee10-webapp</artifactId>
<optional>true</optional>
</dependency>
</dependencies>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
{
requires org.eclipse.jetty.websocket.client;

requires static transitive org.eclipse.jetty.ee10.webapp;
requires transitive org.eclipse.jetty.ee10.webapp;

exports org.eclipse.jetty.ee10.websocket.client.config;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
</dependency>
<dependency>
<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>
</dependency>
<dependency>
Expand Down
3 changes: 2 additions & 1 deletion jetty-ee10/jetty-ee10-websocket/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@

<modules>
<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-server</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-tests</module>
<module>jetty-ee10-websocket-servlet</module>
Expand Down
7 changes: 6 additions & 1 deletion jetty-ee10/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,11 @@
<artifactId>jetty-ee10-websocket-jakarta-client</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.ee10.websocket</groupId>
<artifactId>jetty-ee10-websocket-jakarta-client-webapp</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.ee10.websocket</groupId>
<artifactId>jetty-ee10-websocket-jakarta-common</artifactId>
Expand All @@ -172,7 +177,7 @@
</dependency>
<dependency>
<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>
</dependency>
<dependency>
Expand Down
10 changes: 10 additions & 0 deletions jetty-ee8/jetty-ee8-bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,11 @@
<artifactId>jetty-ee8-websocket-javax-client</artifactId>
<version>12.0.0-SNAPSHOT</version>
</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>
<groupId>org.eclipse.jetty.ee8.websocket</groupId>
<artifactId>jetty-ee8-websocket-javax-common</artifactId>
Expand All @@ -130,6 +135,11 @@
<artifactId>jetty-ee8-websocket-jetty-client</artifactId>
<version>12.0.0-SNAPSHOT</version>
</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>
<groupId>org.eclipse.jetty.ee8.websocket</groupId>
<artifactId>jetty-ee8-websocket-jetty-common</artifactId>
Expand Down
4 changes: 4 additions & 0 deletions jetty-ee8/jetty-ee8-home/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,10 @@
<groupId>org.eclipse.jetty.ee8.websocket</groupId>
<artifactId>jetty-ee8-websocket-jetty-client</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.ee8.websocket</groupId>
<artifactId>jetty-ee8-websocket-jetty-client-webapp</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.ee8.websocket</groupId>
<artifactId>jetty-ee8-websocket-javax-server</artifactId>
Expand Down
Original file line number Diff line number Diff line change
@@ -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>
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<dependency>
<groupId>org.eclipse.jetty.toolchain</groupId>
<artifactId>jetty-servlet-api</artifactId>
<optional>true</optional>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
Expand All @@ -63,16 +63,15 @@
<extensions>true</extensions>
<configuration>
<instructions>
<Bundle-Description>jakarta.websocket.client Implementation</Bundle-Description>
<Bundle-Description>javax.websocket.client Implementation</Bundle-Description>
<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>
<Require-Capability>
osgi.extender; filter:="(osgi.extender=osgi.serviceloader.registrar)";resolution:=optional
</Require-Capability>
<Provide-Capability>
osgi.serviceloader;osgi.serviceloader=jakarta.websocket.ContainerProvider,
osgi.serviceloader;osgi.serviceloader=jakarta.servlet.ServletContainerInitializer
osgi.serviceloader;osgi.serviceloader=javax.websocket.ContainerProvider
</Provide-Capability>
</instructions>
</configuration>
Expand Down
Loading

0 comments on commit 9036777

Please sign in to comment.