From f529de11444a6c3d6f659e2b4f0a1c3b4bd3dbca Mon Sep 17 00:00:00 2001 From: Frank Benoit Date: Fri, 8 Nov 2024 22:19:58 +0100 Subject: [PATCH] Update target platform to r2024-09 javax to jakarta, jetty 10.x to 12.0.12 --- .../META-INF/MANIFEST.MF | 7 +- plugins/org.eclipse.glsp.graph/.classpath | 8 +- .../META-INF/MANIFEST.MF | 6 +- .../META-INF/MANIFEST.MF | 7 +- .../META-INF/MANIFEST.MF | 7 +- .../META-INF/MANIFEST.MF | 31 +++--- .../server/websocket/GLSPConfigurator.java | 16 +-- .../server/websocket/GLSPServerEndpoint.java | 10 +- .../server/websocket/WebsocketModule.java | 4 +- .../websocket/WebsocketServerLauncher.java | 16 +-- .../META-INF/MANIFEST.MF | 14 +-- pom.xml | 6 +- releng/org.eclipse.glsp.feature/feature.xml | 12 +- targetplatforms/pom.xml | 6 +- targetplatforms/r2024-09.target | 103 ++++++++++++++++++ targetplatforms/r2024-09.tpd | 62 +++++++++++ 16 files changed, 241 insertions(+), 74 deletions(-) create mode 100644 targetplatforms/r2024-09.target create mode 100644 targetplatforms/r2024-09.tpd diff --git a/examples/org.eclipse.glsp.example.workflow/META-INF/MANIFEST.MF b/examples/org.eclipse.glsp.example.workflow/META-INF/MANIFEST.MF index e4c7c06e..174d53e9 100644 --- a/examples/org.eclipse.glsp.example.workflow/META-INF/MANIFEST.MF +++ b/examples/org.eclipse.glsp.example.workflow/META-INF/MANIFEST.MF @@ -22,10 +22,13 @@ Export-Package: org.eclipse.glsp.example.workflow, org.eclipse.glsp.example.workflow.wfgraph.util Automatic-Module-Name: org.eclipse.glsp.example.workflow Bundle-RequiredExecutionEnvironment: JavaSE-17 -Require-Bundle: org.eclipse.glsp.layout;bundle-version="[2.0.0,3.0.0)", +Require-Bundle: com.google.inject;bundle-version="[7.0.0,8.0.0)", + org.apache.commons.cli;bundle-version="1.9.0", + org.eclipse.glsp.layout;bundle-version="[2.0.0,3.0.0)", + org.eclipse.glsp.graph;bundle-version="2.3.0", org.eclipse.glsp.server;bundle-version="[2.0.0,3.0.0)", org.eclipse.glsp.server.websocket;bundle-version="[2.0.0,3.0.0)", - org.eclipse.elk.core;bundle-version="0.8.1", org.eclipse.elk.alg.layered;bundle-version="0.8.1", + org.eclipse.elk.core;bundle-version="0.8.1", org.eclipse.elk.graph;bundle-version="0.8.1" Import-Package: org.apache.logging.log4j;version="2.17.1" diff --git a/plugins/org.eclipse.glsp.graph/.classpath b/plugins/org.eclipse.glsp.graph/.classpath index cb66d458..aae21769 100644 --- a/plugins/org.eclipse.glsp.graph/.classpath +++ b/plugins/org.eclipse.glsp.graph/.classpath @@ -6,7 +6,11 @@ - - + + + + + + diff --git a/plugins/org.eclipse.glsp.graph/META-INF/MANIFEST.MF b/plugins/org.eclipse.glsp.graph/META-INF/MANIFEST.MF index c6bdf71f..334f5d6b 100644 --- a/plugins/org.eclipse.glsp.graph/META-INF/MANIFEST.MF +++ b/plugins/org.eclipse.glsp.graph/META-INF/MANIFEST.MF @@ -6,9 +6,9 @@ Bundle-Version: 2.3.0.qualifier Bundle-Vendor: Eclipse GLSP Automatic-Module-Name: org.eclipse.glsp.graph Bundle-RequiredExecutionEnvironment: JavaSE-17 -Require-Bundle: org.eclipse.emf.common;bundle-version="2.23.0", - com.google.gson;bundle-version="2.8.7", - org.eclipse.emf.ecore;bundle-version="2.25.0";visibility:=reexport +Require-Bundle: org.eclipse.emf.common;bundle-version="2.31.0", + org.eclipse.emf.ecore;bundle-version="2.37.0", + com.google.gson;bundle-version="2.11.0" Export-Package: org.eclipse.glsp.graph, org.eclipse.glsp.graph, org.eclipse.glsp.graph.builder, diff --git a/plugins/org.eclipse.glsp.layout/META-INF/MANIFEST.MF b/plugins/org.eclipse.glsp.layout/META-INF/MANIFEST.MF index 2d01b452..68829d70 100644 --- a/plugins/org.eclipse.glsp.layout/META-INF/MANIFEST.MF +++ b/plugins/org.eclipse.glsp.layout/META-INF/MANIFEST.MF @@ -6,7 +6,10 @@ Bundle-Version: 2.3.0.qualifier Bundle-Vendor: EclispeSource Automatic-Module-Name: org.eclipse.glsp.layout Bundle-RequiredExecutionEnvironment: JavaSE-17 -Require-Bundle: org.eclipse.glsp.server;bundle-version="[2.0.0,3.0.0)", +Require-Bundle: com.google.inject;bundle-version="[7.0.0,8.0.0)", + org.apache.commons.cli;bundle-version="1.9.0", org.eclipse.elk.core;bundle-version="0.8.1", - org.eclipse.elk.graph;bundle-version="0.8.1" + org.eclipse.elk.graph;bundle-version="0.8.1", + org.eclipse.glsp.graph;bundle-version="2.3.0", + org.eclipse.glsp.server;bundle-version="[2.0.0,3.0.0)" Export-Package: org.eclipse.glsp.layout diff --git a/plugins/org.eclipse.glsp.server.emf/META-INF/MANIFEST.MF b/plugins/org.eclipse.glsp.server.emf/META-INF/MANIFEST.MF index 1e60654c..874a89f9 100644 --- a/plugins/org.eclipse.glsp.server.emf/META-INF/MANIFEST.MF +++ b/plugins/org.eclipse.glsp.server.emf/META-INF/MANIFEST.MF @@ -8,11 +8,12 @@ Bundle-Vendor: Eclipse GLSP Bundle-Localization: plugin Automatic-Module-Name: org.eclipse.glsp.example.emf Bundle-RequiredExecutionEnvironment: JavaSE-17 -Require-Bundle: org.eclipse.glsp.server;bundle-version="[2.0.0,3.0.0)", - org.eclipse.glsp.graph;bundle-version="[2.0.0,3.0.0)", +Require-Bundle: com.google.inject;bundle-version="[7.0.0,8.0.0)", org.eclipse.emf.ecore;bundle-version="2.25.0", org.eclipse.emf.ecore.edit;bundle-version="2.13.0", - org.eclipse.emf.ecore.xmi;bundle-version="2.16.0" + org.eclipse.emf.ecore.xmi;bundle-version="2.16.0", + org.eclipse.glsp.graph;bundle-version="[2.0.0,3.0.0)", + org.eclipse.glsp.server;bundle-version="[2.0.0,3.0.0)" Export-Package: org.eclipse.glsp.server.emf, org.eclipse.glsp.server.emf.idgen, diff --git a/plugins/org.eclipse.glsp.server.websocket/META-INF/MANIFEST.MF b/plugins/org.eclipse.glsp.server.websocket/META-INF/MANIFEST.MF index 014fb01c..1297ec13 100644 --- a/plugins/org.eclipse.glsp.server.websocket/META-INF/MANIFEST.MF +++ b/plugins/org.eclipse.glsp.server.websocket/META-INF/MANIFEST.MF @@ -7,28 +7,23 @@ Bundle-Vendor: Eclipse GLSP Automatic-Module-Name: com.eclipsesource.glps.server.websocket Bundle-RequiredExecutionEnvironment: JavaSE-17 Require-Bundle: com.google.gson;bundle-version="2.8.7", + com.google.inject;bundle-version="[7.0.0,8.0.0)", org.eclipse.glsp.server;bundle-version="[2.0.0,3.0.0]", + org.eclipse.jetty.ee10.servlet;bundle-version="12.0.12", + org.eclipse.jetty.ee10.websocket.jakarta.server;bundle-version="12.0.12", + org.eclipse.jetty.ee10.websocket.server;bundle-version="12.0.12", + org.eclipse.jetty.ee8.server;bundle-version="12.0.12", + org.eclipse.jetty.server;bundle-version="12.0.12", + org.eclipse.jetty.session;bundle-version="12.0.12", + org.eclipse.jetty.util;bundle-version="12.0.12", + org.eclipse.jetty.websocket.api;bundle-version="12.0.12", org.eclipse.lsp4j;bundle-version="0.11.0", org.eclipse.lsp4j.jsonrpc;bundle-version="0.11.0", - org.eclipse.lsp4j.websocket;bundle-version="0.11.0", - org.eclipse.jetty.servlet;bundle-version="[10.0.0,11.0.0)", - org.eclipse.jetty.util;bundle-version="[10.0.0,11.0.0)", - org.eclipse.jetty.server;bundle-version="[10.0.0,11.0.0)", - org.eclipse.jetty.webapp;bundle-version="[10.0.0,11.0.0)", - org.eclipse.jetty.http;bundle-version="[10.0.0,11.0.0)";visibility:=reexport, - org.eclipse.jetty.io;bundle-version="[10.0.0,11.0.0)", - org.eclipse.jetty.client;bundle-version="[10.0.0,11.0.0)", - org.eclipse.jetty.websocket.javax.client;bundle-version="[10.0.0,11.0.0)", - org.eclipse.jetty.websocket.javax.server;bundle-version="[10.0.0,11.0.0)", - org.eclipse.jetty.websocket.javax.common;bundle-version="[10.0.0,11.0.0)", - org.eclipse.jetty.websocket.core.common;bundle-version="[10.0.0,11.0.0)", - org.eclipse.jetty.websocket.core.client;bundle-version="[10.0.0,11.0.0)", - org.eclipse.jetty.websocket.servlet;bundle-version="[10.0.0,11.0.0)", - org.eclipse.jetty.websocket.core.server;bundle-version="[10.0.0,11.0.0)" + org.eclipse.lsp4j.websocket.jakarta;bundle-version="0.23.1" Export-Package: org.eclipse.glsp.server.websocket -Import-Package: javax.servlet;version="[4.0.0,5.0.0)", - javax.websocket;version="1.1.0", - javax.websocket.server;version="1.1.0", +Import-Package: jakarta.servlet;version="[6.1.0,7.0.0)", + jakarta.websocket;version="[2.2.0,3.0.0)", + jakarta.websocket.server;version="[2.2.0,3.0.0)", org.apache.logging.log4j;version="2.17.1", org.apache.logging.log4j.core.config;version="2.17.1", org.apache.logging.slf4j;version="2.17.1" diff --git a/plugins/org.eclipse.glsp.server.websocket/src/org/eclipse/glsp/server/websocket/GLSPConfigurator.java b/plugins/org.eclipse.glsp.server.websocket/src/org/eclipse/glsp/server/websocket/GLSPConfigurator.java index 0e91e9b6..8292abdd 100644 --- a/plugins/org.eclipse.glsp.server.websocket/src/org/eclipse/glsp/server/websocket/GLSPConfigurator.java +++ b/plugins/org.eclipse.glsp.server.websocket/src/org/eclipse/glsp/server/websocket/GLSPConfigurator.java @@ -19,16 +19,16 @@ import java.util.ServiceLoader; import java.util.function.Supplier; -import javax.websocket.Extension; -import javax.websocket.HandshakeResponse; -import javax.websocket.server.HandshakeRequest; -import javax.websocket.server.ServerEndpointConfig; -import javax.websocket.server.ServerEndpointConfig.Configurator; - -import org.eclipse.jetty.websocket.javax.server.config.ContainerDefaultConfigurator; +import org.eclipse.jetty.ee10.websocket.jakarta.server.config.ContainerDefaultConfigurator; import com.google.inject.Injector; +import jakarta.websocket.Extension; +import jakarta.websocket.HandshakeResponse; +import jakarta.websocket.server.HandshakeRequest; +import jakarta.websocket.server.ServerEndpointConfig; +import jakarta.websocket.server.ServerEndpointConfig.Configurator; + public class GLSPConfigurator extends Configurator { protected Configurator containerConfigurator; protected final Supplier injector; @@ -40,7 +40,7 @@ public GLSPConfigurator(final Supplier injector) { Configurator getContainerConfigurator() { if (containerConfigurator == null) { ServiceLoader loader = ServiceLoader - .load(javax.websocket.server.ServerEndpointConfig.Configurator.class); + .load(jakarta.websocket.server.ServerEndpointConfig.Configurator.class); if (loader.iterator().hasNext()) { containerConfigurator = loader.iterator().next(); } else { diff --git a/plugins/org.eclipse.glsp.server.websocket/src/org/eclipse/glsp/server/websocket/GLSPServerEndpoint.java b/plugins/org.eclipse.glsp.server.websocket/src/org/eclipse/glsp/server/websocket/GLSPServerEndpoint.java index 3f60a02c..ecd2b14f 100644 --- a/plugins/org.eclipse.glsp.server.websocket/src/org/eclipse/glsp/server/websocket/GLSPServerEndpoint.java +++ b/plugins/org.eclipse.glsp.server.websocket/src/org/eclipse/glsp/server/websocket/GLSPServerEndpoint.java @@ -19,20 +19,20 @@ import java.util.function.Consumer; import java.util.function.Function; -import javax.websocket.CloseReason; -import javax.websocket.EndpointConfig; -import javax.websocket.Session; - import org.eclipse.glsp.server.gson.ServerGsonConfigurator; import org.eclipse.glsp.server.protocol.GLSPClient; import org.eclipse.glsp.server.protocol.GLSPServer; import org.eclipse.lsp4j.jsonrpc.Launcher.Builder; import org.eclipse.lsp4j.jsonrpc.MessageConsumer; -import org.eclipse.lsp4j.websocket.WebSocketEndpoint; +import org.eclipse.lsp4j.websocket.jakarta.WebSocketEndpoint; import com.google.gson.GsonBuilder; import com.google.inject.Inject; +import jakarta.websocket.CloseReason; +import jakarta.websocket.EndpointConfig; +import jakarta.websocket.Session; + public class GLSPServerEndpoint extends WebSocketEndpoint { public static final int MAX_TEXT_MESSAGE_BUFFER_SIZE = 8388608; diff --git a/plugins/org.eclipse.glsp.server.websocket/src/org/eclipse/glsp/server/websocket/WebsocketModule.java b/plugins/org.eclipse.glsp.server.websocket/src/org/eclipse/glsp/server/websocket/WebsocketModule.java index d4b81a7d..7918dc39 100644 --- a/plugins/org.eclipse.glsp.server.websocket/src/org/eclipse/glsp/server/websocket/WebsocketModule.java +++ b/plugins/org.eclipse.glsp.server.websocket/src/org/eclipse/glsp/server/websocket/WebsocketModule.java @@ -15,10 +15,10 @@ ******************************************************************************/ package org.eclipse.glsp.server.websocket; -import javax.websocket.Endpoint; - import com.google.inject.AbstractModule; +import jakarta.websocket.Endpoint; + public class WebsocketModule extends AbstractModule { @Override diff --git a/plugins/org.eclipse.glsp.server.websocket/src/org/eclipse/glsp/server/websocket/WebsocketServerLauncher.java b/plugins/org.eclipse.glsp.server.websocket/src/org/eclipse/glsp/server/websocket/WebsocketServerLauncher.java index 5db3e28c..d292b041 100644 --- a/plugins/org.eclipse.glsp.server.websocket/src/org/eclipse/glsp/server/websocket/WebsocketServerLauncher.java +++ b/plugins/org.eclipse.glsp.server.websocket/src/org/eclipse/glsp/server/websocket/WebsocketServerLauncher.java @@ -17,20 +17,20 @@ import java.net.InetSocketAddress; -import javax.websocket.server.ServerEndpointConfig; - import org.apache.logging.log4j.Level; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.core.config.Configurator; import org.eclipse.glsp.server.di.ServerModule; import org.eclipse.glsp.server.launch.GLSPServerLauncher; +import org.eclipse.jetty.ee10.servlet.ServletContextHandler; +import org.eclipse.jetty.ee10.websocket.jakarta.server.config.JakartaWebSocketServletContainerInitializer; import org.eclipse.jetty.server.Server; -import org.eclipse.jetty.servlet.ServletContextHandler; -import org.eclipse.jetty.websocket.javax.server.config.JavaxWebSocketServletContainerInitializer; import com.google.inject.Module; +import jakarta.websocket.server.ServerEndpointConfig; + public class WebsocketServerLauncher extends GLSPServerLauncher { public static final String START_UP_COMPLETE_MSG = "[GLSP-Server]:Startup completed. Accepting requests on port:"; protected static Logger LOGGER = LogManager.getLogger(WebsocketServerLauncher.class); @@ -68,12 +68,14 @@ public void start(final String hostname, int port) { // Configure web socket - JavaxWebSocketServletContainerInitializer.configure(webAppContext, (servletContext, wsContainer) -> { + JakartaWebSocketServletContainerInitializer.configure(webAppContext, (servletContext, wsContainer) -> { ServerEndpointConfig.Builder builder = ServerEndpointConfig.Builder.create(GLSPServerEndpoint.class, "/" + endpointPath); builder.configurator(new GLSPConfigurator(this::createInjector)); - wsContainer.setDefaultMaxSessionIdleTimeout(-1); - wsContainer.addEndpoint(builder.build()); + ServerEndpointConfig endPointConfig = builder.build(); + + // wsContainer.setDefaultMaxSessionIdleTimeout(-1); + wsContainer.addEndpoint(endPointConfig); }); server.setHandler(webAppContext); diff --git a/plugins/org.eclipse.glsp.server/META-INF/MANIFEST.MF b/plugins/org.eclipse.glsp.server/META-INF/MANIFEST.MF index c0a84e05..b2c80e8b 100644 --- a/plugins/org.eclipse.glsp.server/META-INF/MANIFEST.MF +++ b/plugins/org.eclipse.glsp.server/META-INF/MANIFEST.MF @@ -6,13 +6,13 @@ Bundle-Version: 2.3.0.qualifier Bundle-Vendor: Eclipse GLSP Automatic-Module-Name: org.eclipse.glsp.server Bundle-RequiredExecutionEnvironment: JavaSE-17 -Require-Bundle: org.eclipse.emf.ecore.change;bundle-version="2.14.0", - com.google.gson;bundle-version="2.8.7", - org.eclipse.lsp4j;bundle-version="0.11.0", - org.eclipse.lsp4j.jsonrpc;bundle-version="0.11.0", - org.apache.commons.cli;bundle-version="1.4.0";visibility:=reexport, - com.google.inject;bundle-version="[5.0.1,8.0.0)";visibility:=reexport, - org.eclipse.glsp.graph;bundle-version="[2.0.0,3.0.0)";visibility:=reexport +Require-Bundle: com.google.inject;bundle-version="[7.0.0,8.0.0)", + com.google.gson;bundle-version="2.11.0", + org.apache.commons.cli;bundle-version="1.9.0", + org.eclipse.emf.ecore.change;bundle-version="2.17.0", + org.eclipse.glsp.graph;bundle-version="[2.3.0,3.0.0)", + org.eclipse.lsp4j;bundle-version="0.23.1", + org.eclipse.lsp4j.jsonrpc;bundle-version="0.23.1" Export-Package: org.eclipse.glsp.server.actions, org.eclipse.glsp.server.di, org.eclipse.glsp.server.di.scope, diff --git a/pom.xml b/pom.xml index 7751acf0..ea5e47fd 100644 --- a/pom.xml +++ b/pom.xml @@ -73,10 +73,10 @@ [2.25.0,) 2.16.0 2.0.0 - [5.0.1,) + [7.0.0,) [2.8.7,) [5.7.1,6.0.0) - [0.11.0,) + [0.23.1,) [10.0.12,) @@ -233,7 +233,7 @@ org.eclipse.glsp org.eclipse.glsp.parent - targetplatforms/r2022-12 + targetplatforms/r2024-09 ${project.version} diff --git a/releng/org.eclipse.glsp.feature/feature.xml b/releng/org.eclipse.glsp.feature/feature.xml index fa969d92..25772778 100644 --- a/releng/org.eclipse.glsp.feature/feature.xml +++ b/releng/org.eclipse.glsp.feature/feature.xml @@ -318,25 +318,19 @@ version(s), and exceptions or additional permissions here}." - + + version="0.0.0"/> + version="0.0.0"/> diff --git a/targetplatforms/pom.xml b/targetplatforms/pom.xml index d96c58ed..d402b7a5 100644 --- a/targetplatforms/pom.xml +++ b/targetplatforms/pom.xml @@ -17,7 +17,7 @@ 2.7.5 2.7.5 org.eclipse.cbi.targetplatform.tpd.converter - r2020-06.tpd + r2024-09.tpd @@ -29,9 +29,9 @@ - 2020-06 + 2024-09 p2 - https://download.eclipse.org/releases/2020-06 + https://download.eclipse.org/releases/2024-09 tpd diff --git a/targetplatforms/r2024-09.target b/targetplatforms/r2024-09.target new file mode 100644 index 00000000..f72cbf03 --- /dev/null +++ b/targetplatforms/r2024-09.target @@ -0,0 +1,103 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + jakarta.websocket + jakarta.websocket-api + 2.2.0 + jar + + + + + + + org.apache.aries.spifly + org.apache.aries.spifly.dynamic.bundle + 1.3.6 + jar + + + + + + + org.slf4j + slf4j-api + 2.0.0 + jar + + + + + + + org.apache.logging.log4j + log4j-slf4j2-impl + 2.19.0 + jar + + + org.apache.logging.log4j + log4j-core + 2.19.0 + jar + + + org.apache.logging.log4j + log4j-api + 2.19.0 + jar + + + + + diff --git a/targetplatforms/r2024-09.tpd b/targetplatforms/r2024-09.tpd new file mode 100644 index 00000000..7a370a2c --- /dev/null +++ b/targetplatforms/r2024-09.tpd @@ -0,0 +1,62 @@ + +target "2024-09 - Default" with source requirements +include "maven-dependencies.tpd" + +location "http://download.eclipse.org/releases/2024-09" { + org.eclipse.emf.sdk.feature.group + org.eclipse.lsp4j [0.23.0,1.0.0) + org.eclipse.lsp4j.websocket.jakarta [0.23.0,1.0.0) + org.apache.commons.cli [1.4.0,2.0.0) + com.google.gson[2.8.7,3.0.0) + com.google.inject [7.0.0,8.0.0) + jakarta.inject.jakarta.inject-api [2.0.1,3.0.0) +} + +location "https://download.eclipse.org/tools/orbit/downloads/drops/R20221123021534/repository/" { + org.junit [4.13.2,5.0.0) + org.junit.jupiter.api [5.8.1,6.0.0) +} + +location "http://download.eclipse.org/elk/updates/releases/0.9.1/" { + org.eclipse.elk.core + org.eclipse.elk.graph + org.eclipse.elk.graph.text + org.eclipse.elk.alg.layered +} + +location "mvn:org.eclipse.jetty:jetty-p2:12.0.12:zip:p2site" { + org.eclipse.jetty.alpn.client + org.eclipse.jetty.client + org.eclipse.jetty.ee + org.eclipse.jetty.ee10.servlet + org.eclipse.jetty.ee10.webapp + org.eclipse.jetty.ee10.websocket.jakarta.client + org.eclipse.jetty.ee10.websocket.jakarta.common + org.eclipse.jetty.ee10.websocket.jakarta.server + org.eclipse.jetty.ee10.websocket.server + org.eclipse.jetty.ee10.websocket.servlet + org.eclipse.jetty.websocket.api + org.eclipse.jetty.websocket.common + org.eclipse.jetty.websocket.core.client + org.eclipse.jetty.websocket.core.common + org.eclipse.jetty.websocket.core.server + org.eclipse.jetty.xml +} + +maven jakarta scope=compile dependencyDepth=none missingManifest=generate { + dependency { + groupId="jakarta.servlet" + artifactId="jakarta.servlet-api" + version="6.1.0" + } + dependency { + groupId="jakarta.websocket" + artifactId="jakarta.websocket-api" + version="2.2.0" + } + dependency { + groupId="jakarta.websocket" + artifactId="jakarta.websocket-client-api" + version="2.2.0" + } +}