diff options
author | Simon Brandhof <simon.brandhof@gmail.com> | 2012-11-07 17:09:48 +0100 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@gmail.com> | 2012-11-07 17:13:17 +0100 |
commit | 0c410b971537947ff4900e015fe71dd3e81157f2 (patch) | |
tree | 53ffe110128a866a218fa7fc4435b26283b095ac /sonar-server | |
parent | b633e57cbfe1789a2048b3b79702ff84514e8525 (diff) | |
download | sonarqube-0c410b971537947ff4900e015fe71dd3e81157f2.tar.gz sonarqube-0c410b971537947ff4900e015fe71dd3e81157f2.zip |
Remove useless Maven dependencies
Diffstat (limited to 'sonar-server')
-rw-r--r-- | sonar-server/pom.xml | 4 | ||||
-rw-r--r-- | sonar-server/src/dev/h2/conf/logback.xml | 9 | ||||
-rw-r--r-- | sonar-server/src/dev/mysql/conf/logback.xml | 9 | ||||
-rw-r--r-- | sonar-server/src/dev/postgresql/conf/logback.xml | 9 | ||||
-rw-r--r-- | sonar-server/src/main/java/org/sonar/server/startup/RenameDeprecatedPropertyKeys.java | 47 |
5 files changed, 47 insertions, 31 deletions
diff --git a/sonar-server/pom.xml b/sonar-server/pom.xml index a92abf15a10..8b5c20e7aa5 100644 --- a/sonar-server/pom.xml +++ b/sonar-server/pom.xml @@ -118,10 +118,6 @@ <artifactId>commons-dbcp</artifactId> </dependency> <dependency> - <groupId>org.hibernate</groupId> - <artifactId>hibernate-ehcache</artifactId> - </dependency> - <dependency> <groupId>org.jruby.rack</groupId> <artifactId>jruby-rack</artifactId> </dependency> diff --git a/sonar-server/src/dev/h2/conf/logback.xml b/sonar-server/src/dev/h2/conf/logback.xml index 3ea98589f88..1bde810d728 100644 --- a/sonar-server/src/dev/h2/conf/logback.xml +++ b/sonar-server/src/dev/h2/conf/logback.xml @@ -14,19 +14,10 @@ <level value="ERROR"/> </logger> - <logger name="org.hibernate.cache.EhCacheProvider"> - <!-- removing "org.hibernate.cache.EhCacheProvider - Could not find configuratio)" message --> - <level value="ERROR"/> - </logger> - <logger name="org.sonar.INFO"> <level value="INFO"/> </logger> - <logger name="net.sf.ehcache"> - <level value="INFO"/> - </logger> - <logger name="rails"> <level value="DEBUG"/> </logger> diff --git a/sonar-server/src/dev/mysql/conf/logback.xml b/sonar-server/src/dev/mysql/conf/logback.xml index 3ea98589f88..1bde810d728 100644 --- a/sonar-server/src/dev/mysql/conf/logback.xml +++ b/sonar-server/src/dev/mysql/conf/logback.xml @@ -14,19 +14,10 @@ <level value="ERROR"/> </logger> - <logger name="org.hibernate.cache.EhCacheProvider"> - <!-- removing "org.hibernate.cache.EhCacheProvider - Could not find configuratio)" message --> - <level value="ERROR"/> - </logger> - <logger name="org.sonar.INFO"> <level value="INFO"/> </logger> - <logger name="net.sf.ehcache"> - <level value="INFO"/> - </logger> - <logger name="rails"> <level value="DEBUG"/> </logger> diff --git a/sonar-server/src/dev/postgresql/conf/logback.xml b/sonar-server/src/dev/postgresql/conf/logback.xml index 3ea98589f88..1bde810d728 100644 --- a/sonar-server/src/dev/postgresql/conf/logback.xml +++ b/sonar-server/src/dev/postgresql/conf/logback.xml @@ -14,19 +14,10 @@ <level value="ERROR"/> </logger> - <logger name="org.hibernate.cache.EhCacheProvider"> - <!-- removing "org.hibernate.cache.EhCacheProvider - Could not find configuratio)" message --> - <level value="ERROR"/> - </logger> - <logger name="org.sonar.INFO"> <level value="INFO"/> </logger> - <logger name="net.sf.ehcache"> - <level value="INFO"/> - </logger> - <logger name="rails"> <level value="DEBUG"/> </logger> diff --git a/sonar-server/src/main/java/org/sonar/server/startup/RenameDeprecatedPropertyKeys.java b/sonar-server/src/main/java/org/sonar/server/startup/RenameDeprecatedPropertyKeys.java new file mode 100644 index 00000000000..6e154c7144e --- /dev/null +++ b/sonar-server/src/main/java/org/sonar/server/startup/RenameDeprecatedPropertyKeys.java @@ -0,0 +1,47 @@ +/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2012 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ +package org.sonar.server.startup; + +import com.google.common.base.Strings; +import org.sonar.api.config.PropertyDefinition; +import org.sonar.api.config.PropertyDefinitions; +import org.sonar.core.properties.PropertiesDao; + +/** + * @since 3.4 + */ +public class RenameDeprecatedPropertyKeys { + + private PropertiesDao dao; + private PropertyDefinitions definitions; + + public RenameDeprecatedPropertyKeys(PropertiesDao dao, PropertyDefinitions definitions) { + this.dao = dao; + this.definitions = definitions; + } + + public void start() { + for (PropertyDefinition definition : definitions.getAll()) { + if (!Strings.isNullOrEmpty(definition.getDeprecatedKey())) { + dao.renamePropertyKey(definition.getDeprecatedKey(), definition.getKey()); + } + } + } +} |