1. git rid of jaba (now jabaws is everywhere)
authorSasha Sherstnev <a.sherstnev@dundee.ac.uk>
Tue, 30 Jul 2013 10:00:46 +0000 (11:00 +0100)
committerSasha Sherstnev <a.sherstnev@dundee.ac.uk>
Tue, 30 Jul 2013 10:00:46 +0000 (11:00 +0100)
2. fix problem with the clearStatDB target

build.xml
log/log4j.properties.statdb [new file with mode: 0644]

index e3ce16a..e0ad3a4 100644 (file)
--- a/build.xml
+++ b/build.xml
@@ -2,7 +2,6 @@
 
 <project default="jabaws" name="Build Java Bioinformatics Analysis Web Services" basedir=".">
 
-       <property name="basedir" location="${basedir}/log" />
        <property name="LD_LIBRARY_PATH" value="/gridware/sge/lib/lx24-amd64"/>
 
        <!-- Distributive file names-->
        <property name="compbio-ga" value="compbio-ga-1.0.jar"/>
 
        <!-- products -->
-       <property name="jaba_version" value="2.0.1"/>
-       <property name="datamodel" value="${distdir}/datamodel-${jaba_version}.jar"/>
-       <property name="datamodel-src" value="${distdir}/datamodel-src-${jaba_version}.jar"/>
-       <property name="min-jaba-client" value="${distdir}/min-jaba-client-${jaba_version}.jar"/>
-       <property name="min-jaba-client-nolog" value="${distdir}/min-jaba-client-nolog-${jaba_version}.jar"/>
-       <property name="jaba-client-src" value="${distdir}/jabaws-client-src-${jaba_version}.jar"/>
+       <property name="jabaws_version" value="3.0.0"/>
+       <property name="datamodel" value="${distdir}/datamodel-${jabaws_version}.jar"/>
+       <property name="datamodel-src" value="${distdir}/datamodel-src-${jabaws_version}.jar"/>
+       <property name="min-jabaws-client" value="${distdir}/min-jabaws-client-${jabaws_version}.jar"/>
+       <property name="min-jabaws-client-nolog" value="${distdir}/min-jabaws-client-nolog-${jabaws_version}.jar"/>
+       <property name="jabaws-client-src" value="${distdir}/jabaws-client-src-${jabaws_version}.jar"/>
        <property name="aacon-ws-client" value="${distdir}/aacon-ws-client.jar"/>
-       <property name="full-jaba-client" value="${distdir}/full-jaba-client-${jaba_version}.jar"/>
-       <property name="jaba-source-jar" value="${distdir}/jabaws-src-${jaba_version}.jar"/>
-       <property name="full-jaba-client-pack" value="${distdir}/full-jaba-client-${jaba_version}-pack.zip"/>
-       <property name="jaba" value="${distdir}/jabaws.war"/>
-       <!-- TODO  
-       <property name="jaba-dundee" value="${distdir}/jaba-dundee.war"/>
-        -->
-       <property name="jaba-no-binaries" value="${distdir}/jabaws-no-binaries.war"/>
+       <property name="full-jabaws-client" value="${distdir}/full-jabaws-client-${jabaws_version}.jar"/>
+       <property name="jabaws-source-jar" value="${distdir}/jabaws-src-${jabaws_version}.jar"/>
+       <property name="full-jabaws-client-pack" value="${distdir}/full-jabaws-client-${jabaws_version}-pack.zip"/>
+       <property name="jabaws" value="${distdir}/jabaws.war"/>
+       <!-- TODO 
+       <property name="jabaws-dundee" value="${distdir}/jabaws-dundee.war"/>
+       -->
+       <property name="jabaws-no-binaries" value="${distdir}/jabaws-no-binaries.war"/>
        <property name="binaries" value="${distdir}/binaries.zip"/>
-       <property name="jaba-devel-web" value="${distdir}/jaba-devel-website.zip"/>
+       <property name="jabaws-devel-web" value="${distdir}/jabaws-devel-website.zip"/>
 
        <!--Whole project archive -->
-       <property name="jaba-project" value="${distdir}/jaba-project.zip"/>
+       <property name="jabaws-project" value="${distdir}/jabaws-project.zip"/>
 
        <!-- java -->
        <property name="test.src" location="${basedir}/testsrc" />
@@ -81,6 +80,7 @@
        <!-- Clean temp directories -->
        <target name="clean">
                <delete dir="${classes}" />
+               <delete dir="${basedir}/tmplog" />
                <delete file="${distdir}/binaries.zip" />
                <delete file="${basedir}/activity.log" />
                <delete file="${basedir}/derby.log" />
 
        <target name="clearStatDB" description="Remove all records from statistics database">
                <echo>Cleaning Statistics database</echo>
-               <java classname="compbio.stat.collector.StatDB" fork="false" failonerror="true" classpath="${classes}">
-               <classpath refid="project.classpath" />
+               <java classname="compbio.stat.collector.StatDB" fork="true" failonerror="true" classpath="${classes}">
+                       <jvmarg value="-Dlog4j.configuration=file:log/log4j.properties.statdb" />
+                       <classpath refid="project.classpath" />
                </java>
        </target>
 
                </jar>
        </target>
 
-       <target name="jaba-client-src-jar" depends="datamodel-source-jar" description="Pack metadata, data model, WS interfaces, a simple ws client class">
+       <target name="jabaws-client-src-jar" depends="datamodel-source-jar" description="Pack metadata, data model, WS interfaces, a simple ws client class">
                <echo>Jar file: JABAWS client source</echo>
-               <delete file="${jaba-client-src}">
+               <delete file="${jabaws-client-src}">
                </delete>
-               <jar jarfile="${jaba-client-src}">
+               <jar jarfile="${jabaws-client-src}">
                        <zipgroupfileset  excludes="META-INF/*.MF" file="${datamodel-src}"/>
                        <fileset dir="${basedir}/webservices">
                                <!-- This will include JAXWS artifacts. Alternatively they can be generated on the fly. -->
                </jar>
        </target>
 
-       <target name="minimal-jaba-client-jar" depends="compile, datamodel-jar" description="Pack metadata, data model, WS interfaces, a simple ws client class">
+       <target name="minimal-jabaws-client-jar" depends="compile, datamodel-jar" description="Pack metadata, data model, WS interfaces, a simple ws client class">
                <echo>Jar file: Minimal WS client jar</echo>
-               <delete file="${basedir}/${min-jaba-client}"></delete>
-               <jar jarfile="${basedir}/${min-jaba-client}">
+               <delete file="${basedir}/${min-jabaws-client}"></delete>
+               <jar jarfile="${basedir}/${min-jabaws-client}">
                        <zipgroupfileset excludes="META-INF/*.SF" dir="" includes="${datamodel}" />
                        <fileset dir="${basedir}/WEB-INF/classes/">
                                <!-- This will include JAXWS artifacts. Alternatively they can be generated on the fly. -->
                                <attribute name="Implementation-URL" value="${project.url}" />
                        </manifest>
                </jar>
-               <delete file="${basedir}/${min-jaba-client-nolog}"></delete>
-               <jar jarfile="${basedir}/${min-jaba-client-nolog}">
+               <delete file="${basedir}/${min-jabaws-client-nolog}"></delete>
+               <jar jarfile="${basedir}/${min-jabaws-client-nolog}">
                        <zipgroupfileset excludes="META-INF/*.SF" dir="" includes="${datamodel}" />
                        <fileset dir="${basedir}/WEB-INF/classes/">
                                <!-- This will include JAXWS artifacts. Alternatively they can be generated on the fly. -->
                </jar>
        </target>
 
-       <target name="full-jaba-client-jar" depends="compile" description="Pack datamodel, engine and runners">
+       <target name="full-jabaws-client-jar" depends="compile" description="Pack datamodel, engine and runners">
                <echo>Jar file: Full WS client jar</echo>
-               <delete file="${full-jaba-client}">
+               <delete file="${full-jabaws-client}">
                </delete>
-               <jar jarfile="${full-jaba-client}">
+               <jar jarfile="${full-jabaws-client}">
                        <zipgroupfileset excludes="META-INF/*.SF" dir="${web.lib.path}" >
                                <include name="${compbio-util}"/>
                                <include name="${compbio-annotation}"/>
                </jar>
        </target>
 
-       <target name="full-jaba-client" depends="full-jaba-client-jar, pack-binaries" description="Pack binaries with sources and configuration files">
+       <target name="full-jabaws-client" depends="full-jabaws-client-jar, pack-binaries" description="Pack binaries with sources and configuration files">
                <echo>Packing binaries, and configuration files</echo>
-               <zip destfile="${full-jaba-client-pack}" >
+               <zip destfile="${full-jabaws-client-pack}" >
                        <zipgroupfileset file="${binaries}" />
                        <zipfileset dir="conf" prefix="conf" >
                                <exclude name="**/temp/**"/>
                        </zipfileset>
-                       <fileset file="${full-jaba-client}" />
+                       <fileset file="${full-jabaws-client}" />
                </zip>
        </target>
 
 
        <target name="source-jar" depends="datamodel-source-jar" description="Pack java sources">
-               <delete file="${basedir}/${jaba-source-jar}">
+               <delete file="${basedir}/${jabaws-source-jar}">
                </delete>
-               <jar jarfile="${basedir}/${jaba-source-jar}">
+               <jar jarfile="${basedir}/${jabaws-source-jar}">
                        <zipgroupfileset  excludes="META-INF/*.MF" file="${datamodel-src}"/>
                        <fileset dir="${basedir}/runner">
                                <include name="**"/>
                </jar>
        </target>
 
-       <target name="full-jaba-jar" depends="compile" description="Pack datamodel, engine, runners, configuration, binaries and webservices">
+       <target name="full-jabaws-jar" depends="compile" description="Pack datamodel, engine, runners, configuration, binaries and webservices">
                <echo>Jar file: Full WS client jar</echo>
-               <delete file="${full-jaba-client}">
+               <delete file="${full-jabaws-client}">
                </delete>
-               <jar jarfile="${full-jaba-client}">
+               <jar jarfile="${full-jabaws-client}">
                        <zipgroupfileset excludes="META-INF/*.SF" dir="${web.lib.path}" >
                                <include name="log4j-1.2.15.jar"/>
                                <include name="${compbio-util}"/>
                </zip>
        </target>
 
-       <target name="jaba-no-binaries" depends="full-jaba-jar, clearStatDB" description="Prepare JABAWS war file without native binaries">
+       <target name="jabaws-no-binaries" depends="full-jabaws-jar, clearStatDB" description="Prepare JABAWS war file without native binaries">
                <echo>Preparing a war file without binaries</echo>
-               <delete file="${jaba-no-binaries}">
+               <delete file="${jabaws-no-binaries}">
                </delete>
-               <zip destfile="${jaba-no-binaries}" whenempty="create">
+               <zip destfile="${jabaws-no-binaries}" whenempty="create">
                        <zipfileset dir="${basedir}/WEB-INF" prefix="WEB-INF">
                                <exclude name="classes"/>
                                <!-- These are included into JABA client so exclude the jars -->
                        </zipfileset>
                        <!-- Add JABAWS web site apart from the binary archive -->
                        <zipfileset dir="${basedir}/website" excludes="archive/**, devel*.html, tests/**, template.html"/>
-                       <zipfileset dir="." includes="${full-jaba-client}" fullpath="WEB-INF/lib/jaba-client.jar"/>
+                       <zipfileset dir="." includes="${full-jabaws-client}" fullpath="WEB-INF/lib/jabaws-client.jar"/>
                        <!-- Put a copy of log4j configuration file where it can be used  -->
                        <zipfileset dir="log" includes="log4j.properties" prefix="WEB-INF/classes"/>
                </zip>
 
        <target name="build-devel-website" description="Pack developement related pages, tests, javadoc" >
                <echo>Packing data for internal web site</echo>
-               <delete file="${jaba-devel-web}">
+               <delete file="${jabaws-devel-web}">
                </delete>
-               <zip destfile="${jaba-devel-web}" whenempty="create">
+               <zip destfile="${jabaws-devel-web}" whenempty="create">
                        <!-- Add JABAWS web site apart from the binary archive -->
                        <zipfileset dir="${basedir}/website" excludes="template.html, download.html, index.html, manual.html, howto.html, archive/**, prog_docs/**"/>
                </zip>
        </target>
 
-       <target name="jaba-complete" depends="jaba-no-binaries, pack-binaries" description="Prepare JABAWS war file without runtime dependency - JAXWS jars">
+       <target name="jabaws-complete" depends="jabaws-no-binaries, pack-binaries" description="Prepare JABAWS war file without runtime dependency - JAXWS jars">
                <echo>Preparing a complete war file</echo>
-               <delete file="${jaba}">
+               <delete file="${jabaws}">
                </delete>
-               <copy tofile="${jaba}" file="${jaba-no-binaries}"/>
-               <zip destfile="${jaba}" update="true" >
+               <copy tofile="${jabaws}" file="${jabaws-no-binaries}"/>
+               <zip destfile="${jabaws}" update="true" >
                        <zipgroupfileset file="${binaries}" />
                </zip>
        </target>
 
-       <target name="build-all" depends="full-jaba-client, minimal-jaba-client-jar, jaba-no-binaries, jaba-complete, datamodel-jar, datamodel-source-jar, source-jar, jaba-client-src-jar" description="Build-all the distributives"/>
+       <target name="build-all" depends="full-jabaws-client, minimal-jabaws-client-jar, jabaws-no-binaries, jabaws-complete, datamodel-jar, datamodel-source-jar, source-jar, jabaws-client-src-jar" description="Build-all the distributives"/>
 
        <!-- This task does not really depends on compile, but it is better to make sure that the code is sound -->
        <target name="archive-project" description="Pack everything in the project for those who do not have access to SVN" depends="compile">
-               <delete file="${jaba-project}">
+               <delete file="${jabaws-project}">
                </delete>
-               <zip destfile="${jaba-project}" whenempty="create" >
+               <zip destfile="${jabaws-project}" whenempty="create" >
                        <fileset dir="." excludes="${distdir}/**, jobsout/**, test-output/**, **.svn, dundee-conf/**, TODO.txt, IDEAS.txt, ${activity.log}, **/*.zip, **/*.war"/>
                        <!-- Add jobsout directory but no content -->
                        <zipfileset dir="${basedir}/jobsout" prefix="jobsout" excludes="*/**"/>
diff --git a/log/log4j.properties.statdb b/log/log4j.properties.statdb
new file mode 100644 (file)
index 0000000..f9541b0
--- /dev/null
@@ -0,0 +1,27 @@
+\r
+## CHANGE THIS (The root directory where to store all the log files)  \r
+#logDir = .\r
+\r
+## Uncomment to enable JWS2 activity logging to standard out (to the console if available)\r
+## for possible log levels please refer to Log4j documentation http://logging.apache.org/log4j/1.2/manual.html \r
+## Valid log levels are:\r
+## TRACE - log everything from below including very detailed messages (useful for debugging only)\r
+## DEBUG - log everything from below including some minor events (useful for debugging only)\r
+## INFO - log everything from below including some information messages\r
+## WARN - log error and warnings\r
+## ERROR - log errors and fatal events only \r
+## FATAL - log fatal events only\r
+\r
+##################################################################################################################################\r
+log4j.rootLogger=ERROR, R\r
+log4j.appender.R=org.apache.log4j.FileAppender\r
+log4j.appender.R.File=logs/StatDBcleaningErrorFile.log\r
+log4j.appender.R.layout=org.apache.log4j.PatternLayout\r
+log4j.appender.R.layout.ConversionPattern=%m%n %d{MM-dd@HH:mm:ss} %-5p (%13F:%L) %3x - \r
+\r
+# %d{ABSOLUTE} %5p %c{1}:%L -\r
+log4j.logger.compbio=WARN, B\r
+log4j.appender.B=org.apache.log4j.FileAppender\r
+log4j.appender.B.File=logs/StatDBcleaningWarningFile.log\r
+log4j.appender.B.layout=org.apache.log4j.PatternLayout\r
+log4j.appender.B.layout.ConversionPattern=%m%n %d{MM-dd@HH:mm:ss} %-5p (%13F:%L) %3x - \r