diff options
author | simonbrandhof <simon.brandhof@gmail.com> | 2010-11-18 17:01:17 +0000 |
---|---|---|
committer | simonbrandhof <simon.brandhof@gmail.com> | 2010-11-18 17:01:17 +0000 |
commit | 15cee314c45673795e0ba374d0cebc2344444433 (patch) | |
tree | 3bf44fbefce25507085ba5d2c8ccd2d77d0c1508 /sonar-application | |
parent | 91132257567b3d416f097a9f55e63e6a34f44c61 (diff) | |
download | sonarqube-15cee314c45673795e0ba374d0cebc2344444433.tar.gz sonarqube-15cee314c45673795e0ba374d0cebc2344444433.zip |
SONAR-1811 The file ../../logs/sonar.log is created when using the WAR packaging
Diffstat (limited to 'sonar-application')
-rw-r--r-- | sonar-application/src/main/assembly/conf/logback.xml | 11 | ||||
-rw-r--r-- | sonar-application/src/main/assembly/war/build.xml | 41 |
2 files changed, 32 insertions, 20 deletions
diff --git a/sonar-application/src/main/assembly/conf/logback.xml b/sonar-application/src/main/assembly/conf/logback.xml index 551ae9806b5..47de61218c1 100644 --- a/sonar-application/src/main/assembly/conf/logback.xml +++ b/sonar-application/src/main/assembly/conf/logback.xml @@ -19,7 +19,8 @@ </layout> </appender> - <!-- appender used when using sonar with the provided jetty web container --> + <!-- SONAR_STANDALONE/ --> + <!-- do not edit/remove the previous comment --> <appender name="SONAR_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> <File>../../logs/sonar.log</File> <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"> @@ -43,8 +44,8 @@ </pattern> </layout> </appender> - - <!-- appender used to profile Sonar Web Server --> + + <!-- appender used to profile Sonar Server --> <appender name="PROFILING_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> <File>../../logs/profiling.log</File> <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"> @@ -62,6 +63,10 @@ </layout> </appender> + <!-- do not edit/remove the following comment --> + <!-- /SONAR_STANDALONE --> + + <!-- Profiling of JRuby on Rails requests . Uncomment in order to log HTTP and SQL requests. Execute the following command to get the HTTP requests with execution time > 10s : diff --git a/sonar-application/src/main/assembly/war/build.xml b/sonar-application/src/main/assembly/war/build.xml index 32aecf746ce..16f89bc7f66 100644 --- a/sonar-application/src/main/assembly/war/build.xml +++ b/sonar-application/src/main/assembly/war/build.xml @@ -17,10 +17,10 @@ License along with Sonar; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 --> <project name="Sonar WAR builder" basedir="." default="war"> - <pathconvert targetos="unix" property="sonarHome"> - <path location="${basedir}/.."/> - </pathconvert> - + <pathconvert targetos="unix" property="sonarHome"> + <path location="${basedir}/.."/> + </pathconvert> + <target name="war" depends="clean"> <mkdir dir="build/sonar-server"/> <copy todir="build/sonar-server"> @@ -49,30 +49,37 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 <fileset dir="../conf" includes="logback.xml"/> </copy> - <!-- changing the loggers defaut appender to the SONAR_WAR appender --> + <!-- remove appenders configured for standalone mode --> <replace file="build/sonar-server/WEB-INF/classes/logback.xml"> <replacetoken><![CDATA[<appender-ref ref="SONAR_FILE"/>]]></replacetoken> <replacevalue><![CDATA[<appender-ref ref="SONAR_WAR"/>]]></replacevalue> </replace> + <replace file="build/sonar-server/WEB-INF/classes/logback.xml"> + <replacetoken><![CDATA[<appender-ref ref="PROFILING_FILE"/>]]></replacetoken> + <replacevalue><![CDATA[<appender-ref ref="SONAR_WAR"/>]]></replacevalue> + </replace> + + <!-- see SONAR-1811. The appender SONAR_FILE must be removed from logback configuration --> + <replaceregexp file="build/sonar-server/WEB-INF/classes/logback.xml" match="SONAR_STANDALONE/(.*)/SONAR_STANDALONE" replace="" byline="false" flags="gs"/> <war destfile="sonar.war" webxml="build/sonar-server/WEB-INF/web.xml"> <fileset dir="build/sonar-server"/> </war> <echo> - ----------------------------------------------------------------------------------------------------------- - sonar.war is ready to be deployed. It is linked to the Sonar home directory: - ${sonarHome} - - IMPORTANT NOTES : - * supported web servers are Jetty and Tomcat 5.x/6.x - * the web application uses the Sonar home directory. For this reason it must be deployed on this host only. - * the war file must be rebuilt when : - - configuration is updated (files in the directory conf/) - - the Sonar home directory is moved to other location - - sonar is upgraded to a new version + ----------------------------------------------------------------------------------------------------------- + sonar.war is ready to be deployed. It is linked to the Sonar home directory: + ${sonarHome} + + IMPORTANT NOTES : + * supported web servers are Jetty and Tomcat 5.x/6.x + * the web application uses the Sonar home directory. For this reason it must be deployed on this host only. + * the war file must be rebuilt when : + - configuration is updated (files in the directory conf/) + - the Sonar home directory is moved to other location + - sonar is upgraded to a new version It does not have to be rebuilt when a plugin is removed or installed. - ----------------------------------------------------------------------------------------------------------- + ----------------------------------------------------------------------------------------------------------- </echo> </target> |