KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I am using Weld as CDI implementation. My integration test, that tries to assemble object graph instantiating Weld container works well , when I have empty beans.xml in src/test/java/META-INF/beans.xml . Here is that simple test: public class WeldIntegrationTest { @Test public void testInjector() { new Weld().initialize(); // shouldn't throw exception } } Now when I run mvn clean install , I always get: Missing beans.xml file in META-INF! My root folders are "src" and "web" which contains WEB-INF folder, but I also tried to use default maven structure and renamed "web" to "webapp" and moved it to src/main. I tried all the reasonable locations I could thought of: - src/main/java/META-INF/beans.xml - src/test/java/META-INF/beans.xml - web/WEB-INF/beans.xml - src/main/webapp/WEB-INF/beans.xml - src/main/webapp/META-INF/beans.xml - src/main/webapp/META-INF/(empty) and src/main/webapp/WEB-INF/beans.xml Nothing works so far :/
Tags (comma-separated)
Save Edits
Cancel