diff options
author | Duarte Meneses <duarte.meneses@sonarsource.com> | 2015-06-15 14:59:17 +0200 |
---|---|---|
committer | Duarte Meneses <duarte.meneses@sonarsource.com> | 2015-06-18 17:26:05 +0200 |
commit | e4ba9869d57dc4dd92648b5c8406d26fcd550d46 (patch) | |
tree | 489e0e87f6b7df0a95095de50d0264ff355fa568 /sonar-runner-batch/src/main/java/org | |
parent | 5b6747b46db7fef9238e3bbaf66d2822e03d0a6e (diff) | |
download | sonar-scanner-cli-e4ba9869d57dc4dd92648b5c8406d26fcd550d46.tar.gz sonar-scanner-cli-e4ba9869d57dc4dd92648b5c8406d26fcd550d46.zip |
SONARUNNER-136 and SONARUNNER-137 - Provide a new API to run several analysis with same process and an interactive mode
Diffstat (limited to 'sonar-runner-batch/src/main/java/org')
-rw-r--r-- | sonar-runner-batch/src/main/java/org/sonar/runner/batch/BatchIsolatedLauncher.java (renamed from sonar-runner-batch/src/main/java/org/sonar/runner/batch/IsolatedLauncher.java) | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/sonar-runner-batch/src/main/java/org/sonar/runner/batch/IsolatedLauncher.java b/sonar-runner-batch/src/main/java/org/sonar/runner/batch/BatchIsolatedLauncher.java index 8298d63..069f16a 100644 --- a/sonar-runner-batch/src/main/java/org/sonar/runner/batch/IsolatedLauncher.java +++ b/sonar-runner-batch/src/main/java/org/sonar/runner/batch/BatchIsolatedLauncher.java @@ -39,14 +39,28 @@ import org.sonar.batch.bootstrapper.EnvironmentInformation; * This class is executed within the classloader provided by the server. It contains the installed plugins and * the same version of sonar-batch as the server. */ -public class IsolatedLauncher { +public class BatchIsolatedLauncher implements IsolatedLauncher { private static final String WARN = "WARN"; private static final String DEBUG = "DEBUG"; private static final String FALSE = "false"; - public void execute(Properties properties, List<Object> extensions) { - createBatch(properties, extensions).execute(); + private Batch batch = null; + + @Override + public void start(Properties globalProperties, List<Object> extensions) { + batch = createBatch(globalProperties, extensions); + batch.start(); + } + + @Override + public void stop() { + batch.stop(); + } + + @Override + public void execute(Properties properties) { + batch.executeTask((Map) properties); } Batch createBatch(Properties properties, List<Object> extensions) { |