4

I have a JEE7 project using CDI. I want to test that project on Jetty 9, which implements Java EE 7 Web Profile.

The following link indicate that we can plug Weld into Jetty, but how ? Thanks

EDIT: And, how do that with jetty-maven-plugin ?

Jetty and Java EE 7 Web Profile

asicfr
  • 1,061
  • 1
  • 13
  • 30

2 Answers2

4

I tried many things but this is what worked.

http://docs.jboss.org/weld/reference/latest/en-US/html/environments.html#_embedded_jetty

Just be sure to include the appropriate libraries like weld-servlet, cdi-api, el-api and el-impl

Bwire
  • 1,181
  • 1
  • 14
  • 25
2

I wrote some docs on this a while back, if you an issues let me know.

http://www.eclipse.org/jetty/documentation/current/framework-weld.html

jesse mcconnell
  • 7,102
  • 1
  • 22
  • 33
  • Hello. I read your doc about jetty and weld and follow your instructions. I can deploy my webapp with weld on Jetty, but I can't get the jetty-maven-plugin working. Any tip? I post a question about this: https://stackoverflow.com/questions/44848409/cdi-invalid-bean-archive-scanning-in-jetty-not-in-tomcat Thankyou. – Francesco Jul 05 '17 at 10:27