aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvgeny Mandrikov <mandrikov@gmail.com>2011-03-29 15:01:55 +0400
committerEvgeny Mandrikov <mandrikov@gmail.com>2011-03-29 15:01:55 +0400
commita37a451c2e118a06689e6eb581b891c9f729586e (patch)
tree277805940b9cbebf0cf31f080f929103d5a87e28
parent349b260a5e16d57d0cd9cb9dd6de4c82d2856b2b (diff)
downloadsonarqube-a37a451c2e118a06689e6eb581b891c9f729586e.tar.gz
sonarqube-a37a451c2e118a06689e6eb581b891c9f729586e.zip
Fix execution of PhasesTimeProfiler
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/Batch.java26
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/ProjectBatch.java14
2 files changed, 9 insertions, 31 deletions
diff --git a/sonar-batch/src/main/java/org/sonar/batch/Batch.java b/sonar-batch/src/main/java/org/sonar/batch/Batch.java
index d36128953ea..c2b15adda09 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/Batch.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/Batch.java
@@ -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);
diff --git a/sonar-batch/src/main/java/org/sonar/batch/ProjectBatch.java b/sonar-batch/src/main/java/org/sonar/batch/ProjectBatch.java
index 1ffbcb954ad..109b098debf 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/ProjectBatch.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/ProjectBatch.java
@@ -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()) {