aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Schwarz <daniel.schwarz@sonarsource.com>2017-11-24 09:25:26 +0100
committerDaniel Schwarz <bartfastiel@users.noreply.github.com>2017-11-29 20:24:11 +0100
commit082ace5471dcc5b5b5f4d1c3cfaf82ddfae0df36 (patch)
treef4b53691a76f3f6600264333b03acc025891c351
parent636c9ebb8b0ef6da08e376a0cdafbc27aa722421 (diff)
downloadsonarqube-082ace5471dcc5b5b5f4d1c3cfaf82ddfae0df36.tar.gz
sonarqube-082ace5471dcc5b5b5f4d1c3cfaf82ddfae0df36.zip
Copy generated sonar-ws sources to sonar-ws-generated, automatically
-rwxr-xr-xsonar-ws-generator/run.sh1
-rw-r--r--sonar-ws-generator/src/main/java/org/sonarqube/wsgenerator/CodeFormatter.java7
2 files changed, 4 insertions, 4 deletions
diff --git a/sonar-ws-generator/run.sh b/sonar-ws-generator/run.sh
index 4513503eec6..e79b51a3d34 100755
--- a/sonar-ws-generator/run.sh
+++ b/sonar-ws-generator/run.sh
@@ -7,3 +7,4 @@ set -euo pipefail
mvn clean package -Prun-ws-generator
java -Dorchestrator.configUrl=file://$* -jar target/sonar-ws-generator-*-SNAPSHOT-jar-with-dependencies.jar
+cp -R target/generated-sources/results/org/sonarqube/ws/client/* ../sonar-ws-generated/src/main/java/org/sonarqube/ws/client
diff --git a/sonar-ws-generator/src/main/java/org/sonarqube/wsgenerator/CodeFormatter.java b/sonar-ws-generator/src/main/java/org/sonarqube/wsgenerator/CodeFormatter.java
index 1d062a2f9aa..aebeabf2323 100644
--- a/sonar-ws-generator/src/main/java/org/sonarqube/wsgenerator/CodeFormatter.java
+++ b/sonar-ws-generator/src/main/java/org/sonarqube/wsgenerator/CodeFormatter.java
@@ -30,7 +30,6 @@ import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.StringWriter;
import java.io.Writer;
-import java.util.Arrays;
import java.util.HashSet;
import java.util.Properties;
import java.util.Set;
@@ -39,12 +38,11 @@ import org.apache.velocity.VelocityContext;
import org.apache.velocity.app.VelocityEngine;
import static java.nio.charset.StandardCharsets.UTF_8;
+import static java.util.Arrays.asList;
public class CodeFormatter {
- private static final Set<String> PATH_EXCLUSIONS = new HashSet<>(Arrays.asList(
- "api/components", "api/issues", "api/measures", "api/organizations", "api/permissions", "api/projects",
- "api/project_analyses", "api/qualityprofiles", "api/rules", "api/settings", "api/users", "api/user_groups"));
+ private static final Set<String> PATH_EXCLUSIONS = new HashSet<>(asList("api/orchestrator"));
public static void format(String json) {
JsonObject jsonElement = new Gson().fromJson(json, JsonObject.class);
@@ -57,6 +55,7 @@ public class CodeFormatter {
String webServicePath = webService.get("path").getAsString();
if (PATH_EXCLUSIONS.contains(webServicePath)) {
+ System.out.println("Excluding WS " + webServicePath + " from code generation");
continue;
}