Weld seems to not support scanning of JAR files inside a WAR file.
We do hit this line in Tomcat 8(Servlet 3.1 container):
we are running Tomcat server in unpackWARs=false mode.
So a jar library inside the war deployment will be correctly detected by the WebAppBeanArchiveScanner ( https://github.com/weld/core/blob/master/environments/servlet/core/src/main/java/org/jboss/weld/environment/servlet/deployment/WebAppBeanArchiveScanner.java#L77 ) with a path like:
But the handler https://github.com/weld/core/blob/master/environments/servlet/core/src/main/java/org/jboss/weld/environment/servlet/deployment/ServletContextBeanArchiveHandler.java
only seems to support to handle WEB-INF/classes directory.
It seems to miss the handling of resources inside the ServletContext.
As most people will run Tomcat with unpackWars=true, I guess the normal file based handler will pickup the jar inside a war and that's why it works for this case.
so what do you think: bug or feature?