diff options
author | Julien HENRY <julien.henry@sonarsource.com> | 2013-01-14 15:09:05 +0100 |
---|---|---|
committer | Julien HENRY <julien.henry@sonarsource.com> | 2013-01-14 15:09:05 +0100 |
commit | 40dd5f8f8dd1a78d5b9dd7ebf6d8ea14436f5ee1 (patch) | |
tree | f62ee39f3010a56230a0bb9f210aa97d70217d0c /sonar-batch | |
parent | ad07d0c73c1b8d9dc46077e966999be5de95a1ad (diff) | |
download | sonarqube-40dd5f8f8dd1a78d5b9dd7ebf6d8ea14436f5ee1.tar.gz sonarqube-40dd5f8f8dd1a78d5b9dd7ebf6d8ea14436f5ee1.zip |
SONAR-4069 Fix multi-module projects.
Diffstat (limited to 'sonar-batch')
3 files changed, 1 insertions, 51 deletions
diff --git a/sonar-batch/src/main/java/org/sonar/batch/bootstrap/AnalyseProjectModule.java b/sonar-batch/src/main/java/org/sonar/batch/bootstrap/AnalyseProjectModule.java index 7752404cc09..74aff0245da 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/bootstrap/AnalyseProjectModule.java +++ b/sonar-batch/src/main/java/org/sonar/batch/bootstrap/AnalyseProjectModule.java @@ -53,7 +53,7 @@ public class AnalyseProjectModule extends Module { analyze(subProject); } - ProjectModule projectModule = new ProjectModule(rootProject); + ProjectModule projectModule = new ProjectModule(project); try { installChild(projectModule); projectModule.start(); diff --git a/sonar-batch/src/main/java/org/sonar/batch/bootstrap/TaskBootstrapModule.java b/sonar-batch/src/main/java/org/sonar/batch/bootstrap/TaskBootstrapModule.java index 398ae8ba86e..5c98364162f 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/bootstrap/TaskBootstrapModule.java +++ b/sonar-batch/src/main/java/org/sonar/batch/bootstrap/TaskBootstrapModule.java @@ -24,7 +24,6 @@ import org.sonar.api.batch.TaskDefinition; import org.sonar.api.batch.bootstrap.ProjectReactor; import org.sonar.api.utils.SonarException; import org.sonar.batch.tasks.AnalyseProjectTaskDefinition; -import org.sonar.batch.tasks.HelloWorldTask; import org.sonar.batch.tasks.TaskManager; /** @@ -47,7 +46,6 @@ public class TaskBootstrapModule extends Module { private void registerCoreTaskDefinitions() { container.addSingleton(AnalyseProjectTaskDefinition.class); - container.addSingleton(HelloWorldTask.class); } private void registerTaskDefinitionExtensions() { diff --git a/sonar-batch/src/main/java/org/sonar/batch/tasks/HelloWorldTask.java b/sonar-batch/src/main/java/org/sonar/batch/tasks/HelloWorldTask.java deleted file mode 100644 index 79ec7fbb48f..00000000000 --- a/sonar-batch/src/main/java/org/sonar/batch/tasks/HelloWorldTask.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Sonar, open source software quality management tool. - * Copyright (C) 2008-2012 SonarSource - * mailto:contact AT sonarsource DOT com - * - * Sonar is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * Sonar is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with Sonar; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 - */ -package org.sonar.batch.tasks; - -import org.sonar.api.batch.TaskDefinition; -import org.sonar.api.batch.TaskDescriptor; -import org.sonar.api.batch.TaskExecutor; - -public class HelloWorldTask implements TaskExecutor, TaskDefinition { - - public static final String COMMAND = "hello-world"; - - public HelloWorldTask() { - } - - public void execute() { - System.out.println("HELLO WORLD"); - } - - public TaskDescriptor getTaskDescriptor() { - return TaskDescriptor.create() - .setDescription("Hello World") - .setName("Hello") - .setCommand(COMMAND); - } - - public Class<? extends TaskExecutor> getExecutor() { - return HelloWorldTask.class; - } - -} |