aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--server/sonar-ce/src/test/java/org/sonar/ce/container/CePluginJarExploderTest.java5
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/platform/ServerFileSystem.java7
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/platform/ServerFileSystemImpl.java5
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/plugins/ServerPluginRepository.java19
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/plugins/ServerPluginRepositoryTest.java25
-rw-r--r--sonar-application/build.gradle3
6 files changed, 1 insertions, 63 deletions
diff --git a/server/sonar-ce/src/test/java/org/sonar/ce/container/CePluginJarExploderTest.java b/server/sonar-ce/src/test/java/org/sonar/ce/container/CePluginJarExploderTest.java
index a5828ba8c78..6f961fc7332 100644
--- a/server/sonar-ce/src/test/java/org/sonar/ce/container/CePluginJarExploderTest.java
+++ b/server/sonar-ce/src/test/java/org/sonar/ce/container/CePluginJarExploderTest.java
@@ -135,11 +135,6 @@ public class CePluginJarExploderTest {
}
@Override
- public File getBundledPluginsDir() {
- throw new UnsupportedOperationException();
- }
-
- @Override
public File getPluginIndex() {
throw new UnsupportedOperationException();
}
diff --git a/server/sonar-server/src/main/java/org/sonar/server/platform/ServerFileSystem.java b/server/sonar-server/src/main/java/org/sonar/server/platform/ServerFileSystem.java
index 17524356cc2..350a1c36787 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/platform/ServerFileSystem.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/platform/ServerFileSystem.java
@@ -72,13 +72,6 @@ public interface ServerFileSystem {
File getInstalledPluginsDir();
/**
- * Directory of the plugins packaged by default with application. These
- * plugins are installed during the first fresh startup.
- * @return a directory which may or not exist
- */
- File getBundledPluginsDir();
-
- /**
* The file listing all the installed plugins. Used by scanner only.
* @return an existing file
* @deprecated see {@link org.sonar.server.startup.GeneratePluginIndex}
diff --git a/server/sonar-server/src/main/java/org/sonar/server/platform/ServerFileSystemImpl.java b/server/sonar-server/src/main/java/org/sonar/server/platform/ServerFileSystemImpl.java
index 6764f85b804..d7f982ad4f1 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/platform/ServerFileSystemImpl.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/platform/ServerFileSystemImpl.java
@@ -96,11 +96,6 @@ public class ServerFileSystemImpl implements ServerFileSystem, org.sonar.api.pla
}
@Override
- public File getBundledPluginsDir() {
- return new File(getHomeDir(), "lib/bundled-plugins");
- }
-
- @Override
public File getPluginIndex() {
return new File(deployDir, "plugins/index.txt");
}
diff --git a/server/sonar-server/src/main/java/org/sonar/server/plugins/ServerPluginRepository.java b/server/sonar-server/src/main/java/org/sonar/server/plugins/ServerPluginRepository.java
index 0be17a3958d..ef7faf3c594 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/plugins/ServerPluginRepository.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/plugins/ServerPluginRepository.java
@@ -61,7 +61,6 @@ import static org.sonar.core.util.FileUtils.deleteQuietly;
/**
* Entry point to install and load plugins on server startup. It manages
* <ul>
- * <li>installation of bundled plugins on first server startup</li>
* <li>installation of new plugins (effective after server startup)</li>
* <li>un-installation of plugins (effective after server startup)</li>
* <li>cancel pending installations/un-installations</li>
@@ -106,7 +105,6 @@ public class ServerPluginRepository implements PluginRepository, Startable {
@Override
public void start() {
loadPreInstalledPlugins();
- copyBundledPlugins();
moveDownloadedPlugins();
moveDownloadedEditionPlugins();
unloadIncompatiblePlugins();
@@ -163,23 +161,6 @@ public class ServerPluginRepository implements PluginRepository, Startable {
}
}
- /**
- * Copies the plugins bundled with SonarQube distribution to directory extensions/plugins.
- * Does nothing if not a fresh installation.
- */
- private void copyBundledPlugins() {
- if (upgradeStatus.isFreshInstall()) {
- for (File sourceFile : listJarFiles(fs.getBundledPluginsDir())) {
- PluginInfo info = PluginInfo.create(sourceFile);
- // lib/bundled-plugins should be copied only if the plugin is not already
- // available in extensions/plugins
- if (!pluginInfosByKeys.containsKey(info.getKey())) {
- overrideAndRegisterPlugin(sourceFile, false);
- }
- }
- }
- }
-
private void registerPluginInfo(PluginInfo info) {
String pluginKey = info.getKey();
if (blacklistedPluginKeys.contains(pluginKey)) {
diff --git a/server/sonar-server/src/test/java/org/sonar/server/plugins/ServerPluginRepositoryTest.java b/server/sonar-server/src/test/java/org/sonar/server/plugins/ServerPluginRepositoryTest.java
index 432dd6496eb..69dd7856b9c 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/plugins/ServerPluginRepositoryTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/plugins/ServerPluginRepositoryTest.java
@@ -66,7 +66,6 @@ public class ServerPluginRepositoryTest {
@Before
public void setUp() throws IOException {
- when(fs.getBundledPluginsDir()).thenReturn(temp.newFolder());
when(fs.getDeployedPluginsDir()).thenReturn(temp.newFolder());
when(fs.getDownloadedPluginsDir()).thenReturn(temp.newFolder());
when(fs.getHomeDir()).thenReturn(temp.newFolder());
@@ -80,30 +79,6 @@ public class ServerPluginRepositoryTest {
underTest.stop();
}
- /**
- * The first server startup (fresh db) installs bundled plugins and instantiates bundled plugins.
- */
- @Test
- public void first_startup_installs_bundled_plugins() throws Exception {
- copyTestPluginTo("test-base-plugin", fs.getBundledPluginsDir());
- when(upgradeStatus.isFreshInstall()).thenReturn(true);
-
- underTest.start();
-
- // both plugins are installed
- assertThat(underTest.getPluginInfosByKeys()).containsOnlyKeys("testbase");
- }
-
- @Test
- public void bundled_plugins_are_not_installed_if_not_fresh_server() throws Exception {
- copyTestPluginTo("test-base-plugin", fs.getBundledPluginsDir());
- when(upgradeStatus.isFreshInstall()).thenReturn(false);
-
- underTest.start();
-
- assertThat(underTest.getPluginInfos()).isEmpty();
- }
-
@Test
public void standard_startup_loads_installed_plugins() throws Exception {
copyTestPluginTo("test-base-plugin", fs.getInstalledPluginsDir());
diff --git a/sonar-application/build.gradle b/sonar-application/build.gradle
index 0ad23e38625..49653ff181e 100644
--- a/sonar-application/build.gradle
+++ b/sonar-application/build.gradle
@@ -63,7 +63,6 @@ dependencies {
testCompile 'junit:junit'
testCompile 'org.assertj:assertj-core'
testCompile 'org.mockito:mockito-core'
-
}
jar {
@@ -94,7 +93,7 @@ task zip(type: Zip) {
into("${archiveDir}/lib/") {
from jar
}
- into("${archiveDir}/lib/bundled-plugins/") {
+ into("${archiveDir}/extensions/plugins/") {
from configurations.bundledPlugin
}
into("${archiveDir}/lib/jsw/") {