1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/.hgignore Wed Jun 30 14:48:53 2010 +0200
1.3 @@ -0,0 +1,2 @@
1.4 +syntax: glob
1.5 +build
2.1 --- a/bin/sonews.sh Wed May 12 11:18:02 2010 +0200
2.2 +++ b/bin/sonews.sh Wed Jun 30 14:48:53 2010 +0200
2.3 @@ -1,17 +1,18 @@
2.4 #!/bin/bash
2.5 -SCRIPTROOT=$(pwd)
2.6 -CLASSPATH=$SCRIPTROOT/lib/sonews.jar:\
2.7 -$SCRIPTROOT/lib/sonews-helpers.jar:\
2.8 -$SCRIPTROOT/lib/mysql-connector-java.jar:\
2.9 -$SCRIPTROOT/lib/glassfish-mail.jar:\
2.10 -$SCRIPTROOT/lib/postgresql.jar
2.11 +cd `dirname $0`/..
2.12 +NEWSROOT=`pwd`
2.13 +CLASSPATH=$NEWSROOT/lib/sonews.jar:\
2.14 +$NEWSROOT/lib/sonews-helpers.jar:\
2.15 +$NEWSROOT/lib/mysql-connector-java.jar:\
2.16 +$NEWSROOT/lib/glassfish-mail.jar:\
2.17 +$NEWSROOT/lib/postgresql.jar
2.18
2.19 -LOGFILE=sonews.log
2.20 -PIDFILE=sonews.pid
2.21 +LOGFILE=/var/log/sonews.log
2.22 +PIDFILE=/var/pid/sonews.pid
2.23 ARGS=$@
2.24
2.25 -MAINCLASS=org.sonews.daemon.Main
2.26 -JAVA=java
2.27 +MAINCLASS=org.sonews.Main
2.28 +JAVA=$JAVA_HOME/bin/java
2.29
2.30 case "$1" in
2.31 start)
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
3.2 +++ b/build.xml Wed Jun 30 14:48:53 2010 +0200
3.3 @@ -0,0 +1,126 @@
3.4 +<?xml version="1.0" encoding="UTF-8"?>
3.5 +<project name="sonews" default="main" basedir=".">
3.6 +
3.7 + <property name="prj" value="."/>
3.8 + <property name="out" value="build"/>
3.9 + <property name="build.dir" value="${out}"/>
3.10 + <property name="inst.dir" value="/opt/sonews/sonews-1.1"/>
3.11 + <property name="build.class" value="${build.dir}/class"/>
3.12 +
3.13 + <!-- define how to handle CLASSPATH environment -->
3.14 + <property name="build.sysclasspath" value="ignore"/>
3.15 +
3.16 + <!-- set "modern" java compiler -->
3.17 + <property name="build.compiler" value="modern"/>
3.18 +
3.19 + <!-- set wether we want to compile with debug information -->
3.20 + <property name="debug" value="on"/>
3.21 +
3.22 + <!-- set wether we want to compile with optimisation -->
3.23 + <property name="optimize" value="off"/>
3.24 +
3.25 + <!-- set wether we want to compile with or without deprecation -->
3.26 + <property name="deprecation" value="on"/>
3.27 +
3.28 +
3.29 + <!-- classpath settings for compile and javadoc tasks -->
3.30 + <path id="classpath">
3.31 + <pathelement location="${build.class}"/>
3.32 + <pathelement location="lib/glassfish-mail.jar"/>
3.33 + <pathelement location="lib/mysql-connector-java.jar"/>
3.34 + <pathelement location="lib/junit-4.8.2.jar"/>
3.35 + </path>
3.36 +
3.37 +
3.38 +
3.39 + <!-- the main target, called in recursive builds -->
3.40 + <target name="main" depends="prepare,compile,jar"/>
3.41 +
3.42 + <!-- prepare output directories - -->
3.43 + <target name="prepare">
3.44 + <mkdir dir="${build.dir}"/>
3.45 + <mkdir dir="${build.class}"/>
3.46 + </target>
3.47 +
3.48 +
3.49 + <target name="compile" depends="prepare">
3.50 + <javac destdir="${build.class}"
3.51 + debug="${debug}"
3.52 + deprecation="${deprecation}"
3.53 + optimize="${optimize}"
3.54 + classpathref="classpath">
3.55 + <src path="."/>
3.56 + <include name="org/sonews/**/*.java"/>
3.57 + </javac>
3.58 + <javac destdir="${build.class}"
3.59 + debug="${debug}"
3.60 + deprecation="${deprecation}"
3.61 + optimize="${optimize}"
3.62 + classpathref="classpath">
3.63 + <src path="."/>
3.64 + <include name="test/**/*java"/>
3.65 + </javac>
3.66 + </target>
3.67 +
3.68 + <!-- create jar file -->
3.69 + <target name="jar" depends="prepare,compile">
3.70 + <jar jarfile="${build.dir}/sonews.jar"
3.71 + basedir="${build.class}">
3.72 + <include name="org/sonews/**/*.class"/>
3.73 + </jar>
3.74 + <jar jarfile="${build.dir}/test.jar"
3.75 + basedir="${build.class}">
3.76 + <include name="test/**/*.class"/>
3.77 + </jar>
3.78 + <jar jarfile="${build.dir}/sonews-helpers.jar"
3.79 + basedir=".">
3.80 + <include name="helpers/**/*"/>
3.81 + </jar>
3.82 + </target>
3.83 +
3.84 + <target name="install" depends="jar">
3.85 + <mkdir dir="${inst.dir}/lib"/>
3.86 + <mkdir dir="${inst.dir}/bin"/>
3.87 + <mkdir dir="${inst.dir}/helpers"/>
3.88 + <copy todir="${inst.dir}/lib">
3.89 + <fileset dir="lib">
3.90 + <include name="*.jar"/>
3.91 + </fileset>
3.92 + <fileset dir="${build.dir}">
3.93 + <include name="*.jar"/>
3.94 + </fileset>
3.95 + </copy>
3.96 + <copy todir="${inst.dir}/bin">
3.97 + <fileset dir="bin">
3.98 + <include name="*.sh"/>
3.99 + </fileset>
3.100 + </copy>
3.101 + <chmod perm="755">
3.102 + <fileset dir="${inst.dir}/bin">
3.103 + <include name="*.sh"/>
3.104 + </fileset>
3.105 + </chmod>
3.106 + <copy todir="${inst.dir}/helpers">
3.107 + <fileset dir="helpers">
3.108 + <include name="*"/>
3.109 + </fileset>
3.110 + </copy>
3.111 + </target>
3.112 +
3.113 + <!-- clean up -->
3.114 + <target name="clean" depends="prepare">
3.115 + <delete includeEmptyDirs="true">
3.116 + <fileset dir="${build.class}">
3.117 + <patternset>
3.118 + <include name="**/*.class"/>
3.119 + <include name="**/*.properties"/>
3.120 + </patternset>
3.121 + </fileset>
3.122 + <fileset dir="${build.dir}">
3.123 + <patternset>
3.124 + <include name="**/*.jar"/>
3.125 + </patternset>
3.126 + </fileset>
3.127 + </delete>
3.128 + </target>
3.129 +</project>
4.1 Binary file lib/glassfish-mail.jar has changed
5.1 Binary file lib/junit-4.8.2.jar has changed
6.1 Binary file lib/mysql-connector-java.jar has changed
7.1 --- a/org/sonews/config/Config.java Wed May 12 11:18:02 2010 +0200
7.2 +++ b/org/sonews/config/Config.java Wed Jun 30 14:48:53 2010 +0200
7.3 @@ -132,10 +132,10 @@
7.4 {
7.5 String val = CommandLineConfig.getInstance().get(key, null);
7.6
7.7 - if(val == null && maxLevel <= LEVEL_FILE)
7.8 + if(val == null && maxLevel >= LEVEL_FILE)
7.9 {
7.10 val = FileConfig.getInstance().get(key, null);
7.11 - if(val == null && maxLevel <= LEVEL_BACKEND)
7.12 + if(val == null && maxLevel >= LEVEL_BACKEND)
7.13 {
7.14 val = BackendConfig.getInstance().get(key, def);
7.15 }