Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Auto weld-servlet vesion
String WELD_VERSION = org.jboss.weld.servlet.WeldListener.class.getPackage().getSpecificationVersion();
if( WELD_VERSION == null )
WELD_VERSION = "1.1.0.Final";
log.fine(" Using weld-servlet version: " + WELD_VERSION);
WebArchive war = ShrinkWrap.create(WebArchive.class, "test2.war")
.addClasses(TestServlet.class, TestBean.class)
.artifact("org.jboss.weld.servlet:weld-servlet:" + WELD_VERSION).resolveAs(GenericArchive.class))
.addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml")
.addAsManifestResource("in-container-context.xml", "context.xml")
/// DEBUG - see what's new File("/tmp/"), true );
return war;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.