diff --git a/jetty-cdi/cdi-2/pom.xml b/jetty-cdi/cdi-2/pom.xml new file mode 100644 index 00000000000..73fd6c5ef70 --- /dev/null +++ b/jetty-cdi/cdi-2/pom.xml @@ -0,0 +1,36 @@ + + + org.eclipse.jetty.cdi + jetty-cdi-parent + 9.4.8-SNAPSHOT + + 4.0.0 + cdi-2 + Jetty :: CDI 2 + http://www.eclipse.org/jetty + jar + + ${project.groupId}.cdi2 + + + + + org.apache.maven.plugins + maven-assembly-plugin + + + package + + single + + + + config + + + + + + + + diff --git a/jetty-cdi/cdi-2/src/main/config/etc/cdi2/jetty-cdi2.xml b/jetty-cdi/cdi-2/src/main/config/etc/cdi2/jetty-cdi2.xml new file mode 100644 index 00000000000..3af8f23f2b2 --- /dev/null +++ b/jetty-cdi/cdi-2/src/main/config/etc/cdi2/jetty-cdi2.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + /etc/cdi2/jetty-web-cdi2.xml + + + + + + diff --git a/jetty-cdi/cdi-2/src/main/config/etc/cdi2/jetty-web-cdi2.xml b/jetty-cdi/cdi-2/src/main/config/etc/cdi2/jetty-web-cdi2.xml new file mode 100644 index 00000000000..b45e52e2608 --- /dev/null +++ b/jetty-cdi/cdi-2/src/main/config/etc/cdi2/jetty-web-cdi2.xml @@ -0,0 +1,22 @@ + + + + + + + -org.eclipse.jetty.util.Decorator + + + -org.eclipse.jetty.util.DecoratedObjectFactory + + + -org.eclipse.jetty.server.handler.ContextHandler. + + + -org.eclipse.jetty.server.handler.ContextHandler + + + -org.eclipse.jetty.servlet.ServletContextHandler + + + diff --git a/jetty-cdi/cdi-2/src/main/config/modules/cdi2.mod b/jetty-cdi/cdi-2/src/main/config/modules/cdi2.mod new file mode 100644 index 00000000000..da019048ad7 --- /dev/null +++ b/jetty-cdi/cdi-2/src/main/config/modules/cdi2.mod @@ -0,0 +1,13 @@ +[description] +Jetty setup to support Weld/CDI2 with WELD inside the webapp + +[depend] +deploy + +[xml] +etc/cdi2/jetty-cdi2.xml + +[license] +Weld is an open source project hosted on Github and released under the Apache 2.0 license. +http://weld.cdi-spec.org/ +http://www.apache.org/licenses/LICENSE-2.0.html diff --git a/jetty-cdi/cdi-core/src/main/java/org/eclipse/jetty/cdi/core/SimpleBeanStore.java b/jetty-cdi/cdi-core/src/main/java/org/eclipse/jetty/cdi/core/SimpleBeanStore.java index b4e8522de88..bf5585b42d5 100644 --- a/jetty-cdi/cdi-core/src/main/java/org/eclipse/jetty/cdi/core/SimpleBeanStore.java +++ b/jetty-cdi/cdi-core/src/main/java/org/eclipse/jetty/cdi/core/SimpleBeanStore.java @@ -28,6 +28,7 @@ import javax.enterprise.context.spi.Contextual; import org.eclipse.jetty.util.log.Log; import org.eclipse.jetty.util.log.Logger; +@Deprecated public class SimpleBeanStore { private static final Logger LOG = Log.getLogger(SimpleBeanStore.class); diff --git a/jetty-cdi/cdi-servlet/src/main/config/modules/cdi.mod b/jetty-cdi/cdi-servlet/src/main/config/modules/cdi.mod index 0b1236fcae5..c05530d631e 100644 --- a/jetty-cdi/cdi-servlet/src/main/config/modules/cdi.mod +++ b/jetty-cdi/cdi-servlet/src/main/config/modules/cdi.mod @@ -2,35 +2,4 @@ Experimental CDI/Weld integration [depend] -deploy -annotations -plus -# JSP (and EL) are requirements for CDI and Weld -jsp - -[files] -lib/cdi/ -maven://javax.enterprise/cdi-api/1.2|lib/cdi/javax.enterprise.cdi-api-1.2.jar -maven://javax.interceptor/javax.interceptor-api/1.2|lib/cdi/javax.interceptor-api-1.2.jar -maven://javax.inject/javax.inject/1|lib/cdi/javax.inject-1.0.jar -maven://org.jboss.weld.servlet/weld-servlet-core/2.4.3.Final|lib/cdi/weld-servlet-core-2.4.3.Final.jar -maven://org.jboss.weld.environment/weld-environment-common/2.4.3.Final|lib/cdi/weld-environment-common-2.4.3.Final.jar -maven://org.jboss.weld/weld-core-impl/2.4.3.Final|lib/cdi/weld-core-impl-2.4.3.Final.jar -maven://org.jboss.classfilewriter/jboss-classfilewriter/1.1.2.Final|lib/cdi/jboss-classfilewriter-1.1.2.Final.jar -maven://org.jboss.weld/weld-spi/2.4.SP1|lib/cdi/weld-spi-2.4.SP1.jar -maven://org.jboss.weld/weld-api/2.4.SP1|lib/cdi/weld-api-2.4.SP1.jar -maven://org.jboss.logging/jboss-logging/3.2.1.Final|lib/cdi/jboss-logging-3.2.1.Final.jar - - -[lib] -lib/cdi/*.jar -lib/cdi-core-${jetty.version}.jar -lib/cdi-servlet-${jetty.version}.jar - -[xml] -etc/jetty-cdi.xml - -[license] -Weld is an open source project hosted on Github and released under the Apache 2.0 license. -http://weld.cdi-spec.org/ -http://www.apache.org/licenses/LICENSE-2.0.html +cdi1 diff --git a/jetty-cdi/cdi-servlet/src/main/config/modules/cdi1.mod b/jetty-cdi/cdi-servlet/src/main/config/modules/cdi1.mod new file mode 100644 index 00000000000..e2b7105427f --- /dev/null +++ b/jetty-cdi/cdi-servlet/src/main/config/modules/cdi1.mod @@ -0,0 +1,37 @@ +[description] +Experimental CDI/Weld integration +Deprecated in favour of cdi2 module. + +[depend] +deploy +annotations +plus +# JSP (and EL) are requirements for CDI and Weld +jsp + +[files] +lib/cdi/ +maven://javax.enterprise/cdi-api/1.2|lib/cdi/javax.enterprise.cdi-api-1.2.jar +maven://javax.interceptor/javax.interceptor-api/1.2|lib/cdi/javax.interceptor-api-1.2.jar +maven://javax.inject/javax.inject/1|lib/cdi/javax.inject-1.0.jar +maven://org.jboss.weld.servlet/weld-servlet-core/2.4.3.Final|lib/cdi/weld-servlet-core-2.4.3.Final.jar +maven://org.jboss.weld.environment/weld-environment-common/2.4.3.Final|lib/cdi/weld-environment-common-2.4.3.Final.jar +maven://org.jboss.weld/weld-core-impl/2.4.3.Final|lib/cdi/weld-core-impl-2.4.3.Final.jar +maven://org.jboss.classfilewriter/jboss-classfilewriter/1.1.2.Final|lib/cdi/jboss-classfilewriter-1.1.2.Final.jar +maven://org.jboss.weld/weld-spi/2.4.SP1|lib/cdi/weld-spi-2.4.SP1.jar +maven://org.jboss.weld/weld-api/2.4.SP1|lib/cdi/weld-api-2.4.SP1.jar +maven://org.jboss.logging/jboss-logging/3.2.1.Final|lib/cdi/jboss-logging-3.2.1.Final.jar + + +[lib] +lib/cdi/*.jar +lib/cdi-core-${jetty.version}.jar +lib/cdi-servlet-${jetty.version}.jar + +[xml] +etc/jetty-cdi.xml + +[license] +Weld is an open source project hosted on Github and released under the Apache 2.0 license. +http://weld.cdi-spec.org/ +http://www.apache.org/licenses/LICENSE-2.0.html diff --git a/jetty-cdi/cdi-servlet/src/main/java/org/eclipse/jetty/cdi/servlet/WeldDeploymentBinding.java b/jetty-cdi/cdi-servlet/src/main/java/org/eclipse/jetty/cdi/servlet/WeldDeploymentBinding.java index b5fb9129bbc..996095a734f 100644 --- a/jetty-cdi/cdi-servlet/src/main/java/org/eclipse/jetty/cdi/servlet/WeldDeploymentBinding.java +++ b/jetty-cdi/cdi-servlet/src/main/java/org/eclipse/jetty/cdi/servlet/WeldDeploymentBinding.java @@ -27,6 +27,7 @@ import org.eclipse.jetty.webapp.WebAppContext; /** * Perform some basic weld configuration of WebAppContext */ +@Deprecated public class WeldDeploymentBinding implements AppLifeCycle.Binding { public String[] getBindingTargets() diff --git a/jetty-cdi/cdi-websocket/src/main/java/org/eclipse/jetty/cdi/websocket/AbstractContainerListener.java b/jetty-cdi/cdi-websocket/src/main/java/org/eclipse/jetty/cdi/websocket/AbstractContainerListener.java index ff8385030d6..77b9f1725ca 100644 --- a/jetty-cdi/cdi-websocket/src/main/java/org/eclipse/jetty/cdi/websocket/AbstractContainerListener.java +++ b/jetty-cdi/cdi-websocket/src/main/java/org/eclipse/jetty/cdi/websocket/AbstractContainerListener.java @@ -24,6 +24,7 @@ import org.eclipse.jetty.util.component.LifeCycle; /** * Abstract implementation of listener that needs both Container events and LifeCycle events */ +@Deprecated public abstract class AbstractContainerListener implements LifeCycle.Listener, Container.InheritedListener { @Override diff --git a/jetty-cdi/cdi-websocket/src/main/java/org/eclipse/jetty/cdi/websocket/JavaWebSocketSessionProducer.java b/jetty-cdi/cdi-websocket/src/main/java/org/eclipse/jetty/cdi/websocket/JavaWebSocketSessionProducer.java index d0f75b15d55..e8a8bbd0c50 100644 --- a/jetty-cdi/cdi-websocket/src/main/java/org/eclipse/jetty/cdi/websocket/JavaWebSocketSessionProducer.java +++ b/jetty-cdi/cdi-websocket/src/main/java/org/eclipse/jetty/cdi/websocket/JavaWebSocketSessionProducer.java @@ -28,6 +28,7 @@ import org.eclipse.jetty.util.log.Logger; /** * Producer of {@link javax.websocket.Session} instances */ +@Deprecated public class JavaWebSocketSessionProducer { private static final Logger LOG = Log.getLogger(JavaWebSocketSessionProducer.class); diff --git a/jetty-cdi/cdi-websocket/src/main/java/org/eclipse/jetty/cdi/websocket/JettyWebSocketSessionProducer.java b/jetty-cdi/cdi-websocket/src/main/java/org/eclipse/jetty/cdi/websocket/JettyWebSocketSessionProducer.java index 7e4cb6eb900..c91155d156d 100644 --- a/jetty-cdi/cdi-websocket/src/main/java/org/eclipse/jetty/cdi/websocket/JettyWebSocketSessionProducer.java +++ b/jetty-cdi/cdi-websocket/src/main/java/org/eclipse/jetty/cdi/websocket/JettyWebSocketSessionProducer.java @@ -29,6 +29,7 @@ import org.eclipse.jetty.websocket.api.Session; /** * Producer of {@link org.eclipse.jetty.websocket.api.Session} instances */ +@Deprecated public class JettyWebSocketSessionProducer { private static final Logger LOG = Log.getLogger(JettyWebSocketSessionProducer.class); diff --git a/jetty-cdi/cdi-websocket/src/main/java/org/eclipse/jetty/cdi/websocket/WebSocketCdiInitializer.java b/jetty-cdi/cdi-websocket/src/main/java/org/eclipse/jetty/cdi/websocket/WebSocketCdiInitializer.java index 2a40d58fde0..29884ec34b5 100644 --- a/jetty-cdi/cdi-websocket/src/main/java/org/eclipse/jetty/cdi/websocket/WebSocketCdiInitializer.java +++ b/jetty-cdi/cdi-websocket/src/main/java/org/eclipse/jetty/cdi/websocket/WebSocketCdiInitializer.java @@ -29,6 +29,7 @@ import org.eclipse.jetty.servlet.ServletContextHandler; import org.eclipse.jetty.util.component.ContainerLifeCycle; import org.eclipse.jetty.util.thread.ThreadClassLoaderScope; +@Deprecated public class WebSocketCdiInitializer implements ServletContainerInitializer { public static void configureContext(ServletContextHandler context) throws ServletException diff --git a/jetty-cdi/cdi-websocket/src/main/java/org/eclipse/jetty/cdi/websocket/WebSocketCdiListener.java b/jetty-cdi/cdi-websocket/src/main/java/org/eclipse/jetty/cdi/websocket/WebSocketCdiListener.java index a50d969d864..201253f68ae 100644 --- a/jetty-cdi/cdi-websocket/src/main/java/org/eclipse/jetty/cdi/websocket/WebSocketCdiListener.java +++ b/jetty-cdi/cdi-websocket/src/main/java/org/eclipse/jetty/cdi/websocket/WebSocketCdiListener.java @@ -34,6 +34,7 @@ import org.eclipse.jetty.websocket.api.Session; import org.eclipse.jetty.websocket.common.scopes.WebSocketContainerScope; import org.eclipse.jetty.websocket.common.scopes.WebSocketSessionScope; +@Deprecated public class WebSocketCdiListener extends AbstractContainerListener { static final Logger LOG = Log.getLogger(WebSocketCdiListener.class); diff --git a/jetty-cdi/cdi-websocket/src/main/java/org/eclipse/jetty/cdi/websocket/WebSocketScopeContext.java b/jetty-cdi/cdi-websocket/src/main/java/org/eclipse/jetty/cdi/websocket/WebSocketScopeContext.java index dcee925289f..658652aaafb 100644 --- a/jetty-cdi/cdi-websocket/src/main/java/org/eclipse/jetty/cdi/websocket/WebSocketScopeContext.java +++ b/jetty-cdi/cdi-websocket/src/main/java/org/eclipse/jetty/cdi/websocket/WebSocketScopeContext.java @@ -42,6 +42,7 @@ import org.eclipse.jetty.websocket.api.Session; *

* A CDI Context definition for how CDI will use objects defined to belong to the WebSocketScope */ +@Deprecated public class WebSocketScopeContext implements Context { private static final Logger LOG = Log.getLogger(WebSocketScopeContext.class); diff --git a/jetty-cdi/cdi-websocket/src/main/java/org/eclipse/jetty/cdi/websocket/WebSocketScopeExtension.java b/jetty-cdi/cdi-websocket/src/main/java/org/eclipse/jetty/cdi/websocket/WebSocketScopeExtension.java index dd075af5c2e..e01adc460f2 100644 --- a/jetty-cdi/cdi-websocket/src/main/java/org/eclipse/jetty/cdi/websocket/WebSocketScopeExtension.java +++ b/jetty-cdi/cdi-websocket/src/main/java/org/eclipse/jetty/cdi/websocket/WebSocketScopeExtension.java @@ -32,6 +32,7 @@ import org.eclipse.jetty.util.log.Logger; /** * Register the various WebSocket specific components for CDI */ +@Deprecated public class WebSocketScopeExtension implements Extension { private static final Logger LOG = Log.getLogger(WebSocketScopeExtension.class); diff --git a/jetty-cdi/cdi-websocket/src/main/java/org/eclipse/jetty/cdi/websocket/annotation/WebSocketScope.java b/jetty-cdi/cdi-websocket/src/main/java/org/eclipse/jetty/cdi/websocket/annotation/WebSocketScope.java index aa9b602d834..6a291193fa7 100644 --- a/jetty-cdi/cdi-websocket/src/main/java/org/eclipse/jetty/cdi/websocket/annotation/WebSocketScope.java +++ b/jetty-cdi/cdi-websocket/src/main/java/org/eclipse/jetty/cdi/websocket/annotation/WebSocketScope.java @@ -39,6 +39,7 @@ import javax.inject.Scope; @Target({ ElementType.TYPE, ElementType.FIELD, ElementType.METHOD }) @Inherited @Documented +@Deprecated public @interface WebSocketScope { diff --git a/jetty-cdi/pom.xml b/jetty-cdi/pom.xml index 09587bd3deb..55317e080e6 100644 --- a/jetty-cdi/pom.xml +++ b/jetty-cdi/pom.xml @@ -19,6 +19,7 @@ cdi-servlet cdi-full-servlet cdi-websocket + cdi-2 test-cdi-webapp