In CDI prior to CDI 4.0, JAR and WAR archives which contain a beans.xml deployment descriptor file that does not specify
a version attribute on the root <beans> element are considered explicit bean archives.
In these archives, CDI can manage and inject any bean, except those annotated with @Vetoed.
In CDI 4.0, these archives are considered implicit bean archives. In implicit bean archives, CDI can only manage and inject beans annotated with a bean-defining annotation.
To mark an archive as an explicit bean archive and restore the bean discovery behavior of the previous release,
specify both the version attribute (set to 1.1 or newer) and the bean-discovery-mode="all" attribute,
on the beans element:
<beans xmlns="https://jakarta.ee/xml/ns/jakartaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/beans_4_0.xsd"
bean-discovery-mode="all"
version="4.0">
</beans>
For more information, see Jakarta EE 10 Core Profile debuts in Open Liberty 22.0.0.9-beta (section "Unversioned beans.xml files").