Move Equinox Jetty extension to another area.
authorMathieu Baudier <mbaudier@argeo.org>
Thu, 10 Feb 2022 07:57:29 +0000 (08:57 +0100)
committerMathieu Baudier <mbaudier@argeo.org>
Thu, 10 Feb 2022 07:57:29 +0000 (08:57 +0100)
18 files changed:
cms/org.argeo.ext.equinox.jetty/.classpath [deleted file]
cms/org.argeo.ext.equinox.jetty/.gitignore [deleted file]
cms/org.argeo.ext.equinox.jetty/.project [deleted file]
cms/org.argeo.ext.equinox.jetty/META-INF/.gitignore [deleted file]
cms/org.argeo.ext.equinox.jetty/bnd.bnd [deleted file]
cms/org.argeo.ext.equinox.jetty/build.properties [deleted file]
cms/org.argeo.ext.equinox.jetty/pom.xml [deleted file]
cms/org.argeo.ext.equinox.jetty/src/org/argeo/equinox/jetty/CmsJettyCustomizer.java [deleted file]
cms/org.argeo.ext.equinox.jetty/src/org/argeo/equinox/jetty/package-info.java [deleted file]
ext/org.argeo.ext.equinox.jetty/.classpath [new file with mode: 0644]
ext/org.argeo.ext.equinox.jetty/.gitignore [new file with mode: 0644]
ext/org.argeo.ext.equinox.jetty/.project [new file with mode: 0644]
ext/org.argeo.ext.equinox.jetty/META-INF/.gitignore [new file with mode: 0644]
ext/org.argeo.ext.equinox.jetty/bnd.bnd [new file with mode: 0644]
ext/org.argeo.ext.equinox.jetty/build.properties [new file with mode: 0644]
ext/org.argeo.ext.equinox.jetty/pom.xml [new file with mode: 0644]
ext/org.argeo.ext.equinox.jetty/src/org/argeo/equinox/jetty/CmsJettyCustomizer.java [new file with mode: 0644]
ext/org.argeo.ext.equinox.jetty/src/org/argeo/equinox/jetty/package-info.java [new file with mode: 0644]

diff --git a/cms/org.argeo.ext.equinox.jetty/.classpath b/cms/org.argeo.ext.equinox.jetty/.classpath
deleted file mode 100644 (file)
index eca7bdb..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
-       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
-       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
-       <classpathentry kind="src" path="src"/>
-       <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/cms/org.argeo.ext.equinox.jetty/.gitignore b/cms/org.argeo.ext.equinox.jetty/.gitignore
deleted file mode 100644 (file)
index 09e3bc9..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-/bin/
-/target/
diff --git a/cms/org.argeo.ext.equinox.jetty/.project b/cms/org.argeo.ext.equinox.jetty/.project
deleted file mode 100644 (file)
index 0b9700d..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-       <name>org.argeo.ext.equinox.jetty</name>
-       <comment></comment>
-       <projects>
-       </projects>
-       <buildSpec>
-               <buildCommand>
-                       <name>org.eclipse.jdt.core.javabuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-               <buildCommand>
-                       <name>org.eclipse.pde.ManifestBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-               <buildCommand>
-                       <name>org.eclipse.pde.SchemaBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-       </buildSpec>
-       <natures>
-               <nature>org.eclipse.pde.PluginNature</nature>
-               <nature>org.eclipse.jdt.core.javanature</nature>
-       </natures>
-</projectDescription>
diff --git a/cms/org.argeo.ext.equinox.jetty/META-INF/.gitignore b/cms/org.argeo.ext.equinox.jetty/META-INF/.gitignore
deleted file mode 100644 (file)
index 4854a41..0000000
+++ /dev/null
@@ -1 +0,0 @@
-/MANIFEST.MF
diff --git a/cms/org.argeo.ext.equinox.jetty/bnd.bnd b/cms/org.argeo.ext.equinox.jetty/bnd.bnd
deleted file mode 100644 (file)
index 0f21e73..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-Fragment-Host: org.eclipse.equinox.http.jetty
-
-Import-Package: org.eclipse.jetty.websocket.jsr356,\
-org.eclipse.jetty.websocket.api,\
-org.eclipse.jetty.websocket.common,\
-org.osgi.service.http,\
-*
\ No newline at end of file
diff --git a/cms/org.argeo.ext.equinox.jetty/build.properties b/cms/org.argeo.ext.equinox.jetty/build.properties
deleted file mode 100644 (file)
index 34d2e4d..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
-               .
diff --git a/cms/org.argeo.ext.equinox.jetty/pom.xml b/cms/org.argeo.ext.equinox.jetty/pom.xml
deleted file mode 100644 (file)
index 031e55c..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<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">
-       <modelVersion>4.0.0</modelVersion>
-       <parent>
-               <groupId>org.argeo.slc</groupId>
-               <artifactId>argeo-slc-cms</artifactId>
-               <version>2.3-SNAPSHOT</version>
-               <relativePath>..</relativePath>
-       </parent>
-       <artifactId>org.argeo.ext.equinox.jetty</artifactId>
-       <name>Extension of Equinox Jetty Integration</name>
-       <dependencies>
-               <dependency>
-                       <groupId>org.argeo.commons</groupId>
-                       <artifactId>org.argeo.cms</artifactId>
-                       <version>${version.argeo-commons}</version>
-               </dependency>
-       </dependencies>
-</project>
\ No newline at end of file
diff --git a/cms/org.argeo.ext.equinox.jetty/src/org/argeo/equinox/jetty/CmsJettyCustomizer.java b/cms/org.argeo.ext.equinox.jetty/src/org/argeo/equinox/jetty/CmsJettyCustomizer.java
deleted file mode 100644 (file)
index 46f0280..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-package org.argeo.equinox.jetty;
-
-import java.util.Dictionary;
-
-import javax.servlet.ServletContext;
-import javax.websocket.DeploymentException;
-
-import org.eclipse.equinox.http.jetty.JettyCustomizer;
-import org.eclipse.jetty.servlet.ServletContextHandler;
-import org.eclipse.jetty.websocket.jsr356.server.ServerContainer;
-import org.eclipse.jetty.websocket.jsr356.server.deploy.WebSocketServerContainerInitializer;
-import org.eclipse.jetty.websocket.jsr356.server.deploy.WebSocketServerContainerInitializer.Configurator;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.FrameworkUtil;
-
-/** Customises the Jetty HTTP server. */
-public class CmsJettyCustomizer extends JettyCustomizer {
-       private BundleContext bc = FrameworkUtil.getBundle(CmsJettyCustomizer.class).getBundleContext();
-
-       public final static String WEBSOCKET_ENABLED = "websocket.enabled";
-
-       @Override
-       public Object customizeContext(Object context, Dictionary<String, ?> settings) {
-               // WebSocket
-               Object webSocketEnabled = settings.get(WEBSOCKET_ENABLED);
-               if (webSocketEnabled != null && webSocketEnabled.toString().equals("true")) {
-                       ServletContextHandler servletContextHandler = (ServletContextHandler) context;
-                       WebSocketServerContainerInitializer.configure(servletContextHandler, new Configurator() {
-
-                               @Override
-                               public void accept(ServletContext servletContext, ServerContainer serverContainer)
-                                               throws DeploymentException {
-                                       bc.registerService(javax.websocket.server.ServerContainer.class, serverContainer, null);
-                               }
-                       });
-               }
-               return super.customizeContext(context, settings);
-
-       }
-}
diff --git a/cms/org.argeo.ext.equinox.jetty/src/org/argeo/equinox/jetty/package-info.java b/cms/org.argeo.ext.equinox.jetty/src/org/argeo/equinox/jetty/package-info.java
deleted file mode 100644 (file)
index 41c8ce9..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-/** Equinox Jetty extensions. */
-package org.argeo.equinox.jetty;
\ No newline at end of file
diff --git a/ext/org.argeo.ext.equinox.jetty/.classpath b/ext/org.argeo.ext.equinox.jetty/.classpath
new file mode 100644 (file)
index 0000000..eca7bdb
--- /dev/null
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+       <classpathentry kind="src" path="src"/>
+       <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/ext/org.argeo.ext.equinox.jetty/.gitignore b/ext/org.argeo.ext.equinox.jetty/.gitignore
new file mode 100644 (file)
index 0000000..09e3bc9
--- /dev/null
@@ -0,0 +1,2 @@
+/bin/
+/target/
diff --git a/ext/org.argeo.ext.equinox.jetty/.project b/ext/org.argeo.ext.equinox.jetty/.project
new file mode 100644 (file)
index 0000000..0b9700d
--- /dev/null
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>org.argeo.ext.equinox.jetty</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.jdt.core.javabuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.ManifestBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.SchemaBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.eclipse.pde.PluginNature</nature>
+               <nature>org.eclipse.jdt.core.javanature</nature>
+       </natures>
+</projectDescription>
diff --git a/ext/org.argeo.ext.equinox.jetty/META-INF/.gitignore b/ext/org.argeo.ext.equinox.jetty/META-INF/.gitignore
new file mode 100644 (file)
index 0000000..4854a41
--- /dev/null
@@ -0,0 +1 @@
+/MANIFEST.MF
diff --git a/ext/org.argeo.ext.equinox.jetty/bnd.bnd b/ext/org.argeo.ext.equinox.jetty/bnd.bnd
new file mode 100644 (file)
index 0000000..0f21e73
--- /dev/null
@@ -0,0 +1,7 @@
+Fragment-Host: org.eclipse.equinox.http.jetty
+
+Import-Package: org.eclipse.jetty.websocket.jsr356,\
+org.eclipse.jetty.websocket.api,\
+org.eclipse.jetty.websocket.common,\
+org.osgi.service.http,\
+*
\ No newline at end of file
diff --git a/ext/org.argeo.ext.equinox.jetty/build.properties b/ext/org.argeo.ext.equinox.jetty/build.properties
new file mode 100644 (file)
index 0000000..34d2e4d
--- /dev/null
@@ -0,0 +1,4 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+               .
diff --git a/ext/org.argeo.ext.equinox.jetty/pom.xml b/ext/org.argeo.ext.equinox.jetty/pom.xml
new file mode 100644 (file)
index 0000000..031e55c
--- /dev/null
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<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">
+       <modelVersion>4.0.0</modelVersion>
+       <parent>
+               <groupId>org.argeo.slc</groupId>
+               <artifactId>argeo-slc-cms</artifactId>
+               <version>2.3-SNAPSHOT</version>
+               <relativePath>..</relativePath>
+       </parent>
+       <artifactId>org.argeo.ext.equinox.jetty</artifactId>
+       <name>Extension of Equinox Jetty Integration</name>
+       <dependencies>
+               <dependency>
+                       <groupId>org.argeo.commons</groupId>
+                       <artifactId>org.argeo.cms</artifactId>
+                       <version>${version.argeo-commons}</version>
+               </dependency>
+       </dependencies>
+</project>
\ No newline at end of file
diff --git a/ext/org.argeo.ext.equinox.jetty/src/org/argeo/equinox/jetty/CmsJettyCustomizer.java b/ext/org.argeo.ext.equinox.jetty/src/org/argeo/equinox/jetty/CmsJettyCustomizer.java
new file mode 100644 (file)
index 0000000..46f0280
--- /dev/null
@@ -0,0 +1,40 @@
+package org.argeo.equinox.jetty;
+
+import java.util.Dictionary;
+
+import javax.servlet.ServletContext;
+import javax.websocket.DeploymentException;
+
+import org.eclipse.equinox.http.jetty.JettyCustomizer;
+import org.eclipse.jetty.servlet.ServletContextHandler;
+import org.eclipse.jetty.websocket.jsr356.server.ServerContainer;
+import org.eclipse.jetty.websocket.jsr356.server.deploy.WebSocketServerContainerInitializer;
+import org.eclipse.jetty.websocket.jsr356.server.deploy.WebSocketServerContainerInitializer.Configurator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.FrameworkUtil;
+
+/** Customises the Jetty HTTP server. */
+public class CmsJettyCustomizer extends JettyCustomizer {
+       private BundleContext bc = FrameworkUtil.getBundle(CmsJettyCustomizer.class).getBundleContext();
+
+       public final static String WEBSOCKET_ENABLED = "websocket.enabled";
+
+       @Override
+       public Object customizeContext(Object context, Dictionary<String, ?> settings) {
+               // WebSocket
+               Object webSocketEnabled = settings.get(WEBSOCKET_ENABLED);
+               if (webSocketEnabled != null && webSocketEnabled.toString().equals("true")) {
+                       ServletContextHandler servletContextHandler = (ServletContextHandler) context;
+                       WebSocketServerContainerInitializer.configure(servletContextHandler, new Configurator() {
+
+                               @Override
+                               public void accept(ServletContext servletContext, ServerContainer serverContainer)
+                                               throws DeploymentException {
+                                       bc.registerService(javax.websocket.server.ServerContainer.class, serverContainer, null);
+                               }
+                       });
+               }
+               return super.customizeContext(context, settings);
+
+       }
+}
diff --git a/ext/org.argeo.ext.equinox.jetty/src/org/argeo/equinox/jetty/package-info.java b/ext/org.argeo.ext.equinox.jetty/src/org/argeo/equinox/jetty/package-info.java
new file mode 100644 (file)
index 0000000..41c8ce9
--- /dev/null
@@ -0,0 +1,2 @@
+/** Equinox Jetty extensions. */
+package org.argeo.equinox.jetty;
\ No newline at end of file