<?xml version="1.0" encoding="UTF-8"?>
-<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/maven-v4_0_0.xsd">
+<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.codehaus.sonar</groupId>
<skipSanityChecks>false</skipSanityChecks>
<!-- default GWT configuration. It's overridden by the profile 'dev' to speed up compilation in dev environments-->
- <gwt.permutationSuffix />
+ <gwt.permutationSuffix/>
<gwt.extraJvmArgs>-Xmx512m -Xss1024k</gwt.extraJvmArgs>
<sonar.snapshotRepository.url>dav:https://dav.codehaus.org/snapshots.repository/sonar</sonar.snapshotRepository.url>
</properties>
<artifactId>jfreechart</artifactId>
<version>1.0.9</version>
</dependency>
+ <dependency>
+ <groupId>com.googlecode.json-simple</groupId>
+ <artifactId>json-simple</artifactId>
+ <version>1.1.1</version>
+ <exclusions>
+ <exclusion>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-annotations</artifactId>
</exclusion>
</exclusions>
</dependency>
- <dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-ehcache</artifactId>
- <version>3.3.2.GA</version>
- <exclusions>
- <exclusion>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
</goals>
</pluginExecutionFilter>
<action>
- <ignore />
+ <ignore/>
</action>
</pluginExecution>
<pluginExecution>
</goals>
</pluginExecutionFilter>
<action>
- <ignore />
+ <ignore/>
</action>
</pluginExecution>
<pluginExecution>
</goals>
</pluginExecutionFilter>
<action>
- <ignore />
+ <ignore/>
</action>
</pluginExecution>
<pluginExecution>
</goals>
</pluginExecutionFilter>
<action>
- <ignore />
+ <ignore/>
</action>
</pluginExecution>
<pluginExecution>
</goals>
</pluginExecutionFilter>
<action>
- <ignore />
+ <ignore/>
</action>
</pluginExecution>
</pluginExecutions>
<!-- removing "An item was expired by the cache while it was locked (increase your cache timeout)" msg -->
<level value="ERROR"/>
</logger>
- <logger name="org.hibernate.cache.EhCacheProvider">
- <!-- removing "org.hibernate.cache.EhCacheProvider - Could not find configuration)" message -->
- <level value="ERROR"/>
- </logger>
-
<logger name="org.hibernate">
<level value="WARN"/>
</logger>
</encoder>
</appender>
- <logger name="net.sf.ehcache">
- <level value="WARN"/>
- </logger>
<logger name="org.hibernate.cache.ReadWriteCache">
<!-- removing "An item was expired by the cache while it was locked (increase your cache timeout)" msg -->
<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.hibernate">
<level value="WARN"/>
</logger>
</encoder>
</appender>
- <logger name="net.sf.ehcache">
- <level value="WARN"/>
- </logger>
<logger name="org.hibernate.cache.ReadWriteCache">
<!-- removing "An item was expired by the cache while it was locked (increase your cache timeout)" msg -->
<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.hibernate">
<level value="WARN"/>
</logger>
<groupId>geronimo-spec</groupId>
<artifactId>geronimo-spec-jta</artifactId>
</dependency>
- <dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-ehcache</artifactId>
- </dependency>
<dependency>
<groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId>
<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
- <version>1.1.1</version>
</dependency>
<!-- logging -->
+++ /dev/null
-<ehcache>
- <!--ehcache config ref
-
- name:
- Sets the name of the cache. This is used to identify the cache. It must be unique.
-
- maxElementsInMemory:
- Sets the maximum number of objects that will be created in memory
-
- maxElementsOnDisk:
- Sets the maximum number of objects that will be maintained in the DiskStore
- The default value is zero, meaning unlimited.
-
- eternal:
- Sets whether elements are eternal. If eternal, timeouts are ignored and the
- element is never expired.
-
- overflowToDisk:
- Sets whether elements can overflow to disk when the memory store
- has reached the maxInMemory limit.
-
- The following attributes are optional.
-
- timeToIdleSeconds:
- Sets the time to idle for an element before it expires.
- i.e. The maximum amount of time between accesses before an element expires
- Is only used if the element is not eternal.
- Optional attribute. A value of 0 means that an Element can idle for infinity.
- The default value is 0.
-
- timeToLiveSeconds:
- Sets the time to live for an element before it expires.
- i.e. The maximum time between creation time and when an element expires.
- Is only used if the element is not eternal.
- Optional attribute. A value of 0 means that and Element can live for infinity.
- The default value is 0.
-
- diskPersistent:
- Whether the disk store persists between restarts of the Virtual Machine.
- The default value is false.
-
- diskExpiryThreadIntervalSeconds:
- The number of seconds between runs of the disk expiry thread. The default value
- is 120 seconds.
-
- memoryStoreEvictionPolicy:
- Policy would be enforced upon reaching the maxElementsInMemory limit. Default
- policy is Least Recently Used (specified as LRU). Other policies available -
- First In First Out (specified as FIFO) and Less Frequently Used
- (specified as LFU)
- -->
-
- <defaultCache
- maxElementsInMemory="4096"
- eternal="false"
- timeToIdleSeconds="300"
- timeToLiveSeconds="1200"
- overflowToDisk="false"
- memoryStoreEvictionPolicy="LRU"/>
-
- <cache
- name="org.sonar.api.measures.Metric"
- maxElementsInMemory="256"
- eternal="false"
- overflowToDisk="false"/>
- <cache
- name="org.sonar.api.rules.Rule"
- maxElementsInMemory="4096"
- eternal="false"
- overflowToDisk="false"/>
- <cache
- name="org.sonar.api.rules.RulesCategory"
- maxElementsInMemory="6"
- eternal="true"
- overflowToDisk="false"/>
-</ehcache>
\ No newline at end of file
--- /dev/null
+<dataset>
+
+ <properties id="1" prop_key="foo" text_value="bar" resource_id="[null]" user_id="[null]"/>
+ <properties id="2" prop_key="sonar.license" text_value="the license" resource_id="[null]" user_id="[null]"/>
+
+</dataset>
--- /dev/null
+<dataset>
+
+ <properties id="1" prop_key="foo" text_value="bar" resource_id="[null]" user_id="[null]"/>
+ <properties id="2" prop_key="sonar.license.secured" text_value="the license" resource_id="[null]" user_id="[null]"/>
+
+</dataset>
--- /dev/null
+<dataset>
+
+ <properties id="1" prop_key="foo" text_value="bar" resource_id="[null]" user_id="[null]"/>
+
+</dataset>
--- /dev/null
+<dataset>
+
+ <properties id="1" prop_key="foo" text_value="bar" resource_id="[null]" user_id="[null]"/>
+
+</dataset>
<dependency>
<groupId>org.codehaus.woodstox</groupId>
<artifactId>woodstox-core-lgpl</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>stax</groupId>
+ <artifactId>stax-api</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>org.codehaus.woodstox</groupId>
<groupId>commons-dbcp</groupId>
<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>
<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>
<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>
<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>
--- /dev/null
+/*
+ * 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());
+ }
+ }
+ }
+}
<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
- <version>1.1</version>
</dependency>
<dependency>
<groupId>commons-httpclient</groupId>