Since you already have the CDI bean inside library jars in lib/ can please remove the manifest entries of these jar files and test them, this might be duplication which is causing this issue.This leads to " WELD-001408 Unsatisfied dependencies", which I expected, as the injected class now is not on the classpath anymore.
The CDI bean is contained in lib.jar (Just a simple un-annotated POJO)
TestApp.ear (archive format) +-ejb1.jar +-ejb2.jar +-web.war +-lib +-lib.jar +-META-INF +-application.xml
That is not logical because all jars in the lib directory are available to all modules in the application.You are right, but the other approach is not illegal either: Chapter EE.8.2.1 of the "Java™ Platform, Enterprise Edition (Java EE) Specification, v6" states:
Libraries bundled with an application may be referenced in the following waysI'll give it another try later today using the patch you mentioned
1. A JAR format file (such as a .jar file, .war file, or .rar file) may reference a .jar file or directory by naming the referenced .jar file or directory in a Class-Path header in the referencing JAR file’s Manifest file.