-
Clarification
-
Resolution: Done
-
Minor
-
None
-
None
-
Documentation (Ref Guide, User Guide, etc.)
Chapter 12.1 specifies that beans.xml must be in the WEB-INF directory of a web archive to activate the WEB-INF/classes directory of that war as a bean archive (and thus make java:comp/BeanManager visible to the web app).
However, many developers find this location both confusing and inconvenient at times. The instinct of many developers is to put the beans.xml in WEB-INF/classes/META-INF since that follows the convention that applies to library jars.
Obviously, we cannot break backwards compatibility. Therefore, this issue proposes to honor either location in the war:
- WEB-INF/beans.xml
- WEB-INF/classes/META-INF/beans.xml
If both files are present, the WEB-INF/beans.xml should take precedence and a warning is recommended. (Merging them is not likely the behavior that a developer would want).
- relates to
-
WELD-1205 Issue a warning if both WEB-INF/beans.xml and WEB-INF/classes/META-INF/beans.xml are used
- Resolved