]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-5147 do not install "bundled plugin" if already present in "extensions/plugins...
authorSimon Brandhof <simon.brandhof@gmail.com>
Tue, 25 Mar 2014 00:06:43 +0000 (01:06 +0100)
committerSimon Brandhof <simon.brandhof@gmail.com>
Tue, 25 Mar 2014 00:06:43 +0000 (01:06 +0100)
17 files changed:
sonar-server/src/main/java/org/sonar/server/plugins/ServerPluginJarsInstaller.java
sonar-server/src/test/java/org/sonar/server/plugins/ServerPluginJarsInstallerTest.java
sonar-server/src/test/resources/org/sonar/server/plugins/ServerPluginJarsInstallerTest/bar-plugin-1.0.jar [new file with mode: 0644]
sonar-server/src/test/resources/org/sonar/server/plugins/ServerPluginJarsInstallerTest/deployBundledPluginsOnFreshInstall/extensions/plugins/foo-plugin.jar [deleted file]
sonar-server/src/test/resources/org/sonar/server/plugins/ServerPluginJarsInstallerTest/deployBundledPluginsOnFreshInstall/lib/bundled-plugins/bar-plugin.jar [deleted file]
sonar-server/src/test/resources/org/sonar/server/plugins/ServerPluginJarsInstallerTest/deployPlugin/extensions/plugins/foo-plugin.jar [deleted file]
sonar-server/src/test/resources/org/sonar/server/plugins/ServerPluginJarsInstallerTest/deployPlugin/lib/bundled-plugins/bar-plugin.jar [deleted file]
sonar-server/src/test/resources/org/sonar/server/plugins/ServerPluginJarsInstallerTest/deployPluginExtensions/extensions/plugins/foo-plugin.jar [deleted file]
sonar-server/src/test/resources/org/sonar/server/plugins/ServerPluginJarsInstallerTest/deployPluginExtensions/extensions/rules/foo/foo-extension.txt [deleted file]
sonar-server/src/test/resources/org/sonar/server/plugins/ServerPluginJarsInstallerTest/failIfTwoPluginsWithSameKey/extensions/plugins/foo-plugin1.jar [deleted file]
sonar-server/src/test/resources/org/sonar/server/plugins/ServerPluginJarsInstallerTest/failIfTwoPluginsWithSameKey/extensions/plugins/foo-plugin2.jar [deleted file]
sonar-server/src/test/resources/org/sonar/server/plugins/ServerPluginJarsInstallerTest/fail_if_require_greater_SQ_version/extensions/plugins/sonar-switch-off-violations-plugin-1.1.jar [deleted file]
sonar-server/src/test/resources/org/sonar/server/plugins/ServerPluginJarsInstallerTest/foo-plugin-1.0.jar [new file with mode: 0644]
sonar-server/src/test/resources/org/sonar/server/plugins/ServerPluginJarsInstallerTest/foo-plugin-2.0.jar [new file with mode: 0644]
sonar-server/src/test/resources/org/sonar/server/plugins/ServerPluginJarsInstallerTest/ignoreJarsWhichAreNotPlugins/extensions/plugins/not-a-plugin.jar [deleted file]
sonar-server/src/test/resources/org/sonar/server/plugins/ServerPluginJarsInstallerTest/not-a-plugin.jar [new file with mode: 0644]
sonar-server/src/test/resources/org/sonar/server/plugins/ServerPluginJarsInstallerTest/require-sq-2.5.jar [new file with mode: 0644]

index 6e0bb7408ac0b7e1b9d8ae341706fe1e048379ef..3884439e16623d0355993380a61651d36d5c74af 100644 (file)
@@ -64,9 +64,7 @@ public class ServerPluginJarsInstaller {
     TimeProfiler profiler = new TimeProfiler().start("Install plugins");
     deleteTrash();
     loadInstalledPlugins();
-    if (serverUpgradeStatus.isFreshInstall()) {
-      copyBundledPlugins();
-    }
+    copyBundledPlugins();
     moveDownloadedPlugins();
     loadCorePlugins();
     deployPlugins();
@@ -107,8 +105,15 @@ public class ServerPluginJarsInstaller {
   }
 
   private void copyBundledPlugins() {
-    for (File sourceFile : fs.getBundledPlugins()) {
-      overridePlugin(sourceFile, false);
+    if (serverUpgradeStatus.isFreshInstall()) {
+      for (File sourceFile : fs.getBundledPlugins()) {
+        DefaultPluginMetadata metadata = installer.extractMetadata(sourceFile, false);
+        // lib/bundled-plugins should be copied only if the plugin is not already
+        // available in extensions/plugins
+        if (!pluginByKeys.containsKey(metadata.getKey())) {
+          overridePlugin(sourceFile, false);
+        }
+      }
     }
   }
 
@@ -125,7 +130,7 @@ public class ServerPluginJarsInstaller {
       if (deleteSource) {
         FileUtils.moveFile(sourceFile, destFile);
       } else {
-        FileUtils.copyFile(sourceFile, destFile);
+        FileUtils.copyFile(sourceFile, destFile, true);
       }
     } catch (IOException e) {
       LOG.error(String.format("Fail to move or copy plugin: %s to %s",
@@ -163,7 +168,7 @@ public class ServerPluginJarsInstaller {
 
   private void uninstallPlugin(String pluginKey) {
     PluginMetadata metadata = pluginByKeys.get(pluginKey);
-    if ((metadata != null) && !metadata.isCore()) {
+    if (metadata != null && !metadata.isCore()) {
       try {
         File masterFile = new File(fs.getUserPluginsDir(), metadata.getFile().getName());
         FileUtils.moveFileToDirectory(masterFile, fs.getTrashPluginsDir(), true);
index 92a7cab082bfdc5a29960b97a6796eac4dae2168..caf2b8f7accce30c49a21f6dc74252075e3b82a1 100644 (file)
  */
 package org.sonar.server.plugins;
 
+import org.apache.commons.io.FileUtils;
 import org.junit.Before;
 import org.junit.Rule;
 import org.junit.Test;
 import org.junit.rules.ExpectedException;
-import org.junit.rules.TestName;
+import org.junit.rules.TemporaryFolder;
 import org.sonar.api.platform.PluginMetadata;
 import org.sonar.api.platform.Server;
 import org.sonar.api.platform.ServerUpgradeStatus;
 import org.sonar.api.utils.MessageException;
+import org.sonar.core.persistence.Database;
 import org.sonar.server.platform.DefaultServerFileSystem;
 import org.sonar.test.TestUtils;
 
 import java.io.File;
+import java.io.IOException;
 
 import static org.fest.assertions.Assertions.assertThat;
 import static org.fest.assertions.Fail.fail;
@@ -41,99 +44,242 @@ import static org.mockito.Mockito.when;
 public class ServerPluginJarsInstallerTest {
 
   @Rule
-  public TestName name = new TestName();
+  public ExpectedException exception = ExpectedException.none();
 
   @Rule
-  public ExpectedException exception = ExpectedException.none();
+  public TemporaryFolder temp = new TemporaryFolder();
 
-  ServerPluginJarInstaller jarInstaller;
   DefaultServerFileSystem fileSystem;
-  File homeDir;
-  File deployDir;
+  File homeDir, deployDir, pluginsDir, downloadsDir, bundledDir, trashDir, coreDir;
+  ServerPluginJarInstaller jarInstaller;
   ServerPluginJarsInstaller jarsInstaller;
   Server server = mock(Server.class);
-  ServerUpgradeStatus serverUpgradeStatus;
+  ServerUpgradeStatus upgradeStatus = mock(ServerUpgradeStatus.class);
 
   @Before
-  public void before() {
+  public void before() throws IOException {
     when(server.getVersion()).thenReturn("3.1");
-    homeDir = TestUtils.getResource(ServerPluginJarsInstallerTest.class, name.getMethodName());
-    deployDir = TestUtils.getTestTempDir(ServerPluginJarsInstallerTest.class, name.getMethodName() + "/deploy");
-    fileSystem = new DefaultServerFileSystem(null, homeDir, deployDir);
+    homeDir = temp.newFolder("home");
+    pluginsDir = new File(homeDir, "extensions/plugins");
+    FileUtils.forceMkdir(pluginsDir);
+    downloadsDir = new File(homeDir, "extensions/downloads");
+    trashDir = new File(homeDir, "extensions/trash");
+    bundledDir = new File(homeDir, "lib/bundled-plugins");
+    coreDir = new File(homeDir, "lib/core-plugins");
+    FileUtils.forceMkdir(bundledDir);
+    deployDir = temp.newFolder("deploy");
+    fileSystem = new DefaultServerFileSystem(mock(Database.class), homeDir, deployDir);
     jarInstaller = new ServerPluginJarInstaller();
-    serverUpgradeStatus = mock(ServerUpgradeStatus.class);
-    jarsInstaller = new ServerPluginJarsInstaller(server, serverUpgradeStatus, fileSystem, jarInstaller);
+    jarsInstaller = new ServerPluginJarsInstaller(server, upgradeStatus, fileSystem, jarInstaller);
+  }
+
+  private File jar(String name) {
+    return TestUtils.getResource(ServerPluginJarsInstallerTest.class, name);
   }
 
   @Test
-  public void deployPlugin() {
-    when(serverUpgradeStatus.isFreshInstall()).thenReturn(false);
+  public void copy_bundled_plugin_on_fresh_install() throws Exception {
+    when(upgradeStatus.isFreshInstall()).thenReturn(true);
+    FileUtils.copyFileToDirectory(jar("foo-plugin-1.0.jar"), bundledDir);
 
     jarsInstaller.install();
 
-    // check that the plugin is registered
-    assertThat(jarsInstaller.getMetadata()).hasSize(1);
-
+    assertThat(FileUtils.listFiles(pluginsDir, new String[]{"jar"}, false)).hasSize(1);
+    assertThat(new File(pluginsDir, "foo-plugin-1.0.jar")).exists().isFile();
     PluginMetadata plugin = jarsInstaller.getMetadata("foo");
     assertThat(plugin.getName()).isEqualTo("Foo");
     assertThat(plugin.getDeployedFiles()).hasSize(1);
     assertThat(plugin.isCore()).isFalse();
     assertThat(plugin.isUseChildFirstClassLoader()).isFalse();
+  }
 
-    // check that the file is deployed
-    File deployedJar = new File(deployDir, "plugins/foo/foo-plugin.jar");
-    assertThat(deployedJar).exists();
-    assertThat(deployedJar).isFile();
+  @Test
+  public void do_not_copy_bundled_plugin_on_non_fresh_install() throws Exception {
+    when(upgradeStatus.isFreshInstall()).thenReturn(false);
+    FileUtils.copyFileToDirectory(jar("foo-plugin-1.0.jar"), bundledDir);
+
+    jarsInstaller.install();
+
+    assertThat(FileUtils.listFiles(pluginsDir, new String[]{"jar"}, false)).isEmpty();
   }
 
   @Test
-  public void deployBundledPluginsOnFreshInstall() {
-    when(serverUpgradeStatus.isFreshInstall()).thenReturn(true);
+  public void do_not_copy_bundled_plugin_if_already_installed() throws Exception {
+    // fresh install but plugins are already packaged in extensions/plugins
+    when(upgradeStatus.isFreshInstall()).thenReturn(true);
+    FileUtils.copyFileToDirectory(jar("foo-plugin-1.0.jar"), bundledDir);
+    FileUtils.copyFileToDirectory(jar("foo-plugin-2.0.jar"), pluginsDir);
+    FileUtils.copyFileToDirectory(jar("bar-plugin-1.0.jar"), pluginsDir);
 
     jarsInstaller.install();
 
-    // check that the plugin is registered
-    assertThat(jarsInstaller.getMetadata()).hasSize(2);
+    // do not copy foo 1.0
+    assertThat(FileUtils.listFiles(pluginsDir, new String[]{"jar"}, false)).hasSize(2);
+    assertThat(new File(pluginsDir, "foo-plugin-2.0.jar")).exists().isFile();
+    assertThat(new File(pluginsDir, "bar-plugin-1.0.jar")).exists().isFile();
+    PluginMetadata plugin = jarsInstaller.getMetadata("foo");
+    assertThat(plugin.getVersion()).isEqualTo("2.0");
+  }
 
-    PluginMetadata plugin = jarsInstaller.getMetadata("bar");
-    assertThat(plugin.getName()).isEqualTo("Bar");
+  @Test
+  public void deploy_installed_plugin() throws IOException {
+    when(upgradeStatus.isFreshInstall()).thenReturn(false);
+    FileUtils.copyFileToDirectory(jar("foo-plugin-1.0.jar"), pluginsDir);
+
+    jarsInstaller.install();
+
+    // check that the plugin is registered
+    assertThat(jarsInstaller.getMetadata()).hasSize(1);
+    PluginMetadata plugin = jarsInstaller.getMetadata("foo");
+    assertThat(plugin.getName()).isEqualTo("Foo");
     assertThat(plugin.getDeployedFiles()).hasSize(1);
     assertThat(plugin.isCore()).isFalse();
     assertThat(plugin.isUseChildFirstClassLoader()).isFalse();
 
-    // check that the file is deployed
-    File deployedJar = new File(deployDir, "plugins/bar/bar-plugin.jar");
-    assertThat(deployedJar).exists();
-    assertThat(deployedJar).isFile();
+    // check that the file is still present in extensions/plugins
+    assertThat(FileUtils.listFiles(pluginsDir, new String[]{"jar"}, false)).hasSize(1);
+    assertThat(new File(pluginsDir, "foo-plugin-1.0.jar")).exists().isFile();
   }
 
   @Test
-  public void ignoreJarsWhichAreNotPlugins() {
+  public void ignore_non_plugin_jars() throws IOException {
+    when(upgradeStatus.isFreshInstall()).thenReturn(false);
+    FileUtils.copyFileToDirectory(jar("not-a-plugin.jar"), pluginsDir);
+
     jarsInstaller.install();
 
+    // nothing to install but keep the file
     assertThat(jarsInstaller.getMetadata()).isEmpty();
+    assertThat(FileUtils.listFiles(pluginsDir, new String[]{"jar"}, false)).hasSize(1);
+    assertThat(new File(pluginsDir, "not-a-plugin.jar")).exists().isFile();
   }
 
   @Test
-  public void fail_if_require_greater_SQ_version() {
-    when(server.getVersion()).thenReturn("2.0");
-
+  public void fail_if_plugin_requires_greater_SQ_version() throws IOException {
     exception.expect(IllegalStateException.class);
     exception.expectMessage("Plugin switchoffviolations needs a more recent version of SonarQube than 2.0. At least 2.5 is expected");
 
+    when(upgradeStatus.isFreshInstall()).thenReturn(false);
+    when(server.getVersion()).thenReturn("2.0");
+    FileUtils.copyFileToDirectory(jar("require-sq-2.5.jar"), pluginsDir);
+
     jarsInstaller.install();
   }
 
   @Test
-  public void failIfTwoPluginsWithSameKey() {
+  public void move_downloaded_plugins() throws IOException {
+    FileUtils.copyFileToDirectory(jar("foo-plugin-1.0.jar"), downloadsDir);
+    when(upgradeStatus.isFreshInstall()).thenReturn(false);
+
+    jarsInstaller.install();
+
+    assertThat(FileUtils.listFiles(pluginsDir, new String[]{"jar"}, false)).hasSize(1);
+    assertThat(FileUtils.listFiles(downloadsDir, new String[]{"jar"}, false)).isEmpty();
+    assertThat(new File(pluginsDir, "foo-plugin-1.0.jar")).exists().isFile();
+  }
+
+  @Test
+  public void downloaded_plugins_overrides_existing_plugin() throws IOException {
+    FileUtils.copyFileToDirectory(jar("foo-plugin-1.0.jar"), pluginsDir);
+    FileUtils.copyFileToDirectory(jar("foo-plugin-2.0.jar"), downloadsDir);
+    when(upgradeStatus.isFreshInstall()).thenReturn(false);
+
+    jarsInstaller.install();
+
+    assertThat(FileUtils.listFiles(pluginsDir, new String[]{"jar"}, false)).hasSize(1);
+    assertThat(FileUtils.listFiles(downloadsDir, new String[]{"jar"}, false)).isEmpty();
+    assertThat(new File(pluginsDir, "foo-plugin-2.0.jar")).exists().isFile();
+  }
+
+  @Test
+  public void downloaded_plugins_overrides_existing_plugin_even_if_same_filename() throws IOException {
+    FileUtils.copyFileToDirectory(jar("foo-plugin-1.0.jar"), pluginsDir, true);
+    // foo-plugin-1.0.jar in extensions/downloads is in fact version 2.0. It's used to verify
+    // that it has correctly overridden extensions/plugins/foo-plugin-1.0.jar
+    FileUtils.copyFile(jar("foo-plugin-2.0.jar"), new File(downloadsDir, "foo-plugin-1.0.jar"));
+    when(upgradeStatus.isFreshInstall()).thenReturn(false);
+
+    jarsInstaller.install();
+
+    PluginMetadata plugin = jarsInstaller.getMetadata("foo");
+    assertThat(plugin).isNotNull();
+    assertThat(plugin.getVersion()).isEqualTo("2.0");
+    assertThat(FileUtils.listFiles(pluginsDir, new String[]{"jar"}, false)).hasSize(1);
+    assertThat(FileUtils.listFiles(downloadsDir, new String[]{"jar"}, false)).isEmpty();
+    File installed = new File(pluginsDir, "foo-plugin-1.0.jar");
+    assertThat(installed).exists().isFile();
+  }
+
+  @Test
+  public void delete_trash() throws IOException {
+    FileUtils.copyFileToDirectory(jar("foo-plugin-1.0.jar"), trashDir);
+    when(upgradeStatus.isFreshInstall()).thenReturn(false);
+
+    jarsInstaller.install();
+
+    assertThat(FileUtils.listFiles(pluginsDir, new String[]{"jar"}, false)).isEmpty();
+    assertThat(trashDir).doesNotExist();
+  }
+
+  @Test
+  public void fail_if_two_installed_plugins_with_same_key() throws IOException {
+    when(upgradeStatus.isFreshInstall()).thenReturn(false);
+    FileUtils.copyFileToDirectory(jar("foo-plugin-1.0.jar"), pluginsDir);
+    FileUtils.copyFileToDirectory(jar("foo-plugin-2.0.jar"), pluginsDir);
+
     try {
       jarsInstaller.install();
       fail();
     } catch (MessageException e) {
       assertThat(e.getMessage())
         .contains("Found two files for the same plugin 'foo'")
-        .contains("foo-plugin1.jar")
-        .contains("foo-plugin2.jar");
+        .contains("foo-plugin-1.0.jar")
+        .contains("foo-plugin-2.0.jar");
     }
   }
+
+  @Test
+  public void uninstall_plugin() throws IOException {
+    when(upgradeStatus.isFreshInstall()).thenReturn(false);
+    FileUtils.copyFileToDirectory(jar("foo-plugin-1.0.jar"), pluginsDir);
+
+    jarsInstaller.install();
+    jarsInstaller.uninstall("foo");
+
+    assertThat(FileUtils.listFiles(pluginsDir, new String[]{"jar"}, false)).isEmpty();
+    assertThat(FileUtils.listFiles(trashDir, new String[]{"jar"}, false)).hasSize(1);
+    assertThat(jarsInstaller.getUninstalls()).containsOnly("foo-plugin-1.0.jar");
+  }
+
+  @Test
+  public void cancel_uninstallation() throws IOException {
+    when(upgradeStatus.isFreshInstall()).thenReturn(false);
+    FileUtils.copyFileToDirectory(jar("foo-plugin-1.0.jar"), pluginsDir);
+
+    jarsInstaller.install();
+    jarsInstaller.uninstall("foo");
+    jarsInstaller.cancelUninstalls();
+
+    assertThat(FileUtils.listFiles(pluginsDir, new String[]{"jar"}, false)).hasSize(1);
+    assertThat(FileUtils.listFiles(trashDir, new String[]{"jar"}, false)).hasSize(0);
+    assertThat(jarsInstaller.getUninstalls()).isEmpty();
+  }
+
+  @Test
+  public void deploy_core_plugins() throws IOException {
+    when(upgradeStatus.isFreshInstall()).thenReturn(false);
+    FileUtils.copyFileToDirectory(jar("foo-plugin-1.0.jar"), coreDir);
+
+    jarsInstaller.install();
+
+    // do not deploy in extensions/plugins
+    assertThat(FileUtils.listFiles(pluginsDir, new String[]{"jar"}, false)).hasSize(0);
+
+    // do not remove from lib/core-plugins
+    assertThat(FileUtils.listFiles(coreDir, new String[]{"jar"}, false)).hasSize(1);
+
+    PluginMetadata plugin = jarsInstaller.getMetadata("foo");
+    assertThat(plugin).isNotNull();
+    assertThat(plugin.isCore()).isTrue();
+  }
 }
diff --git a/sonar-server/src/test/resources/org/sonar/server/plugins/ServerPluginJarsInstallerTest/bar-plugin-1.0.jar b/sonar-server/src/test/resources/org/sonar/server/plugins/ServerPluginJarsInstallerTest/bar-plugin-1.0.jar
new file mode 100644 (file)
index 0000000..acf4fa4
Binary files /dev/null and b/sonar-server/src/test/resources/org/sonar/server/plugins/ServerPluginJarsInstallerTest/bar-plugin-1.0.jar differ
diff --git a/sonar-server/src/test/resources/org/sonar/server/plugins/ServerPluginJarsInstallerTest/deployBundledPluginsOnFreshInstall/extensions/plugins/foo-plugin.jar b/sonar-server/src/test/resources/org/sonar/server/plugins/ServerPluginJarsInstallerTest/deployBundledPluginsOnFreshInstall/extensions/plugins/foo-plugin.jar
deleted file mode 100644 (file)
index 22ced8f..0000000
Binary files a/sonar-server/src/test/resources/org/sonar/server/plugins/ServerPluginJarsInstallerTest/deployBundledPluginsOnFreshInstall/extensions/plugins/foo-plugin.jar and /dev/null differ
diff --git a/sonar-server/src/test/resources/org/sonar/server/plugins/ServerPluginJarsInstallerTest/deployBundledPluginsOnFreshInstall/lib/bundled-plugins/bar-plugin.jar b/sonar-server/src/test/resources/org/sonar/server/plugins/ServerPluginJarsInstallerTest/deployBundledPluginsOnFreshInstall/lib/bundled-plugins/bar-plugin.jar
deleted file mode 100644 (file)
index acf4fa4..0000000
Binary files a/sonar-server/src/test/resources/org/sonar/server/plugins/ServerPluginJarsInstallerTest/deployBundledPluginsOnFreshInstall/lib/bundled-plugins/bar-plugin.jar and /dev/null differ
diff --git a/sonar-server/src/test/resources/org/sonar/server/plugins/ServerPluginJarsInstallerTest/deployPlugin/extensions/plugins/foo-plugin.jar b/sonar-server/src/test/resources/org/sonar/server/plugins/ServerPluginJarsInstallerTest/deployPlugin/extensions/plugins/foo-plugin.jar
deleted file mode 100644 (file)
index 22ced8f..0000000
Binary files a/sonar-server/src/test/resources/org/sonar/server/plugins/ServerPluginJarsInstallerTest/deployPlugin/extensions/plugins/foo-plugin.jar and /dev/null differ
diff --git a/sonar-server/src/test/resources/org/sonar/server/plugins/ServerPluginJarsInstallerTest/deployPlugin/lib/bundled-plugins/bar-plugin.jar b/sonar-server/src/test/resources/org/sonar/server/plugins/ServerPluginJarsInstallerTest/deployPlugin/lib/bundled-plugins/bar-plugin.jar
deleted file mode 100644 (file)
index acf4fa4..0000000
Binary files a/sonar-server/src/test/resources/org/sonar/server/plugins/ServerPluginJarsInstallerTest/deployPlugin/lib/bundled-plugins/bar-plugin.jar and /dev/null differ
diff --git a/sonar-server/src/test/resources/org/sonar/server/plugins/ServerPluginJarsInstallerTest/deployPluginExtensions/extensions/plugins/foo-plugin.jar b/sonar-server/src/test/resources/org/sonar/server/plugins/ServerPluginJarsInstallerTest/deployPluginExtensions/extensions/plugins/foo-plugin.jar
deleted file mode 100644 (file)
index 7bcf027..0000000
Binary files a/sonar-server/src/test/resources/org/sonar/server/plugins/ServerPluginJarsInstallerTest/deployPluginExtensions/extensions/plugins/foo-plugin.jar and /dev/null differ
diff --git a/sonar-server/src/test/resources/org/sonar/server/plugins/ServerPluginJarsInstallerTest/deployPluginExtensions/extensions/rules/foo/foo-extension.txt b/sonar-server/src/test/resources/org/sonar/server/plugins/ServerPluginJarsInstallerTest/deployPluginExtensions/extensions/rules/foo/foo-extension.txt
deleted file mode 100644 (file)
index d84be83..0000000
+++ /dev/null
@@ -1 +0,0 @@
-this is an extension to the plugin foo
\ No newline at end of file
diff --git a/sonar-server/src/test/resources/org/sonar/server/plugins/ServerPluginJarsInstallerTest/failIfTwoPluginsWithSameKey/extensions/plugins/foo-plugin1.jar b/sonar-server/src/test/resources/org/sonar/server/plugins/ServerPluginJarsInstallerTest/failIfTwoPluginsWithSameKey/extensions/plugins/foo-plugin1.jar
deleted file mode 100644 (file)
index 22ced8f..0000000
Binary files a/sonar-server/src/test/resources/org/sonar/server/plugins/ServerPluginJarsInstallerTest/failIfTwoPluginsWithSameKey/extensions/plugins/foo-plugin1.jar and /dev/null differ
diff --git a/sonar-server/src/test/resources/org/sonar/server/plugins/ServerPluginJarsInstallerTest/failIfTwoPluginsWithSameKey/extensions/plugins/foo-plugin2.jar b/sonar-server/src/test/resources/org/sonar/server/plugins/ServerPluginJarsInstallerTest/failIfTwoPluginsWithSameKey/extensions/plugins/foo-plugin2.jar
deleted file mode 100644 (file)
index 22ced8f..0000000
Binary files a/sonar-server/src/test/resources/org/sonar/server/plugins/ServerPluginJarsInstallerTest/failIfTwoPluginsWithSameKey/extensions/plugins/foo-plugin2.jar and /dev/null differ
diff --git a/sonar-server/src/test/resources/org/sonar/server/plugins/ServerPluginJarsInstallerTest/fail_if_require_greater_SQ_version/extensions/plugins/sonar-switch-off-violations-plugin-1.1.jar b/sonar-server/src/test/resources/org/sonar/server/plugins/ServerPluginJarsInstallerTest/fail_if_require_greater_SQ_version/extensions/plugins/sonar-switch-off-violations-plugin-1.1.jar
deleted file mode 100644 (file)
index 8044dff..0000000
Binary files a/sonar-server/src/test/resources/org/sonar/server/plugins/ServerPluginJarsInstallerTest/fail_if_require_greater_SQ_version/extensions/plugins/sonar-switch-off-violations-plugin-1.1.jar and /dev/null differ
diff --git a/sonar-server/src/test/resources/org/sonar/server/plugins/ServerPluginJarsInstallerTest/foo-plugin-1.0.jar b/sonar-server/src/test/resources/org/sonar/server/plugins/ServerPluginJarsInstallerTest/foo-plugin-1.0.jar
new file mode 100644 (file)
index 0000000..3b3ed4b
Binary files /dev/null and b/sonar-server/src/test/resources/org/sonar/server/plugins/ServerPluginJarsInstallerTest/foo-plugin-1.0.jar differ
diff --git a/sonar-server/src/test/resources/org/sonar/server/plugins/ServerPluginJarsInstallerTest/foo-plugin-2.0.jar b/sonar-server/src/test/resources/org/sonar/server/plugins/ServerPluginJarsInstallerTest/foo-plugin-2.0.jar
new file mode 100644 (file)
index 0000000..b781205
Binary files /dev/null and b/sonar-server/src/test/resources/org/sonar/server/plugins/ServerPluginJarsInstallerTest/foo-plugin-2.0.jar differ
diff --git a/sonar-server/src/test/resources/org/sonar/server/plugins/ServerPluginJarsInstallerTest/ignoreJarsWhichAreNotPlugins/extensions/plugins/not-a-plugin.jar b/sonar-server/src/test/resources/org/sonar/server/plugins/ServerPluginJarsInstallerTest/ignoreJarsWhichAreNotPlugins/extensions/plugins/not-a-plugin.jar
deleted file mode 100644 (file)
index 11b72f4..0000000
Binary files a/sonar-server/src/test/resources/org/sonar/server/plugins/ServerPluginJarsInstallerTest/ignoreJarsWhichAreNotPlugins/extensions/plugins/not-a-plugin.jar and /dev/null differ
diff --git a/sonar-server/src/test/resources/org/sonar/server/plugins/ServerPluginJarsInstallerTest/not-a-plugin.jar b/sonar-server/src/test/resources/org/sonar/server/plugins/ServerPluginJarsInstallerTest/not-a-plugin.jar
new file mode 100644 (file)
index 0000000..11b72f4
Binary files /dev/null and b/sonar-server/src/test/resources/org/sonar/server/plugins/ServerPluginJarsInstallerTest/not-a-plugin.jar differ
diff --git a/sonar-server/src/test/resources/org/sonar/server/plugins/ServerPluginJarsInstallerTest/require-sq-2.5.jar b/sonar-server/src/test/resources/org/sonar/server/plugins/ServerPluginJarsInstallerTest/require-sq-2.5.jar
new file mode 100644 (file)
index 0000000..8044dff
Binary files /dev/null and b/sonar-server/src/test/resources/org/sonar/server/plugins/ServerPluginJarsInstallerTest/require-sq-2.5.jar differ