Skip to content

Commit

Permalink
Merged branch jetty-10.0.x into jetty-11.0.x-websocket
Browse files Browse the repository at this point in the history
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
  • Loading branch information
lachlan-roberts committed Mar 12, 2020
1 parent b1d30fc commit 3e837d3
Show file tree
Hide file tree
Showing 594 changed files with 2,902 additions and 2,680 deletions.
2 changes: 1 addition & 1 deletion Jenkinsfile
Expand Up @@ -116,7 +116,7 @@ def mavenBuild(jdk, cmdline, mvnName, junitPublishDisabled) {
mavenOpts: mavenOpts,
mavenLocalRepo: localRepo) {
// Some common Maven command line + provided command line
sh "mvn -Pci -V -B -e -fae -Dmaven.test.failure.ignore=true -Djetty.testtracker.log=true $cmdline -Dunix.socket.tmp=" + env.JENKINS_HOME
sh "mvn -Pci -Psnapshot-repositories -V -U -B -e -fae -Dmaven.test.failure.ignore=true -Djetty.testtracker.log=true $cmdline -Dunix.socket.tmp=" + env.JENKINS_HOME
}
}

Expand Down
6 changes: 3 additions & 3 deletions aggregates/jetty-all/pom.xml
Expand Up @@ -2,7 +2,7 @@
<parent>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-project</artifactId>
<version>10.0.0-SNAPSHOT</version>
<version>11.0.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down Expand Up @@ -183,7 +183,7 @@
</dependency>
<dependency>
<groupId>org.eclipse.jetty.websocket</groupId>
<artifactId>websocket-javax-server</artifactId>
<artifactId>websocket-jakarta-server</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
Expand All @@ -210,7 +210,7 @@
<!-- dependencies that jetty-all needs (some optional) -->
<dependency>
<groupId>org.eclipse.jetty.toolchain</groupId>
<artifactId>jetty-javax-websocket-api</artifactId>
<artifactId>jetty-jakarta-websocket-api</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.toolchain</groupId>
Expand Down
4 changes: 2 additions & 2 deletions aggregates/jetty-websocket-all/pom.xml
Expand Up @@ -113,7 +113,7 @@
</dependency>
<dependency>
<groupId>org.eclipse.jetty.websocket</groupId>
<artifactId>websocket-javax-server</artifactId>
<artifactId>websocket-jakarta-server</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
Expand Down Expand Up @@ -144,7 +144,7 @@
<!-- dependencies that jetty-all needs (some optional) -->
<dependency>
<groupId>org.eclipse.jetty.toolchain</groupId>
<artifactId>jetty-javax-websocket-api</artifactId>
<artifactId>jetty-jakarta-websocket-api</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
Expand Down
2 changes: 1 addition & 1 deletion apache-jsp/pom.xml
Expand Up @@ -2,7 +2,7 @@
<parent>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-project</artifactId>
<version>10.0.0-SNAPSHOT</version>
<version>11.0.0-SNAPSHOT</version>
</parent>

<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion apache-jstl/pom.xml
Expand Up @@ -2,7 +2,7 @@
<parent>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-project</artifactId>
<version>10.0.0-SNAPSHOT</version>
<version>11.0.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>apache-jstl</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion build-resources/pom.xml
Expand Up @@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.eclipse.jetty</groupId>
<artifactId>build-resources</artifactId>
<version>10.0.0-SNAPSHOT</version>
<version>11.0.0-SNAPSHOT</version>
<name>Jetty :: Build Resources</name>
<packaging>jar</packaging>

Expand Down
2 changes: 1 addition & 1 deletion examples/async-rest/async-rest-jar/pom.xml
Expand Up @@ -2,7 +2,7 @@
<parent>
<groupId>org.eclipse.jetty</groupId>
<artifactId>example-async-rest</artifactId>
<version>10.0.0-SNAPSHOT</version>
<version>11.0.0-SNAPSHOT</version>
</parent>

<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion examples/async-rest/async-rest-server/pom.xml
Expand Up @@ -2,7 +2,7 @@
<parent>
<groupId>org.eclipse.jetty</groupId>
<artifactId>example-async-rest</artifactId>
<version>10.0.0-SNAPSHOT</version>
<version>11.0.0-SNAPSHOT</version>
</parent>

<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion examples/async-rest/async-rest-webapp/pom.xml
Expand Up @@ -2,7 +2,7 @@
<parent>
<groupId>org.eclipse.jetty</groupId>
<artifactId>example-async-rest</artifactId>
<version>10.0.0-SNAPSHOT</version>
<version>11.0.0-SNAPSHOT</version>
</parent>

<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion examples/async-rest/pom.xml
Expand Up @@ -2,7 +2,7 @@
<parent>
<groupId>org.eclipse.jetty.examples</groupId>
<artifactId>examples-parent</artifactId>
<version>10.0.0-SNAPSHOT</version>
<version>11.0.0-SNAPSHOT</version>
</parent>

<modelVersion>4.0.0</modelVersion>
Expand Down
4 changes: 2 additions & 2 deletions examples/embedded/pom.xml
Expand Up @@ -2,7 +2,7 @@
<parent>
<groupId>org.eclipse.jetty.examples</groupId>
<artifactId>examples-parent</artifactId>
<version>10.0.0-SNAPSHOT</version>
<version>11.0.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down Expand Up @@ -52,7 +52,7 @@
</dependency>
<dependency>
<groupId>org.eclipse.jetty.websocket</groupId>
<artifactId>websocket-javax-server</artifactId>
<artifactId>websocket-jakarta-server</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
Expand Down
Expand Up @@ -18,20 +18,19 @@

package org.eclipse.jetty.embedded;

import javax.websocket.OnMessage;
import javax.websocket.Session;
import javax.websocket.server.ServerEndpoint;

import jakarta.websocket.OnMessage;
import jakarta.websocket.Session;
import jakarta.websocket.server.ServerEndpoint;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.server.handler.DefaultHandler;
import org.eclipse.jetty.server.handler.HandlerList;
import org.eclipse.jetty.servlet.ServletContextHandler;
import org.eclipse.jetty.websocket.javax.server.config.JavaxWebSocketServletContainerInitializer;
import org.eclipse.jetty.websocket.jakarta.server.config.JakartaWebSocketServletContainerInitializer;

/**
* Example of setting up a javax.websocket server with Jetty embedded
* Example of setting up a jakarta.websocket server with Jetty embedded
*/
public class WebSocketJsrServer
public class WebSocketJakartaServer
{
/**
* A server socket endpoint
Expand All @@ -56,11 +55,11 @@ public static Server createServer(int port)
context.setContextPath("/");
handlers.addHandler(context);

// Enable javax.websocket configuration for the context
JavaxWebSocketServletContainerInitializer.configure(context,
// Enable jakarta.websocket configuration for the context
JakartaWebSocketServletContainerInitializer.configure(context,
(servletContext, serverContainer) ->
{
// Add your websocket to the javax.websocket.server.ServerContainer
// Add your websocket to the jakarta.websocket.server.ServerContainer
serverContainer.addEndpoint(EchoJsrSocket.class);
}
);
Expand Down
Expand Up @@ -31,7 +31,7 @@
/**
* Example of setting up a Jetty WebSocket server
* <p>
* Note: this uses the Jetty WebSocket API, not the javax.websocket API.
* Note: this uses the Jetty WebSocket API, not the jakarta.websocket API.
*/
public class WebSocketServer
{
Expand Down
Expand Up @@ -20,14 +20,14 @@

import java.net.URI;
import java.util.concurrent.LinkedBlockingQueue;
import javax.websocket.CloseReason;
import javax.websocket.ContainerProvider;
import javax.websocket.Endpoint;
import javax.websocket.EndpointConfig;
import javax.websocket.MessageHandler;
import javax.websocket.Session;
import javax.websocket.WebSocketContainer;

import jakarta.websocket.CloseReason;
import jakarta.websocket.ContainerProvider;
import jakarta.websocket.Endpoint;
import jakarta.websocket.EndpointConfig;
import jakarta.websocket.MessageHandler;
import jakarta.websocket.Session;
import jakarta.websocket.WebSocketContainer;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.util.component.LifeCycle;
import org.eclipse.jetty.websocket.api.util.WSURI;
Expand All @@ -39,14 +39,14 @@
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.is;

public class WebSocketJsrServerTest
public class WebSocketJakartaServerTest
{
private Server server;

@BeforeEach
public void startServer() throws Exception
{
server = WebSocketJsrServer.createServer(0);
server = WebSocketJakartaServer.createServer(0);
server.start();
}

Expand All @@ -59,23 +59,23 @@ public void stopServer() throws Exception
@Test
public void testGetEcho() throws Exception
{
WebSocketContainer javaxWebSocketClient = ContainerProvider.getWebSocketContainer();
javaxWebSocketClient.setDefaultMaxSessionIdleTimeout(2000);
WebSocketContainer jakartaWebSocketClient = ContainerProvider.getWebSocketContainer();
jakartaWebSocketClient.setDefaultMaxSessionIdleTimeout(2000);
try
{
URI wsUri = WSURI.toWebsocket(server.getURI().resolve("/echo"));

TrackingClientEndpoint clientEndpoint = new TrackingClientEndpoint();

Session session = javaxWebSocketClient.connectToServer(clientEndpoint, null, wsUri);
Session session = jakartaWebSocketClient.connectToServer(clientEndpoint, null, wsUri);
session.getBasicRemote().sendText("Hello World");

String response = clientEndpoint.messages.poll(2, SECONDS);
assertThat("Response", response, is("Hello World"));
}
finally
{
LifeCycle.stop(javaxWebSocketClient);
LifeCycle.stop(jakartaWebSocketClient);
}
}

Expand Down
2 changes: 1 addition & 1 deletion examples/pom.xml
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-project</artifactId>
<version>10.0.0-SNAPSHOT</version>
<version>11.0.0-SNAPSHOT</version>
</parent>

<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion jetty-alpn/jetty-alpn-client/pom.xml
Expand Up @@ -2,7 +2,7 @@
<parent>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-alpn-parent</artifactId>
<version>10.0.0-SNAPSHOT</version>
<version>11.0.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jetty-alpn-client</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion jetty-alpn/jetty-alpn-conscrypt-client/pom.xml
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-alpn-parent</artifactId>
<version>10.0.0-SNAPSHOT</version>
<version>11.0.0-SNAPSHOT</version>
</parent>

<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion jetty-alpn/jetty-alpn-conscrypt-server/pom.xml
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-alpn-parent</artifactId>
<version>10.0.0-SNAPSHOT</version>
<version>11.0.0-SNAPSHOT</version>
</parent>

<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion jetty-alpn/jetty-alpn-java-client/pom.xml
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-alpn-parent</artifactId>
<version>10.0.0-SNAPSHOT</version>
<version>11.0.0-SNAPSHOT</version>
</parent>

<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion jetty-alpn/jetty-alpn-java-server/pom.xml
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-alpn-parent</artifactId>
<version>10.0.0-SNAPSHOT</version>
<version>11.0.0-SNAPSHOT</version>
</parent>

<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion jetty-alpn/jetty-alpn-server/pom.xml
Expand Up @@ -2,7 +2,7 @@
<parent>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-alpn-parent</artifactId>
<version>10.0.0-SNAPSHOT</version>
<version>11.0.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jetty-alpn-server</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion jetty-alpn/pom.xml
Expand Up @@ -2,7 +2,7 @@
<parent>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-project</artifactId>
<version>10.0.0-SNAPSHOT</version>
<version>11.0.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jetty-alpn-parent</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion jetty-annotations/pom.xml
Expand Up @@ -2,7 +2,7 @@
<parent>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-project</artifactId>
<version>10.0.0-SNAPSHOT</version>
<version>11.0.0-SNAPSHOT</version>
</parent>

<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion jetty-ant/pom.xml
Expand Up @@ -2,7 +2,7 @@
<parent>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-project</artifactId>
<version>10.0.0-SNAPSHOT</version>
<version>11.0.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jetty-ant</artifactId>
Expand Down

0 comments on commit 3e837d3

Please sign in to comment.