Frank Wagner created MBUILDCACHE-64:
---------------------------------------

             Summary: 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


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