diff options
16 files changed, 38 insertions, 99 deletions
diff --git a/plugins/sonar-core-plugin/pom.xml b/plugins/sonar-core-plugin/pom.xml index bdb51f62a44..058a7b19e17 100644 --- a/plugins/sonar-core-plugin/pom.xml +++ b/plugins/sonar-core-plugin/pom.xml @@ -59,6 +59,13 @@ <!-- unit tests --> <dependency> <groupId>org.codehaus.sonar</groupId> + <artifactId>sonar-core</artifactId> + <version>${project.version}</version> + <type>test-jar</type> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.codehaus.sonar</groupId> <artifactId>sonar-testing-harness</artifactId> <scope>test</scope> </dependency> diff --git a/plugins/sonar-dbcleaner-plugin/pom.xml b/plugins/sonar-dbcleaner-plugin/pom.xml index 128a599f763..c35942f78e5 100644 --- a/plugins/sonar-dbcleaner-plugin/pom.xml +++ b/plugins/sonar-dbcleaner-plugin/pom.xml @@ -22,6 +22,11 @@ </dependency> <dependency> <groupId>org.codehaus.sonar</groupId> + <artifactId>sonar-core</artifactId> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.codehaus.sonar</groupId> <artifactId>sonar-plugin-api</artifactId> <scope>provided</scope> </dependency> diff --git a/plugins/sonar-design-plugin/pom.xml b/plugins/sonar-design-plugin/pom.xml index 3880e65121e..7c3b3e9b45e 100644 --- a/plugins/sonar-design-plugin/pom.xml +++ b/plugins/sonar-design-plugin/pom.xml @@ -24,6 +24,10 @@ </dependency> <dependency> <groupId>org.codehaus.sonar</groupId> + <artifactId>sonar-deprecated</artifactId> + </dependency> + <dependency> + <groupId>org.codehaus.sonar</groupId> <artifactId>sonar-plugin-api</artifactId> <scope>provided</scope> </dependency> diff --git a/sonar-batch/pom.xml b/sonar-batch/pom.xml index 3a34a6721da..238af5901ab 100644 --- a/sonar-batch/pom.xml +++ b/sonar-batch/pom.xml @@ -90,6 +90,13 @@ <!-- unit tests --> <dependency> <groupId>org.codehaus.sonar</groupId> + <artifactId>sonar-core</artifactId> + <type>test-jar</type> + <scope>test</scope> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.codehaus.sonar</groupId> <artifactId>sonar-testing-harness</artifactId> <scope>test</scope> </dependency> diff --git a/sonar-batch/src/main/java/org/sonar/batch/scan/ModuleScanContainer.java b/sonar-batch/src/main/java/org/sonar/batch/scan/ModuleScanContainer.java index e2699fe0572..ab083e6389e 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/scan/ModuleScanContainer.java +++ b/sonar-batch/src/main/java/org/sonar/batch/scan/ModuleScanContainer.java @@ -121,7 +121,6 @@ public class ModuleScanContainer extends ComponentContainer { getComponentByType(ResourcePersister.class).getSnapshot(module), TimeMachineConfiguration.class, - org.sonar.api.database.daos.MeasuresDao.class, DefaultSensorContext.class, BatchExtensionDictionnary.class, DefaultTimeMachine.class, diff --git a/sonar-core/pom.xml b/sonar-core/pom.xml index bede66d160e..dfc286d72f8 100644 --- a/sonar-core/pom.xml +++ b/sonar-core/pom.xml @@ -35,6 +35,10 @@ </dependency> <dependency> <groupId>org.codehaus.sonar</groupId> + <artifactId>sonar-deprecated</artifactId> + </dependency> + <dependency> + <groupId>org.codehaus.sonar</groupId> <artifactId>sonar-update-center-common</artifactId> </dependency> <dependency> diff --git a/sonar-deprecated/pom.xml b/sonar-deprecated/pom.xml index 784df608202..3c1cd8b387c 100644 --- a/sonar-deprecated/pom.xml +++ b/sonar-deprecated/pom.xml @@ -12,10 +12,6 @@ <dependencies> <dependency> <groupId>${project.groupId}</groupId> - <artifactId>sonar-core</artifactId> - </dependency> - <dependency> - <groupId>${project.groupId}</groupId> <artifactId>sonar-plugin-api</artifactId> </dependency> <dependency> diff --git a/sonar-deprecated/src/main/java/org/sonar/api/database/daos/MeasuresDao.java b/sonar-deprecated/src/main/java/org/sonar/api/database/daos/MeasuresDao.java deleted file mode 100644 index 866bc0db8c2..00000000000 --- a/sonar-deprecated/src/main/java/org/sonar/api/database/daos/MeasuresDao.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * SonarQube, open source software quality management tool. - * Copyright (C) 2008-2013 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.api.database.daos; - -import org.sonar.api.measures.Metric; - -import java.util.Collection; -import java.util.List; - -/** - * @deprecated since 2.3 - */ -@Deprecated -public class MeasuresDao { - - private org.sonar.jpa.dao.MeasuresDao target; - - public MeasuresDao(org.sonar.jpa.dao.MeasuresDao target) { - this.target = target; - } - - public Metric getMetric(Metric metric) { - return target.getMetric(metric); - } - - public List<Metric> getMetrics(List<Metric> metrics) { - return target.getMetrics(metrics); - } - - public Metric getMetric(String metricName) { - return target.getMetric(metricName); - } - - public Collection<Metric> getMetrics() { - return target.getMetrics(); - } - - public Collection<Metric> getEnabledMetrics() { - return target.getEnabledMetrics(); - } - - public Collection<Metric> getUserDefinedMetrics() { - return target.getUserDefinedMetrics(); - } - - public void disableAutomaticMetrics() { - target.disableAutomaticMetrics(); - } - - public void registerMetrics(Collection<Metric> metrics) { - target.registerMetrics(metrics); - } - - public void persistMetric(Metric metric) { - target.persistMetric(metric); - } - - public void disabledMetrics(Collection<Metric> metrics) { - target.disabledMetrics(metrics); - } - -} diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/i18n/RuleI18n.java b/sonar-deprecated/src/main/java/org/sonar/api/i18n/RuleI18n.java index 2970be3f0b1..aaba70c143e 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/i18n/RuleI18n.java +++ b/sonar-deprecated/src/main/java/org/sonar/api/i18n/RuleI18n.java @@ -31,7 +31,9 @@ import java.util.Locale; * {@link I18n}-companion component that provides translation facilities for rule names, descriptions and parameter names. * * @since 3.2 + * @deprecated in 4.1. Rules are not localized anymore. See http://jira.codehaus.org/browse/SONAR-4885 */ +@Deprecated public interface RuleI18n extends ServerComponent, BatchComponent { /** diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/web/GwtExtension.java b/sonar-deprecated/src/main/java/org/sonar/api/web/GwtExtension.java index 2b099ce1ef1..2b099ce1ef1 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/web/GwtExtension.java +++ b/sonar-deprecated/src/main/java/org/sonar/api/web/GwtExtension.java diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/web/GwtPage.java b/sonar-deprecated/src/main/java/org/sonar/api/web/GwtPage.java index 558a5717af8..558a5717af8 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/web/GwtPage.java +++ b/sonar-deprecated/src/main/java/org/sonar/api/web/GwtPage.java diff --git a/sonar-server/pom.xml b/sonar-server/pom.xml index 933b38ac814..d3426fd50c1 100644 --- a/sonar-server/pom.xml +++ b/sonar-server/pom.xml @@ -150,6 +150,13 @@ </dependency> <!-- unit tests --> <dependency> + <groupId>org.codehaus.sonar</groupId> + <artifactId>sonar-core</artifactId> + <version>${project.version}</version> + <type>test-jar</type> + <scope>test</scope> + </dependency> + <dependency> <groupId>org.skyscreamer</groupId> <artifactId>jsonassert</artifactId> <scope>test</scope> diff --git a/sonar-server/src/main/java/org/sonar/server/platform/Platform.java b/sonar-server/src/main/java/org/sonar/server/platform/Platform.java index b82589aa1f9..b09d07d3b8f 100644 --- a/sonar-server/src/main/java/org/sonar/server/platform/Platform.java +++ b/sonar-server/src/main/java/org/sonar/server/platform/Platform.java @@ -245,7 +245,6 @@ public final class Platform { servicesContainer.addSingleton(CodeColorizers.class); servicesContainer.addComponent(RulesDao.class, false); servicesContainer.addComponent(MeasuresDao.class, false); - servicesContainer.addComponent(org.sonar.api.database.daos.MeasuresDao.class, false); servicesContainer.addComponent(ProfilesDao.class, false); servicesContainer.addComponent(ProfilesManager.class, false); servicesContainer.addSingleton(SecurityRealmFactory.class); diff --git a/sonar-server/src/main/java/org/sonar/server/rule/RubyRuleService.java b/sonar-server/src/main/java/org/sonar/server/rule/RubyRuleService.java index 59756fa892a..11d751f83c0 100644 --- a/sonar-server/src/main/java/org/sonar/server/rule/RubyRuleService.java +++ b/sonar-server/src/main/java/org/sonar/server/rule/RubyRuleService.java @@ -23,7 +23,6 @@ import com.google.common.collect.Maps; import org.apache.commons.lang.StringUtils; import org.picocontainer.Startable; import org.sonar.api.ServerComponent; -import org.sonar.core.i18n.RuleI18nManager; import java.util.Map; @@ -32,14 +31,12 @@ import java.util.Map; */ public class RubyRuleService implements ServerComponent, Startable { - private final RuleI18nManager i18n; private final RuleRegistry ruleRegistry; private static final String OPTIONS_STATUS = "status"; private static final String OPTIONS_LANGUAGE = "language"; - public RubyRuleService(RuleI18nManager i18n, RuleRegistry ruleRegistry) { - this.i18n = i18n; + public RubyRuleService(RuleRegistry ruleRegistry) { this.ruleRegistry = ruleRegistry; } diff --git a/sonar-server/src/test/java/org/sonar/server/rule/RubyRuleServiceTest.java b/sonar-server/src/test/java/org/sonar/server/rule/RubyRuleServiceTest.java index 05401792eb5..c74b894164c 100644 --- a/sonar-server/src/test/java/org/sonar/server/rule/RubyRuleServiceTest.java +++ b/sonar-server/src/test/java/org/sonar/server/rule/RubyRuleServiceTest.java @@ -22,7 +22,6 @@ package org.sonar.server.rule; import com.google.common.collect.Maps; import org.junit.Test; import org.mockito.ArgumentCaptor; -import org.sonar.core.i18n.RuleI18nManager; import java.util.Map; @@ -32,9 +31,8 @@ import static org.mockito.Mockito.verify; public class RubyRuleServiceTest { - RuleI18nManager i18n = mock(RuleI18nManager.class); RuleRegistry ruleRegistry = mock(RuleRegistry.class); - RubyRuleService facade = new RubyRuleService(i18n, ruleRegistry); + RubyRuleService facade = new RubyRuleService(ruleRegistry); @Test @SuppressWarnings({"unchecked", "rawtypes"}) diff --git a/sonar-testing-harness/pom.xml b/sonar-testing-harness/pom.xml index 6a9e8f0257a..dc9c9771a19 100644 --- a/sonar-testing-harness/pom.xml +++ b/sonar-testing-harness/pom.xml @@ -70,13 +70,6 @@ <type>test-jar</type> </dependency> <dependency> - <groupId>org.codehaus.sonar</groupId> - <artifactId>sonar-core</artifactId> - <version>${project.version}</version> - <scope>compile</scope> - <type>test-jar</type> - </dependency> - <dependency> <groupId>org.reflections</groupId> <artifactId>reflections</artifactId> </dependency> |