I have an EAR with an EJB-JAR and a WAR inside with the dependency defined in the Class-Path manifest header in the WAR. The EJB is defined only using annotations, no ejb-jar.xml. I inject the EJB into a servlet in the WAR using @EJB. When I set metadata-complete="true" in web.xml no injection happens. This is not my understanding of metadata-complete="true" in the web.xml. In my understanding it only disables scanning for thins like @WebServlet, @WebFilter, @WebListener, web-fragments, and so forth. Is this the intended behavior?
I believe that the behaviour you are seeing is correct.
Setting metadata-complete=true means that you are claiming that all configuration is done in the web.xml. This includes the specification of injection targets that you would otherwise have annotated with @Resource or @EJB.
Remember that these map to env-ref, resource-ref, ejb-ref, etc elements.