Merge remote-tracking branch 'origin/jetty-10.0.x' into jetty-11.0.x
This commit is contained in:
commit
02d6ce1b5d
|
@ -21,8 +21,6 @@ package org.eclipse.jetty.cdi;
|
||||||
import org.eclipse.jetty.annotations.AnnotationConfiguration;
|
import org.eclipse.jetty.annotations.AnnotationConfiguration;
|
||||||
import org.eclipse.jetty.plus.webapp.PlusConfiguration;
|
import org.eclipse.jetty.plus.webapp.PlusConfiguration;
|
||||||
import org.eclipse.jetty.webapp.AbstractConfiguration;
|
import org.eclipse.jetty.webapp.AbstractConfiguration;
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>CDI Configuration</p>
|
* <p>CDI Configuration</p>
|
||||||
|
@ -32,8 +30,6 @@ import org.slf4j.LoggerFactory;
|
||||||
*/
|
*/
|
||||||
public class CdiConfiguration extends AbstractConfiguration
|
public class CdiConfiguration extends AbstractConfiguration
|
||||||
{
|
{
|
||||||
private static final Logger LOG = LoggerFactory.getLogger(CdiConfiguration.class);
|
|
||||||
|
|
||||||
public CdiConfiguration()
|
public CdiConfiguration()
|
||||||
{
|
{
|
||||||
protectAndExpose("org.eclipse.jetty.cdi.CdiServletContainerInitializer");
|
protectAndExpose("org.eclipse.jetty.cdi.CdiServletContainerInitializer");
|
||||||
|
|
11
pom.xml
11
pom.xml
|
@ -32,7 +32,7 @@
|
||||||
<annotation-api.version>2.0.0-RC1</annotation-api.version>
|
<annotation-api.version>2.0.0-RC1</annotation-api.version>
|
||||||
<transaction-api.version>2.0.0-RC1</transaction-api.version>
|
<transaction-api.version>2.0.0-RC1</transaction-api.version>
|
||||||
<mail-api.version>2.0.0-RC4</mail-api.version>
|
<mail-api.version>2.0.0-RC4</mail-api.version>
|
||||||
<inject-api.version>2.0.0-RC2</inject-api.version>
|
<inject-api.version>2.0.0-RC4</inject-api.version>
|
||||||
<infinispan.version>9.4.8.Final</infinispan.version>
|
<infinispan.version>9.4.8.Final</infinispan.version>
|
||||||
<hazelcast.version>4.0.1</hazelcast.version>
|
<hazelcast.version>4.0.1</hazelcast.version>
|
||||||
<conscrypt.version>2.4.0</conscrypt.version>
|
<conscrypt.version>2.4.0</conscrypt.version>
|
||||||
|
@ -43,7 +43,8 @@
|
||||||
<junit.version>5.7.0</junit.version>
|
<junit.version>5.7.0</junit.version>
|
||||||
<maven.version>3.6.0</maven.version>
|
<maven.version>3.6.0</maven.version>
|
||||||
<maven.resolver.version>1.3.1</maven.resolver.version>
|
<maven.resolver.version>1.3.1</maven.resolver.version>
|
||||||
<weld.version>3.1.3.Final</weld.version>
|
<weld.version>4.0.0.Beta1</weld.version>
|
||||||
|
<jboss.logging.version>3.4.1.Final</jboss.logging.version>
|
||||||
<jetty.perf-helper.version>1.0.5</jetty.perf-helper.version>
|
<jetty.perf-helper.version>1.0.5</jetty.perf-helper.version>
|
||||||
<ant.version>1.10.8</ant.version>
|
<ant.version>1.10.8</ant.version>
|
||||||
<unix.socket.tmp></unix.socket.tmp>
|
<unix.socket.tmp></unix.socket.tmp>
|
||||||
|
@ -65,6 +66,7 @@
|
||||||
<!-- testing -->
|
<!-- testing -->
|
||||||
<it.debug>false</it.debug>
|
<it.debug>false</it.debug>
|
||||||
<jetty.test.version>5.5</jetty.test.version>
|
<jetty.test.version>5.5</jetty.test.version>
|
||||||
|
<hamcrest.version>2.2</hamcrest.version>
|
||||||
|
|
||||||
<!-- springboot is only used for jetty-maven-plugin it test
|
<!-- springboot is only used for jetty-maven-plugin it test
|
||||||
otherwise depending on Spring Boot might be chicken and egg issue :) -->
|
otherwise depending on Spring Boot might be chicken and egg issue :) -->
|
||||||
|
@ -1107,6 +1109,11 @@
|
||||||
<artifactId>junit-jupiter</artifactId>
|
<artifactId>junit-jupiter</artifactId>
|
||||||
<version>${junit.version}</version>
|
<version>${junit.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hamcrest</groupId>
|
||||||
|
<artifactId>hamcrest</artifactId>
|
||||||
|
<version>${hamcrest.version}</version>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.testcontainers</groupId>
|
<groupId>org.testcontainers</groupId>
|
||||||
<artifactId>testcontainers</artifactId>
|
<artifactId>testcontainers</artifactId>
|
||||||
|
|
|
@ -19,7 +19,6 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.hamcrest</groupId>
|
<groupId>org.hamcrest</groupId>
|
||||||
<artifactId>hamcrest</artifactId>
|
<artifactId>hamcrest</artifactId>
|
||||||
<version>2.1</version>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.eclipse.jetty.tests</groupId>
|
<groupId>org.eclipse.jetty.tests</groupId>
|
||||||
<artifactId>tests-parent</artifactId>
|
<artifactId>tests-parent</artifactId>
|
||||||
<version>10.0.0-SNAPSHOT</version>
|
<version>11.0.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
@ -43,6 +43,12 @@
|
||||||
<version>${weld.version}</version>
|
<version>${weld.version}</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jboss.logging</groupId>
|
||||||
|
<artifactId>jboss-logging</artifactId>
|
||||||
|
<version>${jboss.logging.version}</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.eclipse.jetty</groupId>
|
<groupId>org.eclipse.jetty</groupId>
|
||||||
<artifactId>jetty-slf4j-impl</artifactId>
|
<artifactId>jetty-slf4j-impl</artifactId>
|
||||||
|
@ -52,6 +58,11 @@
|
||||||
<groupId>org.eclipse.jetty.toolchain</groupId>
|
<groupId>org.eclipse.jetty.toolchain</groupId>
|
||||||
<artifactId>jetty-test-helper</artifactId>
|
<artifactId>jetty-test-helper</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.eclipse.jetty.toolchain</groupId>
|
||||||
|
<artifactId>jetty-jakarta-servlet-api</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -20,24 +20,8 @@ package org.eclipse.jetty.cdi.tests;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.EnumSet;
|
import java.util.EnumSet;
|
||||||
import javax.enterprise.inject.Produces;
|
|
||||||
import javax.enterprise.inject.spi.BeanManager;
|
|
||||||
import javax.enterprise.inject.spi.InjectionPoint;
|
|
||||||
|
|
||||||
import jakarta.inject.Inject;
|
|
||||||
import jakarta.inject.Named;
|
|
||||||
import jakarta.servlet.DispatcherType;
|
import jakarta.servlet.DispatcherType;
|
||||||
import jakarta.servlet.Filter;
|
|
||||||
import jakarta.servlet.FilterChain;
|
|
||||||
import jakarta.servlet.FilterConfig;
|
|
||||||
import jakarta.servlet.ServletContextEvent;
|
|
||||||
import jakarta.servlet.ServletContextListener;
|
|
||||||
import jakarta.servlet.ServletException;
|
|
||||||
import jakarta.servlet.ServletRequest;
|
|
||||||
import jakarta.servlet.ServletResponse;
|
|
||||||
import jakarta.servlet.http.HttpServlet;
|
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
|
||||||
import org.eclipse.jetty.annotations.AnnotationConfiguration;
|
import org.eclipse.jetty.annotations.AnnotationConfiguration;
|
||||||
import org.eclipse.jetty.cdi.CdiConfiguration;
|
import org.eclipse.jetty.cdi.CdiConfiguration;
|
||||||
import org.eclipse.jetty.cdi.CdiDecoratingListener;
|
import org.eclipse.jetty.cdi.CdiDecoratingListener;
|
||||||
|
@ -48,7 +32,6 @@ import org.eclipse.jetty.server.Server;
|
||||||
import org.eclipse.jetty.servlet.ListenerHolder;
|
import org.eclipse.jetty.servlet.ListenerHolder;
|
||||||
import org.eclipse.jetty.servlet.ServletContextHandler;
|
import org.eclipse.jetty.servlet.ServletContextHandler;
|
||||||
import org.eclipse.jetty.webapp.WebAppContext;
|
import org.eclipse.jetty.webapp.WebAppContext;
|
||||||
import org.junit.jupiter.api.Disabled;
|
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.junit.jupiter.params.ParameterizedTest;
|
import org.junit.jupiter.params.ParameterizedTest;
|
||||||
import org.junit.jupiter.params.provider.ValueSource;
|
import org.junit.jupiter.params.provider.ValueSource;
|
||||||
|
@ -98,8 +81,6 @@ public class EmbeddedWeldTest
|
||||||
context.getServletHandler().addListener(new ListenerHolder(MyContextListener.class));
|
context.getServletHandler().addListener(new ListenerHolder(MyContextListener.class));
|
||||||
|
|
||||||
// Setup Jetty weld integration
|
// Setup Jetty weld integration
|
||||||
/*
|
|
||||||
TODO: uncomment when Weld 4 is used.
|
|
||||||
switch (mode)
|
switch (mode)
|
||||||
{
|
{
|
||||||
case "none": // Do nothing, let weld work it out.
|
case "none": // Do nothing, let weld work it out.
|
||||||
|
@ -153,8 +134,6 @@ public class EmbeddedWeldTest
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
return server;
|
return server;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -217,8 +196,7 @@ public class EmbeddedWeldTest
|
||||||
|
|
||||||
webapp.setInitParameter(org.eclipse.jetty.cdi.CdiServletContainerInitializer.CDI_INTEGRATION_ATTRIBUTE, org.eclipse.jetty.cdi.CdiDecoratingListener.MODE);
|
webapp.setInitParameter(org.eclipse.jetty.cdi.CdiServletContainerInitializer.CDI_INTEGRATION_ATTRIBUTE, org.eclipse.jetty.cdi.CdiDecoratingListener.MODE);
|
||||||
webapp.addBean(new ServletContextHandler.Initializer(webapp, new org.eclipse.jetty.cdi.CdiServletContainerInitializer()));
|
webapp.addBean(new ServletContextHandler.Initializer(webapp, new org.eclipse.jetty.cdi.CdiServletContainerInitializer()));
|
||||||
// TODO: uncomment with Weld 4.
|
webapp.addBean(new ServletContextHandler.Initializer(webapp, new org.jboss.weld.environment.servlet.EnhancedListener()));
|
||||||
// webapp.addBean(new ServletContextHandler.Initializer(webapp, new org.jboss.weld.environment.servlet.EnhancedListener()));
|
|
||||||
|
|
||||||
String pkg = EmbeddedWeldTest.class.getPackage().getName();
|
String pkg = EmbeddedWeldTest.class.getPackage().getName();
|
||||||
webapp.getServerClassMatcher().add("-" + pkg + ".");
|
webapp.getServerClassMatcher().add("-" + pkg + ".");
|
||||||
|
|
|
@ -18,9 +18,9 @@
|
||||||
|
|
||||||
package org.eclipse.jetty.cdi.tests;
|
package org.eclipse.jetty.cdi.tests;
|
||||||
|
|
||||||
import javax.enterprise.inject.Produces;
|
import jakarta.enterprise.inject.Produces;
|
||||||
import javax.enterprise.inject.spi.InjectionPoint;
|
import jakarta.enterprise.inject.spi.InjectionPoint;
|
||||||
import javax.inject.Named;
|
import jakarta.inject.Named;
|
||||||
|
|
||||||
public class FriendlyGreetings
|
public class FriendlyGreetings
|
||||||
{
|
{
|
||||||
|
|
|
@ -19,13 +19,14 @@
|
||||||
package org.eclipse.jetty.cdi.tests;
|
package org.eclipse.jetty.cdi.tests;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import javax.enterprise.inject.spi.BeanManager;
|
|
||||||
import javax.inject.Inject;
|
import jakarta.enterprise.inject.spi.BeanManager;
|
||||||
import javax.inject.Named;
|
import jakarta.inject.Inject;
|
||||||
import javax.servlet.ServletException;
|
import jakarta.inject.Named;
|
||||||
import javax.servlet.http.HttpServlet;
|
import jakarta.servlet.ServletException;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServlet;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
public class GreetingsServlet extends HttpServlet
|
public class GreetingsServlet extends HttpServlet
|
||||||
{
|
{
|
||||||
|
|
|
@ -18,10 +18,10 @@
|
||||||
|
|
||||||
package org.eclipse.jetty.cdi.tests;
|
package org.eclipse.jetty.cdi.tests;
|
||||||
|
|
||||||
import javax.enterprise.inject.spi.BeanManager;
|
import jakarta.enterprise.inject.spi.BeanManager;
|
||||||
import javax.inject.Inject;
|
import jakarta.inject.Inject;
|
||||||
import javax.servlet.ServletContextEvent;
|
import jakarta.servlet.ServletContextEvent;
|
||||||
import javax.servlet.ServletContextListener;
|
import jakarta.servlet.ServletContextListener;
|
||||||
|
|
||||||
public class MyContextListener implements ServletContextListener
|
public class MyContextListener implements ServletContextListener
|
||||||
{
|
{
|
||||||
|
|
|
@ -19,14 +19,15 @@
|
||||||
package org.eclipse.jetty.cdi.tests;
|
package org.eclipse.jetty.cdi.tests;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import javax.enterprise.inject.spi.BeanManager;
|
|
||||||
import javax.inject.Inject;
|
import jakarta.enterprise.inject.spi.BeanManager;
|
||||||
import javax.servlet.Filter;
|
import jakarta.inject.Inject;
|
||||||
import javax.servlet.FilterChain;
|
import jakarta.servlet.Filter;
|
||||||
import javax.servlet.FilterConfig;
|
import jakarta.servlet.FilterChain;
|
||||||
import javax.servlet.ServletException;
|
import jakarta.servlet.FilterConfig;
|
||||||
import javax.servlet.ServletRequest;
|
import jakarta.servlet.ServletException;
|
||||||
import javax.servlet.ServletResponse;
|
import jakarta.servlet.ServletRequest;
|
||||||
|
import jakarta.servlet.ServletResponse;
|
||||||
|
|
||||||
public class MyFilter implements Filter
|
public class MyFilter implements Filter
|
||||||
{
|
{
|
||||||
|
|
|
@ -35,5 +35,10 @@
|
||||||
<artifactId>weld-servlet-core</artifactId>
|
<artifactId>weld-servlet-core</artifactId>
|
||||||
<version>${weld.version}</version>
|
<version>${weld.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jboss.logging</groupId>
|
||||||
|
<artifactId>jboss-logging</artifactId>
|
||||||
|
<version>${jboss.logging.version}</version>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</project>
|
</project>
|
||||||
|
|
Loading…
Reference in New Issue