[ https://issues.apache.org/jira/browse/MBUILDCACHE-64?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17751181#comment-17751181 ]
ASF GitHub Bot commented on MBUILDCACHE-64: ------------------------------------------- kbuntrock commented on PR #91: URL: https://github.com/apache/maven-build-cache-extension/pull/91#issuecomment-1665985477 > I'm a bit skeptical about the way which has been chosen to filter files. I think it would be more intuitive to use a glob `PathMatcher` rather than a `startsWith()` call on the path. This seems inconsistent with what is usually done in the maven land, for example https://maven.apache.org/plugins/maven-jar-plugin/examples/include-exclude.html Sure, I can do this. It will also bring a bit more flexibility. I suggest that I stay focused on the exclude section and I don't touch the input section. PS : Since I'm new there, hello everyone and great job! This project is a really good idea. I'm dying to be able to use it on my projects. :) > 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 > Assignee: Olivier Lamy > Priority: Major > Labels: pull-request-available > Fix For: 1.1.0 > > > 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)