report.addListener( reportSink );
ruleContext.setReport( report );
reportSink.beginDocument();
RuleSetFactory ruleSetFactory = new RuleSetFactory();
ruleSetFactory.setMinimumPriority( this.minimumPriority );
RuleSet[] sets = new RuleSet[rulesets.length];
try
{
for ( int idx = 0; idx < rulesets.length; idx++ )
{
String set = rulesets[idx];
getLog().debug( "Preparing ruleset: " + set );
File ruleset = locator.getResourceAsFile( set, getLocationTemp( set ) );
if ( null == ruleset )
{
throw new MavenReportException( "Could not resolve " + set );
}
InputStream rulesInput = new FileInputStream( ruleset );
try
{
RuleSet ruleSet = ruleSetFactory.createRuleSet( rulesInput );
sets[idx] = ruleSet;
ruleSet.start( ruleContext );
}
finally