aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWouter Admiraal <wouter.admiraal@sonarsource.com>2019-10-21 16:53:08 +0200
committerSonarTech <sonartech@sonarsource.com>2019-10-28 20:21:09 +0100
commit5394a58739dd14d397ae5594cb92b408b29ccc58 (patch)
tree897c33b6433d7b33197ba5e786dd9a5b56012cb9
parent2d093331a97808ba400752e9393a0a8dbc930893 (diff)
downloadsonarqube-5394a58739dd14d397ae5594cb92b408b29ccc58.tar.gz
sonarqube-5394a58739dd14d397ae5594cb92b408b29ccc58.zip
SONAR-12395 Update to sonar-update-center 1.23, handle new download URLs
-rw-r--r--build.gradle2
-rw-r--r--server/sonar-webserver-webapi/src/main/java/org/sonar/server/platform/ws/UpgradesAction.java10
2 files changed, 9 insertions, 3 deletions
diff --git a/build.gradle b/build.gradle
index b9bfd5617e7..ac095b7bbc7 100644
--- a/build.gradle
+++ b/build.gradle
@@ -280,7 +280,7 @@ subprojects {
dependency 'org.reflections:reflections:0.9.9'
dependency 'org.simpleframework:simple:4.1.21'
dependency 'org.sonarsource.orchestrator:sonar-orchestrator:3.27.0.2172'
- dependency 'org.sonarsource.update-center:sonar-update-center-common:1.18.0.487'
+ dependency 'org.sonarsource.update-center:sonar-update-center-common:1.23.0.723'
dependency 'org.subethamail:subethasmtp:3.1.7'
dependency 'org.yaml:snakeyaml:1.17'
dependency 'xml-apis:xml-apis:1.4.01'
diff --git a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/platform/ws/UpgradesAction.java b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/platform/ws/UpgradesAction.java
index a6fd5f95ec6..5e1232deea1 100644
--- a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/platform/ws/UpgradesAction.java
+++ b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/platform/ws/UpgradesAction.java
@@ -49,7 +49,10 @@ public class UpgradesAction implements SystemWsAction {
private static final String PROPERTY_DESCRIPTION = "description";
private static final String PROPERTY_RELEASE_DATE = "releaseDate";
private static final String PROPERTY_CHANGE_LOG_URL = "changeLogUrl";
- private static final String PROPERTY_DOWNLOAD_URL = "downloadUrl";
+ private static final String PROPERTY_COMMUNITY_DOWNLOAD_URL = "downloadUrl";
+ private static final String PROPERTY_DEVELOPER_DOWNLOAD_URL = "downloadDeveloperUrl";
+ private static final String PROPERTY_ENTERPRISE_DOWNLOAD_URL = "downloadEnterpriseUrl";
+ private static final String PROPERTY_DATACENTER_DOWNLOAD_URL = "downloadDatacenterUrl";
private static final String OBJECT_PLUGINS = "plugins";
private static final String ARRAY_REQUIRE_UPDATE = "requireUpdate";
private static final String ARRAY_INCOMPATIBLE = "incompatible";
@@ -65,7 +68,10 @@ public class UpgradesAction implements SystemWsAction {
jsonWriter.prop(PROPERTY_DESCRIPTION, release.getDescription());
jsonWriter.propDate(PROPERTY_RELEASE_DATE, release.getDate());
jsonWriter.prop(PROPERTY_CHANGE_LOG_URL, release.getChangelogUrl());
- jsonWriter.prop(PROPERTY_DOWNLOAD_URL, release.getDownloadUrl());
+ jsonWriter.prop(PROPERTY_COMMUNITY_DOWNLOAD_URL, release.getDownloadUrl(Release.Edition.COMMUNITY));
+ jsonWriter.prop(PROPERTY_DEVELOPER_DOWNLOAD_URL, release.getDownloadUrl(Release.Edition.DEVELOPER));
+ jsonWriter.prop(PROPERTY_ENTERPRISE_DOWNLOAD_URL, release.getDownloadUrl(Release.Edition.ENTERPRISE));
+ jsonWriter.prop(PROPERTY_DATACENTER_DOWNLOAD_URL, release.getDownloadUrl(Release.Edition.DATACENTER));
}
@Override