diff options
author | Simon Brandhof <simon.brandhof@gmail.com> | 2013-10-01 22:08:11 +0200 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@gmail.com> | 2013-10-01 22:08:29 +0200 |
commit | 481a4dcc418f9c589934220ba4799d6124e4c690 (patch) | |
tree | 53e099a54a1b499c6c5616261d42c96b312dd3a0 /sonar-application | |
parent | c66ed023d5ef8de630557081b582dbde562eb3ee (diff) | |
download | sonarqube-481a4dcc418f9c589934220ba4799d6124e4c690.tar.gz sonarqube-481a4dcc418f9c589934220ba4799d6124e4c690.zip |
SONAR-4675 add some documentation
Diffstat (limited to 'sonar-application')
7 files changed, 20 insertions, 8 deletions
diff --git a/sonar-application/src/main/assembly/conf/logback-access.xml b/sonar-application/src/main/assembly/conf/logback-access.xml index 8e2f63b3cd9..e403ff47162 100644 --- a/sonar-application/src/main/assembly/conf/logback-access.xml +++ b/sonar-application/src/main/assembly/conf/logback-access.xml @@ -1,9 +1,16 @@ +<?xml version="1.0" encoding="UTF-8" ?> + <!-- - See http://logback.qos.ch/access.html#configuration + Log HTTP requests in the file logs/access.log + + See http://logback.qos.ch/access.html#configuration --> + <configuration debug="false"> + + <!-- Required for performance reason. See http://www.slf4j.org/legacy.html#jul-to-slf4j --> <contextListener class="ch.qos.logback.classic.jul.LevelChangePropagator"/> <appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> diff --git a/sonar-application/src/main/assembly/conf/logback.xml b/sonar-application/src/main/assembly/conf/logback.xml index 570c7169247..e2a2995e45c 100644 --- a/sonar-application/src/main/assembly/conf/logback.xml +++ b/sonar-application/src/main/assembly/conf/logback.xml @@ -1,5 +1,11 @@ <?xml version="1.0" encoding="UTF-8" ?> +<!-- + Logging configuration. + By default logs are generated in logs/sonar.log. + + See http://logback.qos.ch/manual/configuration.html +--> <configuration debug="false"> <contextListener class="ch.qos.logback.classic.jul.LevelChangePropagator"/> @@ -21,7 +27,7 @@ </encoder> </appender> - <!-- Display Rails warnings and errors in the standard Sonar log --> + <!-- Display Rails warnings and errors --> <logger name="rails" additivity="false"> <level value="WARN"/> <appender-ref ref="SONAR_FILE"/> diff --git a/sonar-application/src/main/java/org/sonar/application/Connectors.java b/sonar-application/src/main/java/org/sonar/application/Connectors.java index df945525d14..9dac5526d6e 100644 --- a/sonar-application/src/main/java/org/sonar/application/Connectors.java +++ b/sonar-application/src/main/java/org/sonar/application/Connectors.java @@ -35,9 +35,6 @@ class Connectors { configureShutdown(tomcat, props); Connector connector = new Connector("HTTP/1.1"); - - // TODO manage redirects from other ports ? - connector.setPort(props.intOf("sonar.web.port", 9000)); connector.setURIEncoding("UTF-8"); configurePool(props, connector); diff --git a/sonar-application/src/main/java/org/sonar/application/EmbeddedTomcat.java b/sonar-application/src/main/java/org/sonar/application/EmbeddedTomcat.java index ab934344ce9..db22f41ff3b 100644 --- a/sonar-application/src/main/java/org/sonar/application/EmbeddedTomcat.java +++ b/sonar-application/src/main/java/org/sonar/application/EmbeddedTomcat.java @@ -47,6 +47,9 @@ class EmbeddedTomcat { // See Ruby on Rails url_for System.setProperty("org.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH", "true"); + // Required for webapp and logback xml files + System.setProperty("SONAR_HOME", env.rootDir().getAbsolutePath()); + tomcat = new Tomcat(); // Initialize directories diff --git a/sonar-application/src/main/java/org/sonar/application/NullJarScanner.java b/sonar-application/src/main/java/org/sonar/application/NullJarScanner.java index c6c82e2104d..2f243649853 100644 --- a/sonar-application/src/main/java/org/sonar/application/NullJarScanner.java +++ b/sonar-application/src/main/java/org/sonar/application/NullJarScanner.java @@ -31,5 +31,6 @@ import java.util.Set; class NullJarScanner implements JarScanner { @Override public void scan(ServletContext context, ClassLoader classloader, JarScannerCallback callback, Set<String> jarsToSkip) { + // doing nothing is fast! } } diff --git a/sonar-application/src/main/java/org/sonar/application/StartServer.java b/sonar-application/src/main/java/org/sonar/application/StartServer.java index 3704265007c..8549a4a1c80 100644 --- a/sonar-application/src/main/java/org/sonar/application/StartServer.java +++ b/sonar-application/src/main/java/org/sonar/application/StartServer.java @@ -20,7 +20,6 @@ package org.sonar.application; // TODO dev mode -// TODO sanitize jetty dependencies // TODO remove logback/slf4j from sonar-server public final class StartServer { diff --git a/sonar-application/src/main/java/org/sonar/application/Webapp.java b/sonar-application/src/main/java/org/sonar/application/Webapp.java index 70d33d829b5..cffb43dd5b9 100644 --- a/sonar-application/src/main/java/org/sonar/application/Webapp.java +++ b/sonar-application/src/main/java/org/sonar/application/Webapp.java @@ -27,9 +27,8 @@ class Webapp { static void configure(Tomcat tomcat, Env env, Props props) { String ctx = props.of("sonar.web.context", "/"); try { - System.setProperty("SONAR_HOME", env.rootDir().getAbsolutePath()); Context context = tomcat.addWebapp(ctx, env.file("web").getAbsolutePath()); - context.setConfigFile(env.file("web/META-INF/context.xml").toURL()); + context.setConfigFile(env.file("web/META-INF/context.xml").toURI().toURL()); context.setJarScanner(new NullJarScanner()); } catch (Exception e) { |