kbuntrock commented on code in PR #91: URL: https://github.com/apache/maven-build-cache-extension/pull/91#discussion_r1303583940
########## src/main/java/org/apache/maven/buildcache/checksum/MavenProjectInput.java: ########## @@ -633,13 +714,7 @@ private static boolean isReadable(Path entry) throws IOException { } private boolean isFilteredOutSubpath(Path path) { - Path normalized = path.normalize(); - for (Path filteredOutDir : filteredOutPaths) { - if (normalized.startsWith(filteredOutDir)) { - return true; - } - } - return false; + return inputExcludeDirectoryPathMatchers.stream().anyMatch(matcher -> matcher.stopTreeWalking(path)); Review Comment: I'm not following. Could you give me some code snippets to illustrate your reasoning? ########## src/main/java/org/apache/maven/buildcache/checksum/MavenProjectInput.java: ########## @@ -165,45 +184,94 @@ public MavenProjectInput( this.repoSystem = repoSystem; this.remoteCache = remoteCache; Properties properties = project.getProperties(); - this.dirGlob = properties.getProperty(CACHE_INPUT_GLOB_NAME, config.getDefaultGlob()); + this.defaultFilenameGlob = properties.getProperty(CACHE_INPUT_GLOB_NAME, config.getDefaultGlob()); this.processPlugins = Boolean.parseBoolean(properties.getProperty(CACHE_PROCESS_PLUGINS, config.isProcessPlugins())); this.tmpDir = System.getProperty("java.io.tmpdir"); + this.baseDirectoryGlob = baseDirPath.toString().replace("\\", "/") + "/"; + org.apache.maven.model.Build build = project.getBuild(); - filteredOutPaths = new ArrayList<>(Arrays.asList( - normalizedPath(build.getDirectory()), // target by default - normalizedPath(build.getOutputDirectory()), - normalizedPath(build.getTestOutputDirectory()))); + addToExcludedSection( Review Comment: Good call. Added it. I did a naive implementation to keep the code simple. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org