aboutsummaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
Diffstat (limited to 'server')
-rw-r--r--server/sonar-webserver-api/src/main/java/org/sonar/server/plugins/DetectPluginChange.java1
-rw-r--r--server/sonar-webserver-api/src/main/java/org/sonar/server/plugins/PluginConsentVerifier.java1
-rw-r--r--server/sonar-webserver-api/src/main/java/org/sonar/server/plugins/PluginJarLoader.java4
-rw-r--r--server/sonar-webserver-api/src/main/java/org/sonar/server/plugins/PluginType.java24
-rw-r--r--server/sonar-webserver-api/src/main/java/org/sonar/server/plugins/PluginUninstaller.java2
-rw-r--r--server/sonar-webserver-api/src/main/java/org/sonar/server/plugins/ServerPlugin.java1
-rw-r--r--server/sonar-webserver-api/src/main/java/org/sonar/server/plugins/ServerPluginInfo.java1
-rw-r--r--server/sonar-webserver-api/src/main/java/org/sonar/server/plugins/ServerPluginManager.java1
-rw-r--r--server/sonar-webserver-api/src/main/java/org/sonar/server/plugins/ServerPluginRepository.java1
-rw-r--r--server/sonar-webserver-api/src/test/java/org/sonar/server/plugins/DetectPluginChangeTest.java1
-rw-r--r--server/sonar-webserver-api/src/test/java/org/sonar/server/plugins/PluginConsentVerifierTest.java4
-rw-r--r--server/sonar-webserver-api/src/test/java/org/sonar/server/plugins/PluginUninstallerTest.java5
-rw-r--r--server/sonar-webserver-api/src/test/java/org/sonar/server/plugins/ServerPluginInfoTest.java5
-rw-r--r--server/sonar-webserver-api/src/test/java/org/sonar/server/plugins/ServerPluginManagerTest.java2
-rw-r--r--server/sonar-webserver-api/src/test/java/org/sonar/server/plugins/ServerPluginRepositoryTest.java5
-rw-r--r--server/sonar-webserver-core/src/main/java/org/sonar/server/platform/monitoring/BundledSection.java2
-rw-r--r--server/sonar-webserver-core/src/main/java/org/sonar/server/platform/monitoring/PluginsSection.java2
-rw-r--r--server/sonar-webserver-core/src/main/java/org/sonar/server/startup/RegisterPlugins.java2
-rw-r--r--server/sonar-webserver-core/src/test/java/org/sonar/server/platform/monitoring/BundledSectionTest.java2
-rw-r--r--server/sonar-webserver-core/src/test/java/org/sonar/server/platform/monitoring/PluginsSectionTest.java2
-rw-r--r--server/sonar-webserver-core/src/test/java/org/sonar/server/startup/GeneratePluginIndexTest.java2
-rw-r--r--server/sonar-webserver-core/src/test/java/org/sonar/server/startup/RegisterPluginsTest.java2
-rw-r--r--server/sonar-webserver-webapi/src/main/java/org/sonar/server/plugins/ws/InstalledAction.java2
-rw-r--r--server/sonar-webserver-webapi/src/main/java/org/sonar/server/plugins/ws/PluginWSCommons.java1
-rw-r--r--server/sonar-webserver-webapi/src/test/java/org/sonar/server/plugins/ws/DownloadActionTest.java2
-rw-r--r--server/sonar-webserver-webapi/src/test/java/org/sonar/server/plugins/ws/InstalledActionTest.java2
26 files changed, 33 insertions, 46 deletions
diff --git a/server/sonar-webserver-api/src/main/java/org/sonar/server/plugins/DetectPluginChange.java b/server/sonar-webserver-api/src/main/java/org/sonar/server/plugins/DetectPluginChange.java
index 897bc6217ef..bd17e009809 100644
--- a/server/sonar-webserver-api/src/main/java/org/sonar/server/plugins/DetectPluginChange.java
+++ b/server/sonar-webserver-api/src/main/java/org/sonar/server/plugins/DetectPluginChange.java
@@ -26,6 +26,7 @@ import org.sonar.api.utils.Preconditions;
import org.sonar.api.utils.log.Logger;
import org.sonar.api.utils.log.Loggers;
import org.sonar.api.utils.log.Profiler;
+import org.sonar.core.plugin.PluginType;
import org.sonar.db.DbClient;
import org.sonar.db.DbSession;
import org.sonar.db.plugin.PluginDto;
diff --git a/server/sonar-webserver-api/src/main/java/org/sonar/server/plugins/PluginConsentVerifier.java b/server/sonar-webserver-api/src/main/java/org/sonar/server/plugins/PluginConsentVerifier.java
index c50fb1209df..992a2415576 100644
--- a/server/sonar-webserver-api/src/main/java/org/sonar/server/plugins/PluginConsentVerifier.java
+++ b/server/sonar-webserver-api/src/main/java/org/sonar/server/plugins/PluginConsentVerifier.java
@@ -25,6 +25,7 @@ import org.sonar.api.Startable;
import org.sonar.api.utils.log.Logger;
import org.sonar.api.utils.log.Loggers;
import org.sonar.core.extension.PluginRiskConsent;
+import org.sonar.core.plugin.PluginType;
import org.sonar.db.DbClient;
import org.sonar.db.DbSession;
import org.sonar.db.property.PropertyDto;
diff --git a/server/sonar-webserver-api/src/main/java/org/sonar/server/plugins/PluginJarLoader.java b/server/sonar-webserver-api/src/main/java/org/sonar/server/plugins/PluginJarLoader.java
index 19d14265082..0b7b6a7c7d0 100644
--- a/server/sonar-webserver-api/src/main/java/org/sonar/server/plugins/PluginJarLoader.java
+++ b/server/sonar-webserver-api/src/main/java/org/sonar/server/plugins/PluginJarLoader.java
@@ -45,8 +45,8 @@ import static java.lang.String.format;
import static org.apache.commons.io.FileUtils.moveFile;
import static org.sonar.core.util.FileUtils.deleteQuietly;
import static org.sonar.server.log.ServerProcessLogging.STARTUP_LOGGER_NAME;
-import static org.sonar.server.plugins.PluginType.BUNDLED;
-import static org.sonar.server.plugins.PluginType.EXTERNAL;
+import static org.sonar.core.plugin.PluginType.BUNDLED;
+import static org.sonar.core.plugin.PluginType.EXTERNAL;
public class PluginJarLoader {
private static final Logger LOG = Loggers.get(PluginJarLoader.class);
diff --git a/server/sonar-webserver-api/src/main/java/org/sonar/server/plugins/PluginType.java b/server/sonar-webserver-api/src/main/java/org/sonar/server/plugins/PluginType.java
deleted file mode 100644
index c3956cf9fd9..00000000000
--- a/server/sonar-webserver-api/src/main/java/org/sonar/server/plugins/PluginType.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2022 SonarSource SA
- * mailto:info AT sonarsource DOT com
- *
- * This program 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.
- *
- * This program 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 this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-package org.sonar.server.plugins;
-
-public enum PluginType {
- EXTERNAL, BUNDLED
-}
diff --git a/server/sonar-webserver-api/src/main/java/org/sonar/server/plugins/PluginUninstaller.java b/server/sonar-webserver-api/src/main/java/org/sonar/server/plugins/PluginUninstaller.java
index c33155e39ad..a4359d0f204 100644
--- a/server/sonar-webserver-api/src/main/java/org/sonar/server/plugins/PluginUninstaller.java
+++ b/server/sonar-webserver-api/src/main/java/org/sonar/server/plugins/PluginUninstaller.java
@@ -36,7 +36,7 @@ import org.sonar.server.platform.ServerFileSystem;
import static java.lang.String.format;
import static org.apache.commons.io.FileUtils.forceMkdir;
import static org.apache.commons.io.FileUtils.moveFileToDirectory;
-import static org.sonar.server.plugins.PluginType.EXTERNAL;
+import static org.sonar.core.plugin.PluginType.EXTERNAL;
public class PluginUninstaller implements Startable {
private static final Logger LOG = Loggers.get(PluginUninstaller.class);
diff --git a/server/sonar-webserver-api/src/main/java/org/sonar/server/plugins/ServerPlugin.java b/server/sonar-webserver-api/src/main/java/org/sonar/server/plugins/ServerPlugin.java
index e1a512c7553..6d348d03094 100644
--- a/server/sonar-webserver-api/src/main/java/org/sonar/server/plugins/ServerPlugin.java
+++ b/server/sonar-webserver-api/src/main/java/org/sonar/server/plugins/ServerPlugin.java
@@ -23,6 +23,7 @@ import javax.annotation.CheckForNull;
import javax.annotation.Nullable;
import org.sonar.api.Plugin;
import org.sonar.core.platform.PluginInfo;
+import org.sonar.core.plugin.PluginType;
import org.sonar.server.plugins.PluginFilesAndMd5.FileAndMd5;
public class ServerPlugin {
diff --git a/server/sonar-webserver-api/src/main/java/org/sonar/server/plugins/ServerPluginInfo.java b/server/sonar-webserver-api/src/main/java/org/sonar/server/plugins/ServerPluginInfo.java
index 35057d91d69..8f452758a3e 100644
--- a/server/sonar-webserver-api/src/main/java/org/sonar/server/plugins/ServerPluginInfo.java
+++ b/server/sonar-webserver-api/src/main/java/org/sonar/server/plugins/ServerPluginInfo.java
@@ -23,6 +23,7 @@ import java.io.File;
import java.io.IOException;
import java.util.Objects;
import org.sonar.core.platform.PluginInfo;
+import org.sonar.core.plugin.PluginType;
import org.sonar.updatecenter.common.PluginManifest;
public class ServerPluginInfo extends PluginInfo {
diff --git a/server/sonar-webserver-api/src/main/java/org/sonar/server/plugins/ServerPluginManager.java b/server/sonar-webserver-api/src/main/java/org/sonar/server/plugins/ServerPluginManager.java
index 8e5ed0a01f1..3b97129c13d 100644
--- a/server/sonar-webserver-api/src/main/java/org/sonar/server/plugins/ServerPluginManager.java
+++ b/server/sonar-webserver-api/src/main/java/org/sonar/server/plugins/ServerPluginManager.java
@@ -31,6 +31,7 @@ import org.sonar.api.utils.log.Loggers;
import org.sonar.core.platform.ExplodedPlugin;
import org.sonar.core.platform.PluginClassLoader;
import org.sonar.core.platform.PluginJarExploder;
+import org.sonar.core.plugin.PluginType;
/**
* Entry point to install and load plugins on server startup. It manages
diff --git a/server/sonar-webserver-api/src/main/java/org/sonar/server/plugins/ServerPluginRepository.java b/server/sonar-webserver-api/src/main/java/org/sonar/server/plugins/ServerPluginRepository.java
index 282d9cd45d0..698b3a69abf 100644
--- a/server/sonar-webserver-api/src/main/java/org/sonar/server/plugins/ServerPluginRepository.java
+++ b/server/sonar-webserver-api/src/main/java/org/sonar/server/plugins/ServerPluginRepository.java
@@ -31,6 +31,7 @@ import javax.annotation.CheckForNull;
import org.sonar.api.Plugin;
import org.sonar.core.platform.PluginInfo;
import org.sonar.core.platform.PluginRepository;
+import org.sonar.core.plugin.PluginType;
import static com.google.common.base.Preconditions.checkArgument;
import static java.lang.String.format;
diff --git a/server/sonar-webserver-api/src/test/java/org/sonar/server/plugins/DetectPluginChangeTest.java b/server/sonar-webserver-api/src/test/java/org/sonar/server/plugins/DetectPluginChangeTest.java
index d1dc93a74b9..825fea4c355 100644
--- a/server/sonar-webserver-api/src/test/java/org/sonar/server/plugins/DetectPluginChangeTest.java
+++ b/server/sonar-webserver-api/src/test/java/org/sonar/server/plugins/DetectPluginChangeTest.java
@@ -23,6 +23,7 @@ import org.junit.Rule;
import org.junit.Test;
import org.sonar.api.Plugin;
import org.sonar.core.platform.PluginInfo;
+import org.sonar.core.plugin.PluginType;
import org.sonar.db.DbTester;
import org.sonar.db.plugin.PluginDto;
import org.sonar.server.plugins.PluginFilesAndMd5.FileAndMd5;
diff --git a/server/sonar-webserver-api/src/test/java/org/sonar/server/plugins/PluginConsentVerifierTest.java b/server/sonar-webserver-api/src/test/java/org/sonar/server/plugins/PluginConsentVerifierTest.java
index cf99c57d993..1a06bb19fb1 100644
--- a/server/sonar-webserver-api/src/test/java/org/sonar/server/plugins/PluginConsentVerifierTest.java
+++ b/server/sonar-webserver-api/src/test/java/org/sonar/server/plugins/PluginConsentVerifierTest.java
@@ -37,8 +37,8 @@ import static org.sonar.core.config.CorePropertyDefinitions.PLUGINS_RISK_CONSENT
import static org.sonar.core.extension.PluginRiskConsent.ACCEPTED;
import static org.sonar.core.extension.PluginRiskConsent.NOT_ACCEPTED;
import static org.sonar.core.extension.PluginRiskConsent.REQUIRED;
-import static org.sonar.server.plugins.PluginType.BUNDLED;
-import static org.sonar.server.plugins.PluginType.EXTERNAL;
+import static org.sonar.core.plugin.PluginType.BUNDLED;
+import static org.sonar.core.plugin.PluginType.EXTERNAL;
public class PluginConsentVerifierTest {
@Rule
diff --git a/server/sonar-webserver-api/src/test/java/org/sonar/server/plugins/PluginUninstallerTest.java b/server/sonar-webserver-api/src/test/java/org/sonar/server/plugins/PluginUninstallerTest.java
index e76cba50895..5bf536717e1 100644
--- a/server/sonar-webserver-api/src/test/java/org/sonar/server/plugins/PluginUninstallerTest.java
+++ b/server/sonar-webserver-api/src/test/java/org/sonar/server/plugins/PluginUninstallerTest.java
@@ -32,6 +32,7 @@ import org.junit.rules.TemporaryFolder;
import org.sonar.api.Plugin;
import org.sonar.api.utils.log.LogTester;
import org.sonar.core.platform.PluginInfo;
+import org.sonar.core.plugin.PluginType;
import org.sonar.server.platform.ServerFileSystem;
import org.sonar.updatecenter.common.Version;
@@ -39,8 +40,8 @@ import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
-import static org.sonar.server.plugins.PluginType.BUNDLED;
-import static org.sonar.server.plugins.PluginType.EXTERNAL;
+import static org.sonar.core.plugin.PluginType.BUNDLED;
+import static org.sonar.core.plugin.PluginType.EXTERNAL;
public class PluginUninstallerTest {
@Rule
diff --git a/server/sonar-webserver-api/src/test/java/org/sonar/server/plugins/ServerPluginInfoTest.java b/server/sonar-webserver-api/src/test/java/org/sonar/server/plugins/ServerPluginInfoTest.java
index 9a52570fd5b..cd5ae793ee0 100644
--- a/server/sonar-webserver-api/src/test/java/org/sonar/server/plugins/ServerPluginInfoTest.java
+++ b/server/sonar-webserver-api/src/test/java/org/sonar/server/plugins/ServerPluginInfoTest.java
@@ -20,10 +20,11 @@
package org.sonar.server.plugins;
import org.junit.Test;
+import org.sonar.core.plugin.PluginType;
import static org.assertj.core.api.Assertions.assertThat;
-import static org.sonar.server.plugins.PluginType.BUNDLED;
-import static org.sonar.server.plugins.PluginType.EXTERNAL;
+import static org.sonar.core.plugin.PluginType.BUNDLED;
+import static org.sonar.core.plugin.PluginType.EXTERNAL;
public class ServerPluginInfoTest {
@Test
diff --git a/server/sonar-webserver-api/src/test/java/org/sonar/server/plugins/ServerPluginManagerTest.java b/server/sonar-webserver-api/src/test/java/org/sonar/server/plugins/ServerPluginManagerTest.java
index a219caadbca..1075795185c 100644
--- a/server/sonar-webserver-api/src/test/java/org/sonar/server/plugins/ServerPluginManagerTest.java
+++ b/server/sonar-webserver-api/src/test/java/org/sonar/server/plugins/ServerPluginManagerTest.java
@@ -40,7 +40,7 @@ import static org.assertj.core.api.Assertions.tuple;
import static org.mockito.ArgumentMatchers.anyList;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
-import static org.sonar.server.plugins.PluginType.EXTERNAL;
+import static org.sonar.core.plugin.PluginType.EXTERNAL;
public class ServerPluginManagerTest {
diff --git a/server/sonar-webserver-api/src/test/java/org/sonar/server/plugins/ServerPluginRepositoryTest.java b/server/sonar-webserver-api/src/test/java/org/sonar/server/plugins/ServerPluginRepositoryTest.java
index bbc8b8b4413..f5250e05951 100644
--- a/server/sonar-webserver-api/src/test/java/org/sonar/server/plugins/ServerPluginRepositoryTest.java
+++ b/server/sonar-webserver-api/src/test/java/org/sonar/server/plugins/ServerPluginRepositoryTest.java
@@ -27,13 +27,14 @@ import org.junit.Assert;
import org.junit.Test;
import org.sonar.api.Plugin;
import org.sonar.core.platform.PluginInfo;
+import org.sonar.core.plugin.PluginType;
import org.sonar.server.plugins.PluginFilesAndMd5.FileAndMd5;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
-import static org.sonar.server.plugins.PluginType.BUNDLED;
-import static org.sonar.server.plugins.PluginType.EXTERNAL;
+import static org.sonar.core.plugin.PluginType.BUNDLED;
+import static org.sonar.core.plugin.PluginType.EXTERNAL;
public class ServerPluginRepositoryTest {
private ServerPluginRepository repository = new ServerPluginRepository();
diff --git a/server/sonar-webserver-core/src/main/java/org/sonar/server/platform/monitoring/BundledSection.java b/server/sonar-webserver-core/src/main/java/org/sonar/server/platform/monitoring/BundledSection.java
index fc8876cb5a1..1270fc706cd 100644
--- a/server/sonar-webserver-core/src/main/java/org/sonar/server/platform/monitoring/BundledSection.java
+++ b/server/sonar-webserver-core/src/main/java/org/sonar/server/platform/monitoring/BundledSection.java
@@ -23,7 +23,7 @@ import org.sonar.api.server.ServerSide;
import org.sonar.core.platform.PluginInfo;
import org.sonar.process.systeminfo.SystemInfoSection;
import org.sonar.process.systeminfo.protobuf.ProtobufSystemInfo;
-import org.sonar.server.plugins.PluginType;
+import org.sonar.core.plugin.PluginType;
import org.sonar.server.plugins.ServerPluginRepository;
import org.sonar.updatecenter.common.Version;
diff --git a/server/sonar-webserver-core/src/main/java/org/sonar/server/platform/monitoring/PluginsSection.java b/server/sonar-webserver-core/src/main/java/org/sonar/server/platform/monitoring/PluginsSection.java
index dfb6bd73e5b..3a9d8c7e39b 100644
--- a/server/sonar-webserver-core/src/main/java/org/sonar/server/platform/monitoring/PluginsSection.java
+++ b/server/sonar-webserver-core/src/main/java/org/sonar/server/platform/monitoring/PluginsSection.java
@@ -23,7 +23,7 @@ import org.sonar.api.server.ServerSide;
import org.sonar.core.platform.PluginInfo;
import org.sonar.process.systeminfo.SystemInfoSection;
import org.sonar.process.systeminfo.protobuf.ProtobufSystemInfo;
-import org.sonar.server.plugins.PluginType;
+import org.sonar.core.plugin.PluginType;
import org.sonar.server.plugins.ServerPluginRepository;
import org.sonar.updatecenter.common.Version;
diff --git a/server/sonar-webserver-core/src/main/java/org/sonar/server/startup/RegisterPlugins.java b/server/sonar-webserver-core/src/main/java/org/sonar/server/startup/RegisterPlugins.java
index e7090915508..dc82b842d47 100644
--- a/server/sonar-webserver-core/src/main/java/org/sonar/server/startup/RegisterPlugins.java
+++ b/server/sonar-webserver-core/src/main/java/org/sonar/server/startup/RegisterPlugins.java
@@ -32,7 +32,7 @@ import org.sonar.core.util.UuidFactory;
import org.sonar.db.DbClient;
import org.sonar.db.DbSession;
import org.sonar.db.plugin.PluginDto;
-import org.sonar.server.plugins.PluginType;
+import org.sonar.core.plugin.PluginType;
import org.sonar.server.plugins.ServerPlugin;
import org.sonar.server.plugins.ServerPluginRepository;
diff --git a/server/sonar-webserver-core/src/test/java/org/sonar/server/platform/monitoring/BundledSectionTest.java b/server/sonar-webserver-core/src/test/java/org/sonar/server/platform/monitoring/BundledSectionTest.java
index 6c5f09f08bb..1535aeb151b 100644
--- a/server/sonar-webserver-core/src/test/java/org/sonar/server/platform/monitoring/BundledSectionTest.java
+++ b/server/sonar-webserver-core/src/test/java/org/sonar/server/platform/monitoring/BundledSectionTest.java
@@ -23,7 +23,7 @@ import java.util.Arrays;
import org.junit.Test;
import org.sonar.core.platform.PluginInfo;
import org.sonar.process.systeminfo.protobuf.ProtobufSystemInfo;
-import org.sonar.server.plugins.PluginType;
+import org.sonar.core.plugin.PluginType;
import org.sonar.server.plugins.ServerPluginRepository;
import org.sonar.updatecenter.common.Version;
diff --git a/server/sonar-webserver-core/src/test/java/org/sonar/server/platform/monitoring/PluginsSectionTest.java b/server/sonar-webserver-core/src/test/java/org/sonar/server/platform/monitoring/PluginsSectionTest.java
index 2ecfbbf7d32..b555bef73ec 100644
--- a/server/sonar-webserver-core/src/test/java/org/sonar/server/platform/monitoring/PluginsSectionTest.java
+++ b/server/sonar-webserver-core/src/test/java/org/sonar/server/platform/monitoring/PluginsSectionTest.java
@@ -23,7 +23,7 @@ import java.util.Arrays;
import org.junit.Test;
import org.sonar.core.platform.PluginInfo;
import org.sonar.process.systeminfo.protobuf.ProtobufSystemInfo;
-import org.sonar.server.plugins.PluginType;
+import org.sonar.core.plugin.PluginType;
import org.sonar.server.plugins.ServerPluginRepository;
import org.sonar.updatecenter.common.Version;
diff --git a/server/sonar-webserver-core/src/test/java/org/sonar/server/startup/GeneratePluginIndexTest.java b/server/sonar-webserver-core/src/test/java/org/sonar/server/startup/GeneratePluginIndexTest.java
index 828b2b591ea..3ee07bdac88 100644
--- a/server/sonar-webserver-core/src/test/java/org/sonar/server/startup/GeneratePluginIndexTest.java
+++ b/server/sonar-webserver-core/src/test/java/org/sonar/server/startup/GeneratePluginIndexTest.java
@@ -38,7 +38,7 @@ import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
-import static org.sonar.server.plugins.PluginType.BUNDLED;
+import static org.sonar.core.plugin.PluginType.BUNDLED;
public class GeneratePluginIndexTest {
diff --git a/server/sonar-webserver-core/src/test/java/org/sonar/server/startup/RegisterPluginsTest.java b/server/sonar-webserver-core/src/test/java/org/sonar/server/startup/RegisterPluginsTest.java
index b402bb89250..138453f914b 100644
--- a/server/sonar-webserver-core/src/test/java/org/sonar/server/startup/RegisterPluginsTest.java
+++ b/server/sonar-webserver-core/src/test/java/org/sonar/server/startup/RegisterPluginsTest.java
@@ -37,7 +37,7 @@ import org.sonar.db.DbTester;
import org.sonar.db.plugin.PluginDto;
import org.sonar.db.plugin.PluginDto.Type;
import org.sonar.server.plugins.PluginFilesAndMd5;
-import org.sonar.server.plugins.PluginType;
+import org.sonar.core.plugin.PluginType;
import org.sonar.server.plugins.ServerPlugin;
import org.sonar.server.plugins.ServerPluginRepository;
diff --git a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/plugins/ws/InstalledAction.java b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/plugins/ws/InstalledAction.java
index 273c810167c..19306b34ea7 100644
--- a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/plugins/ws/InstalledAction.java
+++ b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/plugins/ws/InstalledAction.java
@@ -37,7 +37,7 @@ import org.sonar.db.DbClient;
import org.sonar.db.DbSession;
import org.sonar.db.plugin.PluginDto;
import org.sonar.db.plugin.PluginDto.Type;
-import org.sonar.server.plugins.PluginType;
+import org.sonar.core.plugin.PluginType;
import org.sonar.server.plugins.ServerPlugin;
import org.sonar.server.plugins.ServerPluginRepository;
import org.sonar.server.plugins.UpdateCenterMatrixFactory;
diff --git a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/plugins/ws/PluginWSCommons.java b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/plugins/ws/PluginWSCommons.java
index 1a922aa83b8..0eb217dabe3 100644
--- a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/plugins/ws/PluginWSCommons.java
+++ b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/plugins/ws/PluginWSCommons.java
@@ -81,6 +81,7 @@ public class PluginWSCommons {
ofNullable(installedPlugin).ifPresent(serverPlugin -> {
builder.setFilename(installedPlugin.getJar().getFile().getName());
builder.setHash(installedPlugin.getJar().getMd5());
+ builder.setType(installedPlugin.getType().name());
});
ofNullable(pluginInfo.getVersion()).ifPresent(v -> builder.setVersion(isNotBlank(pluginInfo.getDisplayVersion()) ? pluginInfo.getDisplayVersion() : v.getName()));
diff --git a/server/sonar-webserver-webapi/src/test/java/org/sonar/server/plugins/ws/DownloadActionTest.java b/server/sonar-webserver-webapi/src/test/java/org/sonar/server/plugins/ws/DownloadActionTest.java
index 9acb6cae0c1..188f8788016 100644
--- a/server/sonar-webserver-webapi/src/test/java/org/sonar/server/plugins/ws/DownloadActionTest.java
+++ b/server/sonar-webserver-webapi/src/test/java/org/sonar/server/plugins/ws/DownloadActionTest.java
@@ -31,7 +31,7 @@ import org.sonar.api.server.ws.WebService;
import org.sonar.core.platform.PluginInfo;
import org.sonar.server.exceptions.NotFoundException;
import org.sonar.server.plugins.PluginFilesAndMd5.FileAndMd5;
-import org.sonar.server.plugins.PluginType;
+import org.sonar.core.plugin.PluginType;
import org.sonar.server.plugins.ServerPlugin;
import org.sonar.server.plugins.ServerPluginRepository;
import org.sonar.server.ws.TestRequest;
diff --git a/server/sonar-webserver-webapi/src/test/java/org/sonar/server/plugins/ws/InstalledActionTest.java b/server/sonar-webserver-webapi/src/test/java/org/sonar/server/plugins/ws/InstalledActionTest.java
index f287b02a097..423fb7658ca 100644
--- a/server/sonar-webserver-webapi/src/test/java/org/sonar/server/plugins/ws/InstalledActionTest.java
+++ b/server/sonar-webserver-webapi/src/test/java/org/sonar/server/plugins/ws/InstalledActionTest.java
@@ -42,7 +42,7 @@ import org.sonar.core.platform.PluginInfo;
import org.sonar.db.DbTester;
import org.sonar.db.plugin.PluginDto.Type;
import org.sonar.server.plugins.PluginFilesAndMd5.FileAndMd5;
-import org.sonar.server.plugins.PluginType;
+import org.sonar.core.plugin.PluginType;
import org.sonar.server.plugins.ServerPlugin;
import org.sonar.server.plugins.ServerPluginRepository;
import org.sonar.server.plugins.UpdateCenterMatrixFactory;