aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-ws-generator/src
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2017-12-04 15:33:35 +0100
committerDaniel Schwarz <bartfastiel@users.noreply.github.com>2017-12-06 14:40:17 +0100
commit092655abdb8dbb58d5c30ded8f2c293abf979040 (patch)
tree0fa6acf70d8359e892920607ab2b24d66a0d2442 /sonar-ws-generator/src
parent79f9c59c24977943bc5ae8d34bffcce9a4d6ba38 (diff)
downloadsonarqube-092655abdb8dbb58d5c30ded8f2c293abf979040.tar.gz
sonarqube-092655abdb8dbb58d5c30ded8f2c293abf979040.zip
Simplify usage of sonar-ws-generator
Diffstat (limited to 'sonar-ws-generator/src')
-rw-r--r--sonar-ws-generator/src/main/java/org/sonarqube/wsgenerator/ApiDefinitionDownloader.java8
1 files changed, 3 insertions, 5 deletions
diff --git a/sonar-ws-generator/src/main/java/org/sonarqube/wsgenerator/ApiDefinitionDownloader.java b/sonar-ws-generator/src/main/java/org/sonarqube/wsgenerator/ApiDefinitionDownloader.java
index 2d8259db71a..ca05435222b 100644
--- a/sonar-ws-generator/src/main/java/org/sonarqube/wsgenerator/ApiDefinitionDownloader.java
+++ b/sonar-ws-generator/src/main/java/org/sonarqube/wsgenerator/ApiDefinitionDownloader.java
@@ -22,6 +22,8 @@ package org.sonarqube.wsgenerator;
import com.sonar.orchestrator.Orchestrator;
import com.sonar.orchestrator.http.HttpCall;
import com.sonar.orchestrator.http.HttpResponse;
+import com.sonar.orchestrator.locator.FileLocation;
+import java.io.File;
public class ApiDefinitionDownloader {
@@ -30,13 +32,9 @@ public class ApiDefinitionDownloader {
}
public static String downloadApiDefinition() {
- String orchestratorUrl = System.getProperty("orchestrator.configUrl");
- if (orchestratorUrl == null) {
- throw new IllegalStateException("Please run with -Dorchestrator.configUrl=file:///path/to/your/orchestrator.properties");
- }
Orchestrator orchestrator = Orchestrator
.builderEnv()
- .setSonarVersion("DEV")
+ .setZipFile(FileLocation.byWildcardMavenFilename(new File("../sonar-application/target"), "sonarqube-*.zip").getFile())
.build();
orchestrator.start();