[ 
https://issues.apache.org/jira/browse/MBUILDCACHE-64?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17750014#comment-17750014
 ] 

ASF GitHub Bot commented on MBUILDCACHE-64:
-------------------------------------------

kbuntrock opened a new pull request, #91:
URL: https://github.com/apache/maven-build-cache-extension/pull/91

   ### Description of this pull request
   
   Fix a bug regarding the exclusion mechanism not working properly on folders. 
   It also add an integration test on this functionality (global + per project).
   Finally add some documentation on these aspects.
   
   Here a screenshot of the new "exclude" element in the documentation to 
understand how this fix intend to work.
   
![image](https://github.com/apache/maven-build-cache-extension/assets/15209500/ad93f305-0bd3-44b1-9f2e-ac056102d0fe)
   
   I did not implemented the following sentence in the Jira issue since I did 
not got the exact meaning : 
   "That function could be enhanced with an additional criterion like in 
MavenProjectInput.java#L510"
   
   Nevertheless, I think this MR is already a huge improvement on the exclusion 
topic since it's a critical feature and it was not possible to use it on 
folders before (pretty hard to use it in a project with a "node_module" folder 
for example).
   
   
   Following this checklist to help us incorporate your 
   contribution quickly and easily:
   
    - [x] Make sure there is a [MBUILDCACHE JIRA 
issue](https://issues.apache.org/jira/browse/MBUILDCACHE) filed 
          for the change (usually before you start working on it).  Trivial 
changes like typos do not 
          require a JIRA issue.  Your pull request should address just this 
issue, without 
          pulling in other changes.
    - [x] Each commit in the pull request should have a meaningful subject line 
and body.
    - [x] Format the pull request title like `[MBUILDCACHE-XXX] - Fixes bug in 
ApproximateQuantiles`,
          where you replace `MBUILDCACHE-XXX` with the appropriate JIRA issue. 
Best practice
          is to use the JIRA issue title in the pull request title and in the 
first line of the 
          commit message.
    - [x] Write a pull request description that is detailed enough to 
understand what the pull request does, how, and why.
    - [x] Run `mvn clean verify` to make sure basic checks pass. A more 
thorough check will 
          be performed on your pull request automatically.
    - [x] You have run the [Core IT][core-its] successfully.
   
   If your pull request is about ~20 lines of code you don't need to sign an
   [Individual Contributor License 
Agreement](https://www.apache.org/licenses/icla.pdf) if you are unsure
   please ask on the developers list.
   
   To make clear that you license your contribution under 
   the [Apache License Version 2.0, January 
2004](http://www.apache.org/licenses/LICENSE-2.0)
   you have to acknowledge this by using the following check-box.
   
    - [ ] I hereby declare this contribution to be licenced under the [Apache 
License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)
   
    - [x] In any other case, please file an [Apache Individual Contributor 
License Agreement](https://www.apache.org/licenses/icla.pdf).
   
   [core-its]: https://maven.apache.org/core-its/core-it-suite/
   




> Apply global exclusions to folder names
> ---------------------------------------
>
>                 Key: MBUILDCACHE-64
>                 URL: https://issues.apache.org/jira/browse/MBUILDCACHE-64
>             Project: Maven Build Cache Extension
>          Issue Type: Bug
>    Affects Versions: 1.0.1
>            Reporter: Frank Wagner
>            Priority: Major
>
> It is currently not possible to exclude folders by their name, like 
> {quote}<input>
> <global>
> <excludes>
> <exclude>node_modules</exclude>
> <exclude>dist</exclude>
> <exclude>build</exclude>
> </excludes>
> </global>
> ...
> {quote}
> That's because isFilteredOutSubpath(), 
> [https://github.com/apache/maven-build-cache-extension/blob/master/src/main/java/org/apache/maven/buildcache/checksum/MavenProjectInput.java#L638,]
>  uses startWith on normalized absolute paths.
> That function could be enhanced with an additional criterion like in 
> [https://github.com/apache/maven-build-cache-extension/blob/master/src/main/java/org/apache/maven/buildcache/checksum/MavenProjectInput.java#L510]
> {{filteredOutPaths.stream().anyMatch(it -> 
> it.getFileName().equals(entry.getFileName()))}}
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to