diff options
author | Julien HENRY <julien.henry@sonarsource.com> | 2013-01-18 17:41:29 +0100 |
---|---|---|
committer | Julien HENRY <julien.henry@sonarsource.com> | 2013-01-18 17:41:29 +0100 |
commit | 8d076f4b35ae6c9d3149eb5ac56b11942b5025dc (patch) | |
tree | 2b1a1f671c73eb6d64b8d4255c881faa76a8f0b1 /sonar-batch | |
parent | 87a78815d4e7700b40620497db59b49119a31c12 (diff) | |
download | sonarqube-8d076f4b35ae6c9d3149eb5ac56b11942b5025dc.tar.gz sonarqube-8d076f4b35ae6c9d3149eb5ac56b11942b5025dc.zip |
SONAR-4069 Make some components only available when there is a project
Diffstat (limited to 'sonar-batch')
-rw-r--r-- | sonar-batch/src/main/java/org/sonar/batch/bootstrap/TaskModule.java | 41 |
1 files changed, 19 insertions, 22 deletions
diff --git a/sonar-batch/src/main/java/org/sonar/batch/bootstrap/TaskModule.java b/sonar-batch/src/main/java/org/sonar/batch/bootstrap/TaskModule.java index 1193b23b4fc..6c7073d6127 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/bootstrap/TaskModule.java +++ b/sonar-batch/src/main/java/org/sonar/batch/bootstrap/TaskModule.java @@ -94,33 +94,12 @@ public class TaskModule extends Module { container.addSingleton(EmailSettings.class); container.addSingleton(I18nManager.class); container.addSingleton(RuleI18nManager.class); - container.addSingleton(DefaultResourceCreationLock.class); - - container.addSingleton(DefaultPersistenceManager.class); - container.addSingleton(DependencyPersister.class); - container.addSingleton(EventPersister.class); - container.addSingleton(LinkPersister.class); - container.addSingleton(MeasurePersister.class); - - container.addSingleton(MemoryOptimizer.class); - container.addSingleton(DefaultResourcePermissions.class); - container.addSingleton(DefaultResourcePersister.class); - container.addSingleton(SourcePersister.class); container.addSingleton(MeasuresDao.class); container.addSingleton(CacheRuleFinder.class); container.addSingleton(CacheMetricFinder.class); - container.addSingleton(PastSnapshotFinderByDate.class); - container.addSingleton(PastSnapshotFinderByDays.class); - container.addSingleton(PastSnapshotFinderByPreviousAnalysis.class); - container.addSingleton(PastSnapshotFinderByVersion.class); - container.addSingleton(PastSnapshotFinderByPreviousVersion.class); - container.addSingleton(PastMeasuresLoader.class); - container.addSingleton(PastSnapshotFinder.class); - container.addSingleton(DefaultNotificationManager.class); container.addSingleton(DefaultUserFinder.class); container.addSingleton(ResourceTypes.class); container.addSingleton(SemaphoresImpl.class); - container.addSingleton(MetricProvider.class); } private void registerDatabaseComponents() { @@ -152,6 +131,25 @@ public class TaskModule extends Module { } private void registerCoreComponentsRequiringProject() { + container.addSingleton(DefaultResourceCreationLock.class); + container.addSingleton(DefaultPersistenceManager.class); + container.addSingleton(DependencyPersister.class); + container.addSingleton(EventPersister.class); + container.addSingleton(LinkPersister.class); + container.addSingleton(MeasurePersister.class); + container.addSingleton(MemoryOptimizer.class); + container.addSingleton(DefaultResourcePermissions.class); + container.addSingleton(DefaultResourcePersister.class); + container.addSingleton(SourcePersister.class); + container.addSingleton(PastSnapshotFinderByDate.class); + container.addSingleton(PastSnapshotFinderByDays.class); + container.addSingleton(PastSnapshotFinderByPreviousAnalysis.class); + container.addSingleton(PastSnapshotFinderByVersion.class); + container.addSingleton(PastSnapshotFinderByPreviousVersion.class); + container.addSingleton(PastMeasuresLoader.class); + container.addSingleton(PastSnapshotFinder.class); + container.addSingleton(DefaultNotificationManager.class); + container.addSingleton(MetricProvider.class); container.addSingleton(ProjectExclusions.class); container.addSingleton(ProjectReactorReady.class); container.addSingleton(ProjectTree.class); @@ -159,7 +157,6 @@ public class TaskModule extends Module { container.addSingleton(DefaultIndex.class); container.addSingleton(DefaultFileLinesContextFactory.class); container.addSingleton(ProjectLock.class); - container.addSingleton(DryRunDatabase.class); } |