protected SourceInclusionScanner getSourceInclusionScanner()

in src/main/java/org/apache/maven/plugin/compiler/TestCompilerMojo.java [409:428]


    protected SourceInclusionScanner getSourceInclusionScanner(String inputFileEnding) {
        SourceInclusionScanner scanner;

        // it's not defined if we get the ending with or without the dot '.'
        String defaultIncludePattern = "**/*" + (inputFileEnding.startsWith(".") ? "" : ".") + inputFileEnding;

        if (testIncludes.isEmpty() && testExcludes.isEmpty() && testIncrementalExcludes.isEmpty()) {
            testIncludes = Collections.singleton(defaultIncludePattern);
            scanner = new SimpleSourceInclusionScanner(testIncludes, Collections.emptySet());
        } else {
            if (testIncludes.isEmpty()) {
                testIncludes.add(defaultIncludePattern);
            }
            Set<String> excludesIncr = new HashSet<>(testExcludes);
            excludesIncr.addAll(this.testIncrementalExcludes);
            scanner = new SimpleSourceInclusionScanner(testIncludes, excludesIncr);
        }

        return scanner;
    }