MuleExclusionMatcher implements PathMatcher { public boolean matches(Path file) { return muleExcludeMatchers.stream().anyMatch(pattern -> pattern.matches(file)); } MuleExclusionMatcher();  MuleExclusionMatcher(Path projectBaseFolder); boolean matches(Path file); static final GlobMatcher CLASSPATH_FILE_MATCHER; static final GlobMatcher PROJECT_FILE_MATCHER; }
@Test public void customMuleExcludeFileTest() throws IOException { File shouldMatchConfigFile1 = temporaryFolder.newFile("a.xml"); temporaryFolder.newFolder("src", "main", "mule"); File shouldMatchConfigFile2 = temporaryFolder.newFile("src/main/mule/lala.xml"); File shouldNotMatchConfigFile = temporaryFolder.newFile("b.xml"); writeLinesToMuleExcludeFile("a.xml", "**/*/lala.xml", "# comment"); buildMuleExclusionMatcher(); assertThat("This file should be matched", matcher.matches(shouldMatchConfigFile1.toPath()), equalTo(true)); assertThat("This file should be matched", matcher.matches(shouldMatchConfigFile2.toPath()), equalTo(true)); assertThat("This file should not be matched", matcher.matches(shouldNotMatchConfigFile.toPath()), equalTo(false)); }