Well, the problem is javax.faces-2.2.12.jar is not a bean archive - it does not contain beans.xml but contains a portable extension - see also http://docs.jboss.org/cdi/spec/1.2/cdi-spec.html#bean_archive. And so the content of javax.faces-2.2.12.jar is ignored and javax.faces.view.ViewScoped is not added to the set of bean defining annotations. It is true, the com.sun.faces.application.view.ViewScopeExtension is using BeforeBeanDiscovery.addScope() to register ViewScoped as a scope annotation. However, this is currently not supported by Weld - see also WELD-1624 (due to chicken-egg-like problem).
We should improve the way JandexDiscoveryStrategy identifies an annotation annotated with @NormalScope.
|