-
Feature Request
-
Resolution: Done
-
Major
-
2.3.3.Final
-
None
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):
https://github.com/weld/core/blob/master/environments/common/src/main/java/org/jboss/weld/environment/deployment/discovery/AbstractDiscoveryStrategy.java#L105
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:
jar:war:file:/path/to/webapp.war*/WEB-INF/lib/included-cdi-lib.jar
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?
- relates to
-
WELD-2128 Only use ServletContext.getResourcePaths() for discovery of webapps
- Open