[jira] [Commented] (OWB-1400) "/tomcat" entry in "org.apache.webbeans.scanExclusionPaths" disables scanning on official tomcat docker image
[ https://issues.apache.org/jira/browse/OWB-1400?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17478792#comment-17478792 ] Romain Manni-Bucau commented on OWB-1400: - [~jfreire] there is a single rule, the rule about file is that you will get the class name in general (MyService.class for ex) so you must go up using the class name and you will end in WEB-INF/classes so either we consider we scan blindly or we go up of 2 more level to check if we exclude the full war, was my point. > "/tomcat" entry in "org.apache.webbeans.scanExclusionPaths" disables scanning > on official tomcat docker image > - > > Key: OWB-1400 > URL: https://issues.apache.org/jira/browse/OWB-1400 > Project: OpenWebBeans > Issue Type: Improvement > Components: Core >Affects Versions: 2.0.23 > Environment: docker image tomcat:8.5-jdk17-corretto >Reporter: Jose Luis Freire >Priority: Major > > When deploying an application in a tomcat docker image, the application is > typically installed in "/usr/local/tomcat/webapps". > > The application libs will typically be located in > "/usr/local/tomcat/webapps/ROOT/WEB-INF/lib". > The "/tomcat" entry in the exclusion path results in all the application > beans getting ignored if the jar files don't have the "META-INF/beans.xml" > (which isn't required in the default setup). > > I propose changing "/tomcat" to "/tomcat/lib" to avoid this overreaching > optimization. -- This message was sent by Atlassian Jira (v8.20.1#820001)
[jira] [Commented] (OWB-1400) "/tomcat" entry in "org.apache.webbeans.scanExclusionPaths" disables scanning on official tomcat docker image
[ https://issues.apache.org/jira/browse/OWB-1400?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17478787#comment-17478787 ] Jose Luis Freire commented on OWB-1400: --- Hi Romain! If I understood correctly you're proposing to match the file name if the path contains "web-inf" or "meta-inf", else match the path. As an illustration, if we have scanExclusionPaths= ..., /tomcat, ... The file "/usr/local/tomcat/webapps/ROOT/WEB-INF/lib/my-jar-with-beans.jar" would not be skipped because the rule "inside web-inf" would make the matching apply only to the filename. The file "/usr/local/tomcat/lib/tomcat-api.jar" would be skipped because the path doesn't match "web-inf" or "meta-inf" and all entries whose full path match "tomcat" would be skipped. That would work. Maybe a more comprehensive approach would be having two settings: "org.apache.webbeans.scanExclusionPaths" and "org.apache.webbeans.scanExclusionFiles". That way one could ignore entire locations and also could ignore known jars. It would be easier to understand by the user and reduce the implementation complexity. But it would break existing behavior, so it would only be viable in a next major release. > "/tomcat" entry in "org.apache.webbeans.scanExclusionPaths" disables scanning > on official tomcat docker image > - > > Key: OWB-1400 > URL: https://issues.apache.org/jira/browse/OWB-1400 > Project: OpenWebBeans > Issue Type: Improvement > Components: Core >Affects Versions: 2.0.23 > Environment: docker image tomcat:8.5-jdk17-corretto >Reporter: Jose Luis Freire >Priority: Major > > When deploying an application in a tomcat docker image, the application is > typically installed in "/usr/local/tomcat/webapps". > > The application libs will typically be located in > "/usr/local/tomcat/webapps/ROOT/WEB-INF/lib". > The "/tomcat" entry in the exclusion path results in all the application > beans getting ignored if the jar files don't have the "META-INF/beans.xml" > (which isn't required in the default setup). > > I propose changing "/tomcat" to "/tomcat/lib" to avoid this overreaching > optimization. -- This message was sent by Atlassian Jira (v8.20.1#820001)
[jira] [Commented] (OWB-1400) "/tomcat" entry in "org.apache.webbeans.scanExclusionPaths" disables scanning on official tomcat docker image
[ https://issues.apache.org/jira/browse/OWB-1400?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17478614#comment-17478614 ] Romain Manni-Bucau commented on OWB-1400: - Hi We can't change to `/tomcat/lib` since the intent is more to exclude `tomcat-.jar`. We have a way to get the jar/folder name so we can exclude from there (we do it in last version - [https://github.com/apache/openwebbeans/blob/master/webbeans-impl/src/main/java/org/apache/webbeans/corespi/scanner/AbstractMetaDataDiscovery.java#L239)] so we can maybe more match the jar name (or parent when class, web-inf, meta-inf) rather than anything else. Wdyt? > "/tomcat" entry in "org.apache.webbeans.scanExclusionPaths" disables scanning > on official tomcat docker image > - > > Key: OWB-1400 > URL: https://issues.apache.org/jira/browse/OWB-1400 > Project: OpenWebBeans > Issue Type: Improvement > Components: Core >Affects Versions: 2.0.23 > Environment: docker image tomcat:8.5-jdk17-corretto >Reporter: Jose Luis Freire >Priority: Major > > When deploying an application in a tomcat docker image, the application is > typically installed in "/usr/local/tomcat/webapps". > > The application libs will typically be located in > "/usr/local/tomcat/webapps/ROOT/WEB-INF/lib". > The "/tomcat" entry in the exclusion path results in all the application > beans getting ignored if the jar files don't have the "META-INF/beans.xml" > (which isn't required in the default setup). > > I propose changing "/tomcat" to "/tomcat/lib" to avoid this overreaching > optimization. -- This message was sent by Atlassian Jira (v8.20.1#820001)