[ 
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)

Reply via email to