aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-batch
diff options
context:
space:
mode:
authorJulien HENRY <julien.henry@sonarsource.com>2013-01-21 15:18:17 +0100
committerJulien HENRY <julien.henry@sonarsource.com>2013-01-21 15:21:25 +0100
commiteb09f615d5ab981e45b69209acadcce82ac6b386 (patch)
tree8f17ccac964d03ef4691261f1d5cce2c008d6512 /sonar-batch
parentc2bd3befa3bc4cc04e2b111d0d1238683cfb379d (diff)
downloadsonarqube-eb09f615d5ab981e45b69209acadcce82ac6b386.tar.gz
sonarqube-eb09f615d5ab981e45b69209acadcce82ac6b386.zip
SONAR-4069 Fix IoC dependencies of devcockpit and improve output of list tasks.
Diffstat (limited to 'sonar-batch')
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/bootstrap/TaskModule.java14
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/tasks/ListTasksTask.java6
2 files changed, 12 insertions, 8 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 d93ec527849..d9233cb7f11 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
@@ -100,6 +100,13 @@ public class TaskModule extends Module {
container.addSingleton(DefaultUserFinder.class);
container.addSingleton(ResourceTypes.class);
container.addSingleton(SemaphoresImpl.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);
}
private void registerDatabaseComponents() {
@@ -141,13 +148,6 @@ public class TaskModule extends Module {
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);
diff --git a/sonar-batch/src/main/java/org/sonar/batch/tasks/ListTasksTask.java b/sonar-batch/src/main/java/org/sonar/batch/tasks/ListTasksTask.java
index 74f961a577d..e5f76f1cb42 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/tasks/ListTasksTask.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/tasks/ListTasksTask.java
@@ -39,9 +39,13 @@ public class ListTasksTask implements Task {
}
public void execute() {
+ System.out.println();
+ System.out.println("List of available tasks:");
+ System.out.println();
for (TaskDefinition taskDef : taskManager.getTaskDefinitions()) {
- System.out.println(" " + taskDef.getCommand() + ": " + taskDef.getDescription());
+ System.out.println(" - " + taskDef.getCommand() + ": " + taskDef.getDescription());
}
+ System.out.println();
}
}