@@ -57,6 +57,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.codehaus.sonar</groupId> | |||
<artifactId>sonar-testing-harness</artifactId> |
@@ -20,6 +20,11 @@ | |||
<artifactId>jsr305</artifactId> | |||
<scope>provided</scope> | |||
</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> |
@@ -22,6 +22,10 @@ | |||
<artifactId>sonar-core</artifactId> | |||
<scope>provided</scope> | |||
</dependency> | |||
<dependency> | |||
<groupId>org.codehaus.sonar</groupId> | |||
<artifactId>sonar-deprecated</artifactId> | |||
</dependency> | |||
<dependency> | |||
<groupId>org.codehaus.sonar</groupId> | |||
<artifactId>sonar-plugin-api</artifactId> |
@@ -88,6 +88,13 @@ | |||
</dependency> | |||
<!-- 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> |
@@ -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, |
@@ -33,6 +33,10 @@ | |||
<groupId>org.mybatis</groupId> | |||
<artifactId>mybatis</artifactId> | |||
</dependency> | |||
<dependency> | |||
<groupId>org.codehaus.sonar</groupId> | |||
<artifactId>sonar-deprecated</artifactId> | |||
</dependency> | |||
<dependency> | |||
<groupId>org.codehaus.sonar</groupId> | |||
<artifactId>sonar-update-center-common</artifactId> |
@@ -10,10 +10,6 @@ | |||
<name>SonarQube :: Deprecated</name> | |||
<dependencies> | |||
<dependency> | |||
<groupId>${project.groupId}</groupId> | |||
<artifactId>sonar-core</artifactId> | |||
</dependency> | |||
<dependency> | |||
<groupId>${project.groupId}</groupId> | |||
<artifactId>sonar-plugin-api</artifactId> |
@@ -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); | |||
} | |||
} |
@@ -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 { | |||
/** |
@@ -149,6 +149,13 @@ | |||
<scope>provided</scope> | |||
</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> |
@@ -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); |
@@ -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; | |||
} | |||
@@ -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"}) |
@@ -69,13 +69,6 @@ | |||
<scope>compile</scope> | |||
<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> |