Trying to set up a maven web project with CDI 2.0 which should run on Tomcat 8.5. So I have to install the jboss WELD 3.
What is the relation between Weld, CDI and Java EE versions?
With the POM declaration out of here (only "weld-servlet-core")...
WELD - POM declaration (docs.jboss.org)
I get an Error with the "WeldTerminalListener", declared in the web.xml like that:
<!-- This listener should always be the last registered listener -->
<listener>
<listener-class>org.jboss.weld.servlet.WeldTerminalListener</listener-class>
</listener>
ERROR: java.lang.ClassNotFoundException: org.jboss.weld.servlet.WeldTerminalListener
If I use the following POM declaration it works fine:
<dependency>
<groupId>org.jboss.weld.servlet</groupId>
<artifactId>weld-servlet</artifactId>
<version>2.3.5.Final</version>
</dependency>
weld-servlet (without "-core") 3 is only available as alpha. The Version 2 is not CDI 2.0 able.
So which dependency in the POM do I need, to get it run?