summaryrefslogtreecommitdiffstats
path: root/plugins/sonar-cobertura-plugin
diff options
context:
space:
mode:
authorEvgeny Mandrikov <mandrikov@gmail.com>2011-02-07 13:20:26 +0300
committerEvgeny Mandrikov <mandrikov@gmail.com>2011-02-07 15:22:26 +0300
commitbbfce797275cf13e8c7a0e43aa29406175c89bfc (patch)
tree43701033fd66970038db281621be9a7856c14db4 /plugins/sonar-cobertura-plugin
parentc7bbd059c973036d8a0829dcd3f09cacaa0630be (diff)
downloadsonarqube-bbfce797275cf13e8c7a0e43aa29406175c89bfc.tar.gz
sonarqube-bbfce797275cf13e8c7a0e43aa29406175c89bfc.zip
SONAR-2172: New extension point - Initializer
* Rename AbstractInitializer to Initializer * Execute Initializers before Sensors
Diffstat (limited to 'plugins/sonar-cobertura-plugin')
-rw-r--r--plugins/sonar-cobertura-plugin/src/main/java/org/sonar/plugins/cobertura/CoberturaMavenInitializer.java9
1 files changed, 3 insertions, 6 deletions
diff --git a/plugins/sonar-cobertura-plugin/src/main/java/org/sonar/plugins/cobertura/CoberturaMavenInitializer.java b/plugins/sonar-cobertura-plugin/src/main/java/org/sonar/plugins/cobertura/CoberturaMavenInitializer.java
index 502cae448ad..6452a08a0cd 100644
--- a/plugins/sonar-cobertura-plugin/src/main/java/org/sonar/plugins/cobertura/CoberturaMavenInitializer.java
+++ b/plugins/sonar-cobertura-plugin/src/main/java/org/sonar/plugins/cobertura/CoberturaMavenInitializer.java
@@ -21,10 +21,8 @@ package org.sonar.plugins.cobertura;
import org.apache.commons.configuration.Configuration;
import org.sonar.api.CoreProperties;
-import org.sonar.api.batch.AbstractInitializer;
import org.sonar.api.batch.CoverageExtension;
-import org.sonar.api.batch.Phase;
-import org.sonar.api.batch.Phase.Name;
+import org.sonar.api.batch.Initializer;
import org.sonar.api.batch.maven.DependsUponMavenPlugin;
import org.sonar.api.batch.maven.MavenPlugin;
import org.sonar.api.batch.maven.MavenPluginHandler;
@@ -35,8 +33,7 @@ import org.sonar.plugins.cobertura.api.CoberturaUtils;
* Provides {@link CoberturaMavenPluginHandler} and configures correct path to report.
* Enabled only in Maven environment.
*/
-@Phase(name = Name.PRE)
-public class CoberturaMavenInitializer extends AbstractInitializer implements CoverageExtension, DependsUponMavenPlugin {
+public class CoberturaMavenInitializer extends Initializer implements CoverageExtension, DependsUponMavenPlugin {
private CoberturaMavenPluginHandler handler;
@@ -58,7 +55,7 @@ public class CoberturaMavenInitializer extends AbstractInitializer implements Co
}
@Override
- public void prepare(Project project) {
+ public void execute(Project project) {
Configuration conf = project.getConfiguration();
if (conf.containsKey(CoreProperties.COBERTURA_REPORT_PATH_PROPERTY)) {
String report = getReportPathFromPluginConfiguration(project);