Hello Carlos Aristu according to Weld specification, you should have your beans.xml under WEB-INF folder for WAR archives. See this bit of the documentation. Is there a specific reason why you cannot adhere to that? Having it in WEB-INF should rule out what default scanner finds.
Note 2: this problem usually does not happen when deploying the applicaton in Tomcat without using Eclipse. In this case the beans.xml file is placed at WEB-INF/classes/META-INF/beans.xml. As this path contains the keyword "WEB-INF" the result found by the DefaultBeanArchiveScanner is discarded here.
I am afraid I don't see how beans.xml placement depends on how you deploy the application? It should simply be packaged inside the WAR you are deploying, therefore it is in place before you get to deploying. |