Repository: piranhacloud/piranha (java)

Issue:
Use CDI 2.0 impl for Weld instead of the old 1.2

Pull request description:
#481 Change Weld over to a CDI 2.0 version
Fixes #481

Signed-off-by: arjantijms <arjan.tijms@gmail.com>

Patch:
diff --git a/cdi/weld/pom.xml b/cdi/weld/pom.xml
index 74e6579d4..ea311a555 100644
--- a/cdi/weld/pom.xml
+++ b/cdi/weld/pom.xml
@@ -31,7 +31,7 @@
         </dependency>
         <dependency>
             <groupId>org.jboss.weld.servlet</groupId>
-            <artifactId>weld-servlet</artifactId>
+            <artifactId>weld-servlet-shaded</artifactId>
             <scope>compile</scope>
         </dependency>
         <dependency>
diff --git a/cdi/weld/src/main/java/cloud/piranha/cdi/weld/WeldContainer.java b/cdi/weld/src/main/java/cloud/piranha/cdi/weld/WeldContainer.java
index 93b6f63e2..5e7b245d1 100644
--- a/cdi/weld/src/main/java/cloud/piranha/cdi/weld/WeldContainer.java
+++ b/cdi/weld/src/main/java/cloud/piranha/cdi/weld/WeldContainer.java
@@ -31,8 +31,8 @@ import javax.enterprise.inject.spi.CDI;
 import javax.naming.InitialContext;
 import javax.naming.NamingException;
 
-import org.jboss.weld.environment.Container;
-import org.jboss.weld.environment.ContainerContext;
+import org.jboss.weld.environment.servlet.Container;
+import org.jboss.weld.environment.servlet.ContainerContext;
 import org.jboss.weld.manager.api.WeldManager;
 import org.jboss.weld.resources.spi.ResourceLoader;
 
diff --git a/cdi/weld/src/main/resources/META-INF/services/org.jboss.weld.environment.Container b/cdi/weld/src/main/resources/META-INF/services/org.jboss.weld.environment.servlet.Container
similarity index 100%
rename from cdi/weld/src/main/resources/META-INF/services/org.jboss.weld.environment.Container
rename to cdi/weld/src/main/resources/META-INF/services/org.jboss.weld.environment.servlet.Container
diff --git a/pom.xml b/pom.xml
index 911eebaa3..e3f88c394 100644
--- a/pom.xml
+++ b/pom.xml
@@ -215,8 +215,8 @@
             </dependency>
             <dependency>
                 <groupId>org.jboss.weld.servlet</groupId>
-                <artifactId>weld-servlet</artifactId>
-                <version>2.4.8.Final</version>
+                <artifactId>weld-servlet-shaded</artifactId>
+                <version>3.1.3.Final</version>
             </dependency>
             <dependency>
                 <groupId>org.jboss.classfilewriter</groupId>


Test patch:
diff --git a/test/myfaces/pom.xml b/test/myfaces/pom.xml
index fda26e3f0..5ae4ce015 100644
--- a/test/myfaces/pom.xml
+++ b/test/myfaces/pom.xml
@@ -50,7 +50,7 @@
         </dependency>
         <dependency>
             <groupId>org.jboss.weld.servlet</groupId>
-            <artifactId>weld-servlet</artifactId>
+            <artifactId>weld-servlet-shaded</artifactId>
             <scope>test</scope>
         </dependency>
     </dependencies>