Class GitIgnoreAwareFileVisitor

  • All Implemented Interfaces:
    FileVisitor<Path>

    public abstract class GitIgnoreAwareFileVisitor
    extends SimpleFileVisitor<Path>
    Shared recursive file visitor that enforces generic traversal behaviors, such as evaluating static `skipDirs` and dynamically parsing and enforcing local `.gitignore` rules in real-time.
    • Constructor Detail

      • GitIgnoreAwareFileVisitor

        public GitIgnoreAwareFileVisitor​(Path basePath,
                                         boolean gitignoreAutoExclude,
                                         Set<String> skipDirNames,
                                         List<PathMatcher> forceIncludeMatchers,
                                         org.apache.maven.plugin.logging.Log log)
        Constructs a new visitor with the specified configuration.
        Parameters:
        basePath - the base directory being scanned
        gitignoreAutoExclude - whether to automatically read and apply .gitignore rules
        skipDirNames - a set of directory names to always skip (e.g. "target", ".git")
        forceIncludeMatchers - a list of matchers for files that must be included regardless of exclusions
        log - the Maven logger