]> source.dussan.org Git - sonarqube.git/commitdiff
Fix execution of PhasesTimeProfiler
authorEvgeny Mandrikov <mandrikov@gmail.com>
Tue, 29 Mar 2011 11:01:55 +0000 (15:01 +0400)
committerEvgeny Mandrikov <mandrikov@gmail.com>
Tue, 29 Mar 2011 11:01:55 +0000 (15:01 +0400)
sonar-batch/src/main/java/org/sonar/batch/Batch.java
sonar-batch/src/main/java/org/sonar/batch/ProjectBatch.java

index d36128953eafd84c25b5b15f9d1325a35b539267..c2b15adda09d6d3af6cb9181a5318e119f6dc242 100644 (file)
@@ -19,9 +19,6 @@
  */
 package org.sonar.batch;
 
-import java.net.URLClassLoader;
-import java.util.Arrays;
-
 import org.apache.commons.configuration.Configuration;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -33,23 +30,8 @@ import org.sonar.batch.bootstrap.BatchPluginRepository;
 import org.sonar.batch.bootstrap.BootstrapClassLoader;
 import org.sonar.batch.bootstrap.ExtensionDownloader;
 import org.sonar.batch.bootstrap.TempDirectories;
-import org.sonar.batch.components.PastMeasuresLoader;
-import org.sonar.batch.components.PastSnapshotFinder;
-import org.sonar.batch.components.PastSnapshotFinderByDate;
-import org.sonar.batch.components.PastSnapshotFinderByDays;
-import org.sonar.batch.components.PastSnapshotFinderByPreviousAnalysis;
-import org.sonar.batch.components.PastSnapshotFinderByVersion;
-import org.sonar.batch.events.EventBus;
-import org.sonar.batch.index.DefaultIndex;
-import org.sonar.batch.index.DefaultPersistenceManager;
-import org.sonar.batch.index.DefaultResourcePersister;
-import org.sonar.batch.index.DependencyPersister;
-import org.sonar.batch.index.EventPersister;
-import org.sonar.batch.index.LinkPersister;
-import org.sonar.batch.index.MeasurePersister;
-import org.sonar.batch.index.MemoryOptimizer;
-import org.sonar.batch.index.SourcePersister;
-import org.sonar.batch.index.ViolationPersister;
+import org.sonar.batch.components.*;
+import org.sonar.batch.index.*;
 import org.sonar.core.components.CacheMetricFinder;
 import org.sonar.core.components.CacheRuleFinder;
 import org.sonar.core.plugin.JpaPluginDao;
@@ -58,6 +40,9 @@ import org.sonar.jpa.session.DatabaseSessionProvider;
 import org.sonar.jpa.session.DriverDatabaseConnector;
 import org.sonar.jpa.session.ThreadLocalDatabaseSessionFactory;
 
+import java.net.URLClassLoader;
+import java.util.Arrays;
+
 public class Batch {
 
   private static final Logger LOG = LoggerFactory.getLogger(Batch.class);
@@ -104,7 +89,6 @@ public class Batch {
       addComponent(EventPersister.class);
       addComponent(LinkPersister.class);
       addComponent(MeasurePersister.class);
-      addComponent(EventBus.class);
       addComponent(MemoryOptimizer.class);
       addComponent(DefaultResourcePersister.class);
       addComponent(SourcePersister.class);
index 1ffbcb954adfec557240fd5c71a8e29b5d747d3b..109b098debf712ee4becc4aded5bb46a5607b6c0 100644 (file)
@@ -25,26 +25,19 @@ import org.sonar.api.measures.CoreMetrics;
 import org.sonar.api.measures.Metric;
 import org.sonar.api.measures.Metrics;
 import org.sonar.api.profiles.RulesProfile;
-import org.sonar.api.resources.DefaultProjectFileSystem;
-import org.sonar.api.resources.Language;
-import org.sonar.api.resources.Languages;
-import org.sonar.api.resources.Project;
-import org.sonar.api.resources.ProjectFileSystem;
+import org.sonar.api.resources.*;
 import org.sonar.api.rules.DefaultRulesManager;
 import org.sonar.api.utils.SonarException;
 import org.sonar.batch.bootstrap.BatchPluginRepository;
 import org.sonar.batch.components.PastViolationsLoader;
 import org.sonar.batch.components.TimeMachineConfiguration;
+import org.sonar.batch.events.EventBus;
 import org.sonar.batch.index.DefaultIndex;
 import org.sonar.batch.index.DefaultResourcePersister;
 import org.sonar.batch.phases.Phases;
 import org.sonar.batch.phases.PhasesTimeProfiler;
 import org.sonar.core.components.DefaultModelFinder;
-import org.sonar.jpa.dao.AsyncMeasuresDao;
-import org.sonar.jpa.dao.AsyncMeasuresService;
-import org.sonar.jpa.dao.DaoFacade;
-import org.sonar.jpa.dao.ProfilesDao;
-import org.sonar.jpa.dao.RulesDao;
+import org.sonar.jpa.dao.*;
 
 public class ProjectBatch {
 
@@ -146,6 +139,7 @@ public class ProjectBatch {
   private static class ProjectCoreComponents extends Module {
     @Override
     protected void configure() {
+      addComponent(EventBus.class);
       addComponent(Phases.class);
       addComponent(PhasesTimeProfiler.class);
       for (Class clazz : Phases.getPhaseClasses()) {