diff options
author | Evgeny Mandrikov <mandrikov@gmail.com> | 2011-02-07 13:20:26 +0300 |
---|---|---|
committer | Evgeny Mandrikov <mandrikov@gmail.com> | 2011-02-07 15:22:26 +0300 |
commit | bbfce797275cf13e8c7a0e43aa29406175c89bfc (patch) | |
tree | 43701033fd66970038db281621be9a7856c14db4 /plugins | |
parent | c7bbd059c973036d8a0829dcd3f09cacaa0630be (diff) | |
download | sonarqube-bbfce797275cf13e8c7a0e43aa29406175c89bfc.tar.gz sonarqube-bbfce797275cf13e8c7a0e43aa29406175c89bfc.zip |
SONAR-2172: New extension point - Initializer
* Rename AbstractInitializer to Initializer
* Execute Initializers before Sensors
Diffstat (limited to 'plugins')
2 files changed, 6 insertions, 12 deletions
diff --git a/plugins/sonar-clover-plugin/src/main/java/org/sonar/plugins/clover/CloverMavenInitializer.java b/plugins/sonar-clover-plugin/src/main/java/org/sonar/plugins/clover/CloverMavenInitializer.java index 90026cc17fd..28ae571629f 100644 --- a/plugins/sonar-clover-plugin/src/main/java/org/sonar/plugins/clover/CloverMavenInitializer.java +++ b/plugins/sonar-clover-plugin/src/main/java/org/sonar/plugins/clover/CloverMavenInitializer.java @@ -20,10 +20,8 @@ package org.sonar.plugins.clover; import org.apache.commons.configuration.Configuration; -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; @@ -33,8 +31,7 @@ import org.sonar.api.resources.Project; * Provides {@link CloverMavenPluginHandler} and configures correct path to report. * Enabled only in Maven environment. */ -@Phase(name = Name.PRE) -public class CloverMavenInitializer extends AbstractInitializer implements CoverageExtension, DependsUponMavenPlugin { +public class CloverMavenInitializer extends Initializer implements CoverageExtension, DependsUponMavenPlugin { private CloverMavenPluginHandler handler; @@ -56,7 +53,7 @@ public class CloverMavenInitializer extends AbstractInitializer implements Cover } @Override - public void prepare(Project project) { + public void execute(Project project) { Configuration conf = project.getConfiguration(); if (!conf.containsKey(CloverConstants.REPORT_PATH_PROPERTY)) { String report = getReportPathFromPluginConfiguration(project); 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); |