org.sonar.plugins.api.maven
Interface MavenCollector

All Superinterfaces:
Extension, MavenExtension
All Known Implementing Classes:
AbstractImportSourceMavenCollector, AbstractJavaMavenCollector, AbstractMavenCollector, AbstractViolationsCollector, CpdMavenCollector

public interface MavenCollector
extends MavenExtension

Main interface for collecting data during the sonar maven plugin call


Method Summary
 void collect(MavenPom pom, ProjectContext context)
          Collects data after the MavenPluginHandler execution
 java.lang.Class<? extends MavenPluginHandler> dependsOnMavenPlugin(MavenPom pom)
          the collector should depend on the execution of a Maven plugin.
 boolean shouldCollectOn(MavenPom pom)
          Defines if the mavne collector should be launched on the given pom
 

Method Detail

dependsOnMavenPlugin

java.lang.Class<? extends MavenPluginHandler> dependsOnMavenPlugin(MavenPom pom)
the collector should depend on the execution of a Maven plugin. In such a case this method returns an handler that defines the Maven plugin. Return null if no maven plugin to execute.


shouldCollectOn

boolean shouldCollectOn(MavenPom pom)
Defines if the mavne collector should be launched on the given pom

Parameters:
pom - the pom to test
Returns:
true if the collector should be executed

collect

void collect(MavenPom pom,
             ProjectContext context)
Collects data after the MavenPluginHandler execution

Parameters:
pom - the pom being collected
context - the context to collect data


Copyright © 2009 SonarSource SA. All Rights Reserved.