? new StaleSourceScanner(1024, Collections.singleton("**/*." + extension), Collections.<String>emptySet())
: new SimpleSourceInclusionScanner(Collections.singleton("**/*." + extension), Collections.<String>emptySet());
scanner.addSourceMapping(new SuffixMapping("." + extension, "." + extension));
MustacheFactory mustacheFactory = new DefaultMustacheFactory();
try {
Set<File> files = scanner.getIncludedSources(sourceDirectory, outputDirectory);
for (File file : files) {
try {
mustacheFactory.compile(new FileReader(file), file.getAbsolutePath());
} catch (MustacheException e) {
throw new MojoFailureException(e.getMessage(), e);
}
}