]> source.dussan.org Git - sonarqube.git/commitdiff
Fix dev mode
authorSimon Brandhof <simon.brandhof@gmail.com>
Mon, 10 Oct 2011 13:53:04 +0000 (15:53 +0200)
committerSimon Brandhof <simon.brandhof@gmail.com>
Mon, 10 Oct 2011 13:53:22 +0000 (15:53 +0200)
sonar-server/pom.xml
sonar-server/src/dev/derby/conf/logback.xml [new file with mode: 0644]
sonar-server/src/dev/derby/logback.xml [deleted file]
sonar-server/src/dev/mysql/conf/logback.xml [new file with mode: 0644]
sonar-server/src/dev/mysql/logback.xml [deleted file]
sonar-server/src/dev/oracle/sonar.properties [deleted file]
sonar-server/src/dev/postgresql/conf/logback.xml [new file with mode: 0644]
sonar-server/src/dev/postgresql/logback.xml [deleted file]
sonar-server/src/dev/web.xml

index 11343cbd4020f4cc84f63dd99d4476fd8b303f39..0142081d64e95c6aae77666ef73e627474a1d898 100644 (file)
               </execution>
             </executions>
           </plugin>
+          <plugin>
+            <artifactId>maven-resources-plugin</artifactId>
+            <executions>
+              <execution>
+                <id>copy-conf</id>
+                <phase>validate</phase>
+                <goals>
+                  <goal>copy-resources</goal>
+                </goals>
+                <configuration>
+                  <outputDirectory>${project.build.directory}/sonar-dev-home</outputDirectory>
+                  <resources>
+                    <resource>
+                      <directory>src/dev/${jdbcDialect}</directory>
+                      <filtering>false</filtering>
+                    </resource>
+                  </resources>
+                </configuration>
+              </execution>
+            </executions>
+          </plugin>
           <plugin>
             <groupId>org.mortbay.jetty</groupId>
             <artifactId>jetty-maven-plugin</artifactId>
 
     <profile>
       <id>postgresql</id>
+      <properties>
+        <jdbcDialect>postgresql</jdbcDialect>
+      </properties>
       <build>
         <plugins>
           <plugin>
 
     <profile>
       <id>mysql</id>
+      <properties>
+        <jdbcDialect>mysql</jdbcDialect>
+      </properties>
       <build>
         <plugins>
           <plugin>
 
     <profile>
       <id>derby</id>
+      <properties>
+        <jdbcDialect>derby</jdbcDialect>
+      </properties>
       <build>
         <plugins>
           <plugin>
diff --git a/sonar-server/src/dev/derby/conf/logback.xml b/sonar-server/src/dev/derby/conf/logback.xml
new file mode 100644 (file)
index 0000000..0fd2724
--- /dev/null
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<configuration>
+
+  <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+    <encoder>
+      <pattern>
+        %d{HH:mm:ss.SSS} %-5level %logger{15} %X - %msg%n
+      </pattern>
+    </encoder>
+  </appender>
+
+  <logger name="org.hibernate.SQL">
+       <level value="ERROR"/>
+  </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.sonar.DBSTATISTICS">
+       <level value="INFO"/>
+  </logger>
+
+  <logger name="org.sonar.INFO">
+       <level value="INFO"/>
+  </logger>
+
+  <logger name="net.sf.ehcache">
+       <level value="INFO"/>
+  </logger>
+
+
+  <logger name="rails.sonar">
+       <level value="INFO"/>
+  </logger>
+
+  <root>
+    <level value="INFO"/>
+    <appender-ref ref="STDOUT"/>
+  </root>
+
+</configuration>
diff --git a/sonar-server/src/dev/derby/logback.xml b/sonar-server/src/dev/derby/logback.xml
deleted file mode 100644 (file)
index d9a9a1d..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-
-<configuration>
-
-  <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
-    <layout class="ch.qos.logback.classic.PatternLayout">
-      <pattern>
-        %d{HH:mm:ss.SSS} %-5level %logger{15} %X - %msg%n
-      </pattern>
-    </layout>
-  </appender>
-
-  <logger name="org.hibernate.SQL">
-       <level value="ERROR"/>
-  </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.sonar.DBSTATISTICS">
-       <level value="INFO"/>
-  </logger>
-
-  <logger name="org.sonar.INFO">
-       <level value="INFO"/>
-  </logger>
-
-  <logger name="net.sf.ehcache">
-       <level value="INFO"/>
-  </logger>
-
-
-  <logger name="rails.sonar">
-       <level value="INFO"/>
-  </logger>
-
-  <root>
-    <level value="INFO"/>
-    <appender-ref ref="STDOUT"/>
-  </root>
-
-</configuration>
diff --git a/sonar-server/src/dev/mysql/conf/logback.xml b/sonar-server/src/dev/mysql/conf/logback.xml
new file mode 100644 (file)
index 0000000..cca1077
--- /dev/null
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<configuration>
+
+  <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+    <encoder>
+      <pattern>
+        %d{HH:mm:ss.SSS} %-5level %logger{15} %X - %msg%n
+      </pattern>
+    </encoder>
+  </appender>
+
+  <logger name="org.hibernate.SQL">
+       <level value="ERROR"/>
+  </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.sonar.DBSTATISTICS">
+       <level value="INFO"/>
+  </logger>
+
+  <logger name="org.sonar.INFO">
+       <level value="INFO"/>
+  </logger>
+
+  <logger name="net.sf.ehcache">
+       <level value="INFO"/>
+  </logger>
+
+
+  <logger name="rails.sonar">
+       <level value="INFO"/>
+  </logger>
+
+  <root>
+    <level value="INFO"/>
+    <appender-ref ref="STDOUT"/>
+  </root>
+
+</configuration>
diff --git a/sonar-server/src/dev/mysql/logback.xml b/sonar-server/src/dev/mysql/logback.xml
deleted file mode 100644 (file)
index d9a9a1d..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-
-<configuration>
-
-  <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
-    <layout class="ch.qos.logback.classic.PatternLayout">
-      <pattern>
-        %d{HH:mm:ss.SSS} %-5level %logger{15} %X - %msg%n
-      </pattern>
-    </layout>
-  </appender>
-
-  <logger name="org.hibernate.SQL">
-       <level value="ERROR"/>
-  </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.sonar.DBSTATISTICS">
-       <level value="INFO"/>
-  </logger>
-
-  <logger name="org.sonar.INFO">
-       <level value="INFO"/>
-  </logger>
-
-  <logger name="net.sf.ehcache">
-       <level value="INFO"/>
-  </logger>
-
-
-  <logger name="rails.sonar">
-       <level value="INFO"/>
-  </logger>
-
-  <root>
-    <level value="INFO"/>
-    <appender-ref ref="STDOUT"/>
-  </root>
-
-</configuration>
diff --git a/sonar-server/src/dev/oracle/sonar.properties b/sonar-server/src/dev/oracle/sonar.properties
deleted file mode 100644 (file)
index ab8b959..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-# Oracle
-sonar.jdbc.url:                            jdbc:oracle:thin:@192.168.1.99/XE
-sonar.jdbc.driverClassName:                oracle.jdbc.OracleDriver
-sonar.jdbc.username:                       sonar
-sonar.jdbc.password:                       sonar
-sonar.jdbc.maxActive:                      30
-sonar.jdbc.maxIdle:                        10
-sonar.jdbc.minIdle:                        2
-sonar.jdbc.maxWait:                        5000
-sonar.jdbc.minEvictableIdleTimeMillis:     600000
-sonar.jdbc.timeBetweenEvictionRunsMillis:  30000
-
-sonar.runtime.mode:                        development
\ No newline at end of file
diff --git a/sonar-server/src/dev/postgresql/conf/logback.xml b/sonar-server/src/dev/postgresql/conf/logback.xml
new file mode 100644 (file)
index 0000000..18772f2
--- /dev/null
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<configuration>
+
+  <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+    <encoder>
+      <pattern>
+        %d{HH:mm:ss.SSS} %-5level %logger{15} %X - %msg%n
+      </pattern>
+    </encoder>
+  </appender>
+  
+  <logger name="org.hibernate.SQL">
+       <level value="ERROR"/>
+  </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.sonar.DBSTATISTICS">
+       <level value="INFO"/>
+  </logger>
+  
+  <logger name="org.sonar.INFO">
+       <level value="INFO"/>
+  </logger>
+  
+  <logger name="net.sf.ehcache">
+       <level value="INFO"/>
+  </logger>
+  
+  
+  <logger name="rails.sonar">
+       <level value="INFO"/>
+  </logger>
+  
+  <root>
+    <level value="INFO"/>
+    <appender-ref ref="STDOUT"/>
+  </root>
+
+</configuration>
diff --git a/sonar-server/src/dev/postgresql/logback.xml b/sonar-server/src/dev/postgresql/logback.xml
deleted file mode 100644 (file)
index d430609..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-
-<configuration>
-
-  <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
-    <layout class="ch.qos.logback.classic.PatternLayout">
-      <pattern>
-        %d{HH:mm:ss.SSS} %-5level %logger{15} %X - %msg%n
-      </pattern>
-    </layout>
-  </appender>
-  
-  <logger name="org.hibernate.SQL">
-       <level value="ERROR"/>
-  </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.sonar.DBSTATISTICS">
-       <level value="INFO"/>
-  </logger>
-  
-  <logger name="org.sonar.INFO">
-       <level value="INFO"/>
-  </logger>
-  
-  <logger name="net.sf.ehcache">
-       <level value="INFO"/>
-  </logger>
-  
-  
-  <logger name="rails.sonar">
-       <level value="INFO"/>
-  </logger>
-  
-  <root>
-    <level value="INFO"/>
-    <appender-ref ref="STDOUT"/>
-  </root>
-
-</configuration>
index eb572468163f214a9048c88e5fa4299335db0f20..cca6dc5d8a9c5c51680f933a6d90773cc1e4499b 100644 (file)
     <param-value>3</param-value>
   </context-param>
 
-  <env-entry>
-    <description>JNDI logback context</description>
-    <env-entry-name>logback/context-name</env-entry-name>
-    <env-entry-type>java.lang.String</env-entry-type>
-    <env-entry-value>Sonar</env-entry-value>
-  </env-entry>
-
   <filter>
     <filter-name>DatabaseSessionFilter</filter-name>
     <filter-class>org.sonar.server.ui.DatabaseSessionFilter</filter-class>
@@ -91,8 +84,5 @@
   <listener>
     <listener-class>org.jruby.rack.rails.RailsServletContextListener</listener-class>
   </listener>
-  <listener>
-    <listener-class>ch.qos.logback.classic.selector.servlet.ContextDetachingSCL</listener-class>
-  </listener>
 
 </web-app>