- finally, I tested the attached weld-translator.ear file, that contains weld-translator-lib.jar, and whose weld-translator.jar archive references that lib jar from its manifest. It doesn't work either. This time, VFSUtils.addManifestLocations recognizes the referenced jar, but the WeldFilesDeployer piece of code I pasted above does not get the extra classpath entry $JBOSS_HOME/server/all/deploy/weld-translator.ear/weld-translator-lib.jar. The outcome is the following deployment exception:
This test is actually semi-broken, as it doesn't exactly/propery test what you had in mind.
The catch is in the way we handle sub-deployments in .ear.
Even though they are not referenced in application.xml, they are still considered to be real ear contents; see EARStructure.
So, in your case, the SentenceParser bean could come or be refed (in Weld) from just another sub-deployment,
hence not actually thru manifest reference.