]> source.dussan.org Git - sonarqube.git/commitdiff
Remove useless Maven dependencies
authorSimon Brandhof <simon.brandhof@gmail.com>
Wed, 7 Nov 2012 16:09:48 +0000 (17:09 +0100)
committerSimon Brandhof <simon.brandhof@gmail.com>
Wed, 7 Nov 2012 16:13:17 +0000 (17:13 +0100)
17 files changed:
pom.xml
sonar-application/src/main/assembly/conf/logback.xml
sonar-batch/src/main/resources/org/sonar/batch/bootstrapper/logback.xml
sonar-batch/src/main/resources/org/sonar/batch/logback.xml
sonar-core/pom.xml
sonar-core/src/main/resources/ehcache.xml [deleted file]
sonar-core/src/test/resources/org/sonar/core/properties/PropertiesDaoTest/renamePropertyKey-result.xml [new file with mode: 0644]
sonar-core/src/test/resources/org/sonar/core/properties/PropertiesDaoTest/renamePropertyKey.xml [new file with mode: 0644]
sonar-core/src/test/resources/org/sonar/core/properties/PropertiesDaoTest/should_not_rename_if_same_key-result.xml [new file with mode: 0644]
sonar-core/src/test/resources/org/sonar/core/properties/PropertiesDaoTest/should_not_rename_if_same_key.xml [new file with mode: 0644]
sonar-plugin-api/pom.xml
sonar-server/pom.xml
sonar-server/src/dev/h2/conf/logback.xml
sonar-server/src/dev/mysql/conf/logback.xml
sonar-server/src/dev/postgresql/conf/logback.xml
sonar-server/src/main/java/org/sonar/server/startup/RenameDeprecatedPropertyKeys.java [new file with mode: 0644]
sonar-ws-client/pom.xml

diff --git a/pom.xml b/pom.xml
index a3ffaff5f480ef86777350ebd244ee5ad4e04497..0a31b81cb0411c4eb3b843b3099fcf3b23c586ed 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -1,5 +1,6 @@
 <?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>
@@ -91,7 +92,7 @@
     <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>
index 63913b48eea10bf781d3527886b922bd2528900f..cea4a381d499485b0e616221c2df0eac4bf37874 100644 (file)
     <!-- 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>
index eb3084afa545737a53f533c52fd486a56ab1f235..08e4a0a37031dc6b954e3f4e8e553b3f83d62d49 100644 (file)
     </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>
index 1dba6b7f3cca0bd387178390726734688f6d7af0..539320cd1b8a7b94cf96da408204df46ebb0b105 100644 (file)
     </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>
index 2a22e81b20e6ea63fa5bbf860e9df11901203e04..108a800bdb26b379a2baf541efd0444d7fe5e1be 100644 (file)
       <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>
@@ -67,7 +63,6 @@
     <dependency>
       <groupId>com.googlecode.json-simple</groupId>
       <artifactId>json-simple</artifactId>
-      <version>1.1.1</version>
     </dependency>
 
     <!-- logging -->
diff --git a/sonar-core/src/main/resources/ehcache.xml b/sonar-core/src/main/resources/ehcache.xml
deleted file mode 100644 (file)
index 9385f27..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-<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
diff --git a/sonar-core/src/test/resources/org/sonar/core/properties/PropertiesDaoTest/renamePropertyKey-result.xml b/sonar-core/src/test/resources/org/sonar/core/properties/PropertiesDaoTest/renamePropertyKey-result.xml
new file mode 100644 (file)
index 0000000..0877b00
--- /dev/null
@@ -0,0 +1,6 @@
+<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>
diff --git a/sonar-core/src/test/resources/org/sonar/core/properties/PropertiesDaoTest/renamePropertyKey.xml b/sonar-core/src/test/resources/org/sonar/core/properties/PropertiesDaoTest/renamePropertyKey.xml
new file mode 100644 (file)
index 0000000..6ab761e
--- /dev/null
@@ -0,0 +1,6 @@
+<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>
diff --git a/sonar-core/src/test/resources/org/sonar/core/properties/PropertiesDaoTest/should_not_rename_if_same_key-result.xml b/sonar-core/src/test/resources/org/sonar/core/properties/PropertiesDaoTest/should_not_rename_if_same_key-result.xml
new file mode 100644 (file)
index 0000000..b4fc11a
--- /dev/null
@@ -0,0 +1,5 @@
+<dataset>
+
+  <properties id="1" prop_key="foo" text_value="bar" resource_id="[null]" user_id="[null]"/>
+
+</dataset>
diff --git a/sonar-core/src/test/resources/org/sonar/core/properties/PropertiesDaoTest/should_not_rename_if_same_key.xml b/sonar-core/src/test/resources/org/sonar/core/properties/PropertiesDaoTest/should_not_rename_if_same_key.xml
new file mode 100644 (file)
index 0000000..b4fc11a
--- /dev/null
@@ -0,0 +1,5 @@
+<dataset>
+
+  <properties id="1" prop_key="foo" text_value="bar" resource_id="[null]" user_id="[null]"/>
+
+</dataset>
index 0b1ce4586f09411c7d1d7fee71c9d3624b7fb0df..90164cf32f10cc63b62c472a0fa943e3446f3866 100644 (file)
     <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>
index a92abf15a1005098a3c14dffae503c5fee4164a4..8b5c20e7aa50f3a20369fc6f892bbbf04718a9e7 100644 (file)
       <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>
index 3ea98589f8820926e4d8a28536c6bd8cfa3bc864..1bde810d72836c32a014e9f0107876f252028df5 100644 (file)
     <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>
index 3ea98589f8820926e4d8a28536c6bd8cfa3bc864..1bde810d72836c32a014e9f0107876f252028df5 100644 (file)
     <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>
index 3ea98589f8820926e4d8a28536c6bd8cfa3bc864..1bde810d72836c32a014e9f0107876f252028df5 100644 (file)
     <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 (file)
index 0000000..6e154c7
--- /dev/null
@@ -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());
+      }
+    }
+  }
+}
index 49d446dd589d7cbd56dae17d9aabecc3c53ebe55..ec7b3dca56d2080e2eb6c7e49d0f720d2561e4c8 100644 (file)
@@ -15,7 +15,6 @@
     <dependency>
       <groupId>com.googlecode.json-simple</groupId>
       <artifactId>json-simple</artifactId>
-      <version>1.1</version>
     </dependency>
     <dependency>
       <groupId>commons-httpclient</groupId>