* exclusion patterns. In our case at hand we include only Java sources as these are the only files we want
* to instrument.
*/
private SourceInclusionScanner getScanner()
{
SourceInclusionScanner scanner;
Set includes = getConfiguration().getIncludes();
Set excludes = getConfiguration().getExcludes();
if ( includes.isEmpty() && excludes.isEmpty() )
{
includes = Collections.singleton( "**/*.java" );
scanner = new SimpleSourceInclusionScanner( includes, Collections.EMPTY_SET );
}
else
{
if ( includes.isEmpty() )
{
includes.add( "**/*.java" );
}
scanner = new SimpleSourceInclusionScanner( includes, excludes );
}
// Note: we shouldn't have to do this but this is a limitation of the Plexus SimpleSourceInclusionScanner
scanner.addSourceMapping( new SuffixMapping( "dummy", "dummy" ) );
return scanner;
}