aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2015-05-28 14:58:50 +0200
committerSimon Brandhof <simon.brandhof@sonarsource.com>2015-06-01 23:06:04 +0200
commitc96f1183468824962415a12a73884b462db38f10 (patch)
tree925ec52906e5fb66f53b0b176ca1e26a34eab402
parent03e6eeb3fa98c2bfcb8582c5cea22d0aef52471c (diff)
downloadsonarqube-c96f1183468824962415a12a73884b462db38f10.tar.gz
sonarqube-c96f1183468824962415a12a73884b462db38f10.zip
Drop L10n english plugin
-rw-r--r--plugins/sonar-l10n-en-plugin/pom.xml76
-rw-r--r--plugins/sonar-l10n-en-plugin/src/main/java/org/sonar/plugins/l10n/EnglishPackPlugin.java34
-rw-r--r--plugins/sonar-l10n-en-plugin/src/main/java/org/sonar/plugins/l10n/package-info.java23
-rw-r--r--plugins/sonar-l10n-en-plugin/src/test/java/org/sonar/plugins/l10n/EnglishPackPluginTest.java32
-rw-r--r--pom.xml1
-rw-r--r--sonar-application/pom.xml7
-rw-r--r--sonar-core/src/main/java/org/sonar/core/platform/PluginInfo.java9
-rw-r--r--sonar-core/src/test/java/org/sonar/core/platform/PluginInfoTest.java11
8 files changed, 19 insertions, 174 deletions
diff --git a/plugins/sonar-l10n-en-plugin/pom.xml b/plugins/sonar-l10n-en-plugin/pom.xml
deleted file mode 100644
index 49163bca0f7..00000000000
--- a/plugins/sonar-l10n-en-plugin/pom.xml
+++ /dev/null
@@ -1,76 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ SonarQube, open source software quality management tool.
- ~ Copyright (C) 2008-2014 SonarSource
- ~ mailto:contact AT sonarsource DOT com
- ~
- ~ SonarQube 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.
- ~
- ~ SonarQube 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.
- -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.codehaus.sonar</groupId>
- <artifactId>sonar</artifactId>
- <version>5.2-SNAPSHOT</version>
- <relativePath>../..</relativePath>
- </parent>
-
- <groupId>org.codehaus.sonar.plugins</groupId>
- <artifactId>sonar-l10n-en-plugin</artifactId>
- <packaging>sonar-plugin</packaging>
- <name>SonarQube :: Plugins :: English Pack</name>
-
- <dependencies>
- <dependency>
- <groupId>com.google.code.findbugs</groupId>
- <artifactId>jsr305</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.codehaus.sonar</groupId>
- <artifactId>sonar-plugin-api</artifactId>
- <scope>provided</scope>
- </dependency>
-
- <dependency>
- <groupId>org.codehaus.sonar</groupId>
- <artifactId>sonar-testing-harness</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.codehaus.sonar</groupId>
- <artifactId>sonar-packaging-maven-plugin</artifactId>
- <configuration>
- <pluginName>English Pack</pluginName>
- <pluginClass>org.sonar.plugins.l10n.EnglishPackPlugin</pluginClass>
- <pluginDescription><![CDATA[Language pack for English]]></pluginDescription>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <skipTests>${skipServerTests}</skipTests>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/plugins/sonar-l10n-en-plugin/src/main/java/org/sonar/plugins/l10n/EnglishPackPlugin.java b/plugins/sonar-l10n-en-plugin/src/main/java/org/sonar/plugins/l10n/EnglishPackPlugin.java
deleted file mode 100644
index f5ddb9b924e..00000000000
--- a/plugins/sonar-l10n-en-plugin/src/main/java/org/sonar/plugins/l10n/EnglishPackPlugin.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * SonarQube, open source software quality management tool.
- * Copyright (C) 2008-2014 SonarSource
- * mailto:contact AT sonarsource DOT com
- *
- * SonarQube 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.
- *
- * SonarQube 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.plugins.l10n;
-
-import org.sonar.api.SonarPlugin;
-
-import java.util.Collections;
-import java.util.List;
-
-public final class EnglishPackPlugin extends SonarPlugin {
-
- @Override
- public List getExtensions() {
- return Collections.emptyList();
- }
-}
diff --git a/plugins/sonar-l10n-en-plugin/src/main/java/org/sonar/plugins/l10n/package-info.java b/plugins/sonar-l10n-en-plugin/src/main/java/org/sonar/plugins/l10n/package-info.java
deleted file mode 100644
index 332d583940e..00000000000
--- a/plugins/sonar-l10n-en-plugin/src/main/java/org/sonar/plugins/l10n/package-info.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * SonarQube, open source software quality management tool.
- * Copyright (C) 2008-2014 SonarSource
- * mailto:contact AT sonarsource DOT com
- *
- * SonarQube 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.
- *
- * SonarQube 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.
- */
-@ParametersAreNonnullByDefault
-package org.sonar.plugins.l10n;
-
-import javax.annotation.ParametersAreNonnullByDefault;
diff --git a/plugins/sonar-l10n-en-plugin/src/test/java/org/sonar/plugins/l10n/EnglishPackPluginTest.java b/plugins/sonar-l10n-en-plugin/src/test/java/org/sonar/plugins/l10n/EnglishPackPluginTest.java
deleted file mode 100644
index f086398dd62..00000000000
--- a/plugins/sonar-l10n-en-plugin/src/test/java/org/sonar/plugins/l10n/EnglishPackPluginTest.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * SonarQube, open source software quality management tool.
- * Copyright (C) 2008-2014 SonarSource
- * mailto:contact AT sonarsource DOT com
- *
- * SonarQube 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.
- *
- * SonarQube 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.plugins.l10n;
-
-import org.junit.Test;
-
-import static org.assertj.core.api.Assertions.assertThat;
-
-public class EnglishPackPluginTest {
- @Test
- public void no_extensions() {
- assertThat(new EnglishPackPlugin().getExtensions()).isEmpty();
- }
-}
diff --git a/pom.xml b/pom.xml
index dda04d74a41..d5283bc81c4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -27,7 +27,6 @@
<module>sonar-plugin-api</module>
<module>server</module>
<module>sonar-testing-harness</module>
- <module>plugins/sonar-l10n-en-plugin</module>
<module>plugins/sonar-email-notifications-plugin</module>
<module>plugins/sonar-xoo-plugin</module>
</modules>
diff --git a/sonar-application/pom.xml b/sonar-application/pom.xml
index ef50d795c6a..2fad3d77928 100644
--- a/sonar-application/pom.xml
+++ b/sonar-application/pom.xml
@@ -91,13 +91,6 @@
<!-- core plugins -->
<dependency>
<groupId>org.codehaus.sonar.plugins</groupId>
- <artifactId>sonar-l10n-en-plugin</artifactId>
- <version>${project.version}</version>
- <type>sonar-plugin</type>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.codehaus.sonar.plugins</groupId>
<artifactId>sonar-email-notifications-plugin</artifactId>
<version>${project.version}</version>
<type>sonar-plugin</type>
diff --git a/sonar-core/src/main/java/org/sonar/core/platform/PluginInfo.java b/sonar-core/src/main/java/org/sonar/core/platform/PluginInfo.java
index 71edd759fb2..c11a618b0fd 100644
--- a/sonar-core/src/main/java/org/sonar/core/platform/PluginInfo.java
+++ b/sonar-core/src/main/java/org/sonar/core/platform/PluginInfo.java
@@ -27,6 +27,7 @@ import com.google.common.base.Preconditions;
import com.google.common.collect.ComparisonChain;
import com.google.common.collect.Ordering;
import org.apache.commons.lang.StringUtils;
+import org.sonar.api.utils.log.Loggers;
import org.sonar.updatecenter.common.PluginManifest;
import org.sonar.updatecenter.common.Version;
@@ -294,7 +295,13 @@ public class PluginInfo implements Comparable<PluginInfo> {
}
public PluginInfo setBasePlugin(@Nullable String s) {
- this.basePlugin = s;
+ if ("l10nen".equals(s)) {
+ Loggers.get(PluginInfo.class).info("Plugin [{}] still defines 'l10nen' as base plugin. " +
+ "This metadata can be removed from manifest of l10n plugins since version 5.2.", key);
+ basePlugin = null;
+ } else {
+ basePlugin = s;
+ }
return this;
}
diff --git a/sonar-core/src/test/java/org/sonar/core/platform/PluginInfoTest.java b/sonar-core/src/test/java/org/sonar/core/platform/PluginInfoTest.java
index 28b33ae338b..d64a7323ff7 100644
--- a/sonar-core/src/test/java/org/sonar/core/platform/PluginInfoTest.java
+++ b/sonar-core/src/test/java/org/sonar/core/platform/PluginInfoTest.java
@@ -207,6 +207,17 @@ public class PluginInfoTest {
assertThat(pluginInfo.toString()).isEqualTo("[java / 1.1 / SHA1]");
}
+ /**
+ * The English bundle plugin was removed in 5.2. L10n plugins do not need to declare
+ * it as base plugin anymore
+ */
+ @Test
+ public void l10n_plugins_should_not_extend_english_plugin() throws Exception {
+ PluginInfo pluginInfo = new PluginInfo("l10nfr").setBasePlugin("l10nen");
+ assertThat(pluginInfo.getBasePlugin()).isNull();
+
+ }
+
PluginInfo withMinSqVersion(@Nullable String version) {
PluginInfo pluginInfo = new PluginInfo("foo");
if (version != null) {