Add some recommended attributes to javac tasks
[jabaws.git] / build.xml
index 384fcb4..4a04f60 100644 (file)
--- a/build.xml
+++ b/build.xml
@@ -1,8 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 
-<project default="jabaws" name="Build Java Bioinformatics Analysis Web Services" basedir=".">
+<project default="build-all" 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-->
        <!-- dependencies on other compbio projects  -->
        <property name="compbio-annotation" value="compbio-annotations-1.0.jar"/>
        <property name="compbio-util" value="compbio-util-1.4.jar"/>
-       <property name="compbio-ga" value="compbio-ga-1.0.jar"/>
+       <property name="compbio-ga" value="compbio-ga-1.1.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="jaba-client-src" value="${distdir}/jaba-client-src-${jaba_version}.jar"/>
-
-       <property name="full-jaba-jar" value="${distdir}/full-jabaws.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-pack.zip"/>
-       <property name="jaba" value="${distdir}/jaba.war"/>
-       <!-- TODO  
-       <property name="jaba-dundee" value="${distdir}/jaba-dundee.war"/>
-        -->
-       <property name="jaba-no-binaries" value="${distdir}/jaba-no-binaries.war"/>
+       <property name="jabaws_version" value="2.1.0"/>
+       <property name="core" value="${distdir}/jabaws-core-${jabaws_version}.jar"/>
+       <property name="core-src" value="${distdir}/jabaws-core-src-${jabaws_version}.jar"/>
+       <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="stat-updater" value="${distdir}/stat-updater-${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="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"/>
+       <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" />
                <pathelement location="${classes}" />
        </path>
 
+       <fileset dir="${basedir}/WEB-INF/classes/" id="fullclient">
+               <!-- Datamodel -->
+               <include name="compbio/data/**"/>
+               <include name="compbio/metadata/**"/>
+               <!-- Engines -->
+               <include name="compbio/engine/**"/>
+               <!-- Runners -->
+               <include name="compbio/runner/**"/>
+               <!-- Logging configuration -->
+       </fileset>
+
+       <fileset dir="${basedir}/WEB-INF/classes/" id="statupdater">
+               <!-- Datamodel -->
+               <include name="compbio/data/**"/>
+               <include name="compbio/metadata/**"/>
+               <!-- Engines -->
+               <include name="compbio/engine/**"/>
+               <!-- Runners -->
+               <include name="compbio/runner/**"/>
+               <!-- Runners -->
+               <include name="compbio/stat/collector/**"/>
+               <include name="compbio/ws/client/**"/>
+               <!-- Logging configuration -->
+       </fileset>
+
+       
+       
+       <!-- Clean temp directories -->
+       <target name="clean">
+               <delete dir="${classes}" />
+               <delete dir="${basedir}/logs" />
+               <delete file="${distdir}/binaries.zip" />
+               <delete file="${basedir}/activity.log" />
+               <delete file="${basedir}/derby.log" />
+               <mkdir dir="${classes}" />
+               <copy file="${basedir}/log/log4j.properties" tofile="${classes}/log4j.properties" />
+       </target>
+
+       <!-- Clean up temp directories and dist directory (all jar, zip, and war files deleted) -->
+       <target name="full-clean" depends="clean">
+               <delete>
+                       <fileset dir="${distdir}">
+                               <include name="*.jar"/>
+                               <include name="*.zip"/>
+                               <include name="*.war"/>
+                       </fileset>
+               </delete>
+       </target>
+
+       <target name="clearStatDB" description="Remove all records from statistics database">
+               <echo>Cleaning Statistics database</echo>
+               <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>
+
        <!--
        The compilation order is 
        1. datamodel 
        5. webservices
        Packages of the lower order could not have dependencies on the packages on the next layer. 
        So runners (layer 3) depends on the engines and the datamodel but engines does not depend on 
-       anything in runners or any other layers above. Testscr is not allowed to test webservices. 
+       anything in runners or any other layers above. Testsrc is not allowed to test webservices. 
        -->
        <target name="compile_with_debug" depends="clean" description="Perform a multiple step compilation to ensure layered structure is preserved. Debug enabled.">
                <!-- copy files to class path-->
                <copy file="${basedir}/log/log4j.properties" tofile="${classes}/log4j.properties" />
                <!-- Complile the datamodel first -->
-               <javac srcdir="${basedir}/datamodel" destdir="${classes}" target="1.6"
-                               source="1.6" debug="on" encoding="UTF-8" verbose="false" nowarn="true" >
+               <javac srcdir="${basedir}/datamodel" destdir="${classes}" target="1.6" source="1.6" includeantruntime="false" debug="on" encoding="UTF-8" verbose="false" nowarn="true" >
                        <compilerarg value="-Xlint:unchecked"/>
                        <classpath refid="project.classpath" />
                </javac>
                <!-- Complile the engines -->
-               <javac srcdir="${basedir}/engine" destdir="${classes}" target="1.6"
-                               source="1.6" debug="on" encoding="UTF-8" verbose="false" nowarn="true" >
+               <javac srcdir="${basedir}/engine" destdir="${classes}" target="1.6" source="1.6" includeantruntime="false" debug="on" encoding="UTF-8" verbose="false" nowarn="true" >
                        <compilerarg value="-Xlint:unchecked"/>
                        <classpath refid="project.classpath" />
                </javac>
                <!-- Complile the runners -->
-               <javac srcdir="${basedir}/runner" destdir="${classes}" target="1.6"
-                               source="1.6" debug="on" encoding="UTF-8" verbose="false" nowarn="true" >
+               <javac srcdir="${basedir}/runner" destdir="${classes}" target="1.6" source="1.6" includeantruntime="false" debug="on" encoding="UTF-8" verbose="false" nowarn="true" >
                        <compilerarg value="-Xlint:unchecked"/>
                        <classpath refid="project.classpath" />
                </javac>
                <!-- Complile the webservices -->
-               <javac srcdir="${basedir}/webservices" destdir="${classes}" target="1.6"
-                               source="1.6" debug="on" encoding="UTF-8" verbose="false" nowarn="true" >
+               <javac srcdir="${basedir}/webservices" destdir="${classes}" target="1.6" source="1.6" includeantruntime="false" debug="on" encoding="UTF-8" verbose="false" nowarn="true" >
                        <compilerarg value="-Xlint:unchecked"/>
                        <classpath refid="project.classpath" />
                </javac>
                <!-- Complile the tests -->
-               <javac srcdir="${basedir}/testsrc" destdir="${classes}" target="1.6"
-                               source="1.6" debug="on" encoding="UTF-8" verbose="false" nowarn="true" >
+               <javac srcdir="${basedir}/testsrc" destdir="${classes}" target="1.6" debug="on" encoding="UTF-8" verbose="false" nowarn="true" >
                        <compilerarg value="-Xlint:unchecked"/>
                        <classpath refid="project.classpath" />
                        <classpath refid="test.classpath" />
                </javac>
        </target>
 
-       <!-- Clean temp directories -->
-       <target name="clean">
-               <delete dir="${classes}" />
-               <delete file="${distdir}/binaries.zip" />
-               <delete file="${basedir}/activity.log" />
-               <delete file="${basedir}/derby.log" />
-               <mkdir dir="${classes}" />
-               <copy file="${basedir}/log/log4j.properties" tofile="${classes}/log4j.properties" />
-       </target>
-
-       <!-- Clean up temp directories and dist directory (all jar, zip, and war files deleted) -->
-       <target name="full-clean" depends="clean">
-               <delete>
-                       <fileset dir="${distdir}">
-                               <include name="*.jar"/>
-                               <include name="*.zip"/>
-                               <include name="*.war"/>
-                       </fileset>
-               </delete>
-       </target>
-
-       <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>
-       </target>
-
        <!--
-       Compile with optimisation. Do not compile testsrc 
+       Compile with optimisation. Do not compile testsrc
        The compilation order is 
        1. datamodel 
        2. engine
        3. runner
        4. webservices
        Packages of the lower order could not have dependencies on the packages on the next layer. 
-       So runners (layer 3) depends on the engines and the datamodel but engines does not depend on 
-       anything in runners or any other layers above.  
+       So runners (layer 3) depends on the engines and the datamodel but engines does not depend 
+       on anything in runners or any other layers above.
        -->
        <target name="compile" depends="clean" description="Perform a multiple step compilation to ensure layered structure is preserved. Debug disabled, optimisation enabled. Tests are not compiled.">
                <!-- copy files to class path-->
                <copy file="${basedir}/log/log4j.properties" tofile="${classes}/log4j.properties" />
                <!-- Complile the datamodel first -->
-               <javac srcdir="${basedir}/datamodel" destdir="${classes}" target="1.6" source="1.6" debug="off" optimize="on" encoding="UTF-8" verbose="false" nowarn="true">
+               <javac srcdir="${basedir}/datamodel" destdir="${classes}" target="1.6" source="1.6" includeantruntime="false" debug="off" optimize="on" encoding="UTF-8" verbose="false" nowarn="true">
                        <compilerarg value="-Xlint:-unchecked" />
                        <classpath refid="project.classpath" />
                </javac>
                <!-- Complile the engines -->
-               <javac srcdir="${basedir}/engine" destdir="${classes}" target="1.6" source="1.6" debug="off" optimize="on" encoding="UTF-8" verbose="false" nowarn="true">
-                       <compilerarg value="-Xlint:-all" />
+               <javac srcdir="${basedir}/engine" destdir="${classes}" target="1.6" source="1.6" includeantruntime="false" debug="off" optimize="on" encoding="UTF-8" verbose="false" nowarn="true">
+                       <compilerarg value="-Xlint:all" />
                        <compilerarg value="-Xlint:-unchecked" />
                        <classpath refid="project.classpath" />
                </javac>
                <!-- Complile the runners -->
-               <javac srcdir="${basedir}/runner" destdir="${classes}" target="1.6" source="1.6" debug="off" optimize="on" encoding="UTF-8" verbose="false" nowarn="true">
+               <javac srcdir="${basedir}/runner" destdir="${classes}" target="1.6" source="1.6" includeantruntime="false" debug="off" optimize="on" encoding="UTF-8" verbose="false" nowarn="true">
                        <compilerarg value="-Xlint:-unchecked" />
                        <classpath refid="project.classpath" />
                </javac>
                <!-- Complile the webservices -->
-               <javac srcdir="${basedir}/webservices" destdir="${classes}" target="1.6" source="1.6" debug="off" optimize="on" encoding="UTF-8" verbose="false" nowarn="true">
+               <javac srcdir="${basedir}/webservices" destdir="${classes}" target="1.6" source="1.6" includeantruntime="false" debug="off" optimize="on" encoding="UTF-8" verbose="false" nowarn="true">
                        <compilerarg value="-Xlint:-unchecked" />
                        <classpath refid="project.classpath" />
                </javac>
-
        </target>
 
-
-       <target name="datamodel-jar" description="Pack data model classes" depends="compile">
+       <target name="datamodel-jar" depends="compile" description="Pack data model classes">
                <echo>Jar file: Minimal WS client jar</echo>
-               <delete file="${basedir}/${datamodel}">
-               </delete>
+               <delete file="${basedir}/${datamodel}"></delete>
                <jar jarfile="${basedir}/${datamodel}">
                        <zipgroupfileset excludes="META-INF/*.SF" dir="${web.lib.path}" >
                                <include name="${compbio-util}"/>
                </jar>
        </target>
 
-       <target name="jaba-client-src-jar" description="Pack metadata, data model, WS interfaces, a simple ws client class" depends="datamodel-source-jar">
+       <target name="datamodel-source-jar" depends="compile" description="Pack java sources">
+               <delete file="${datamodel-src}"></delete>
+               <jar jarfile="${datamodel-src}">
+                       <fileset dir="${basedir}/datamodel">
+                               <include name="**"/>
+                       </fileset>
+                       <zipgroupfileset excludes="META-INF/*.MF" dir="${lib.path}/src">
+                               <include name="**"/>
+                       </zipgroupfileset>
+                       <manifest>
+                               <attribute name="Built-By" value="${author}" />
+                               <attribute name="Implementation-Title" value="${product} Datamodel Source Code Archive" />
+                               <attribute name="Implementation-Vendor" value="${author}" />
+                               <attribute name="Implementation-URL" value="${project.url}" />
+                       </manifest>
+               </jar>
+       </target>
+
+       <target name="core-jar" depends="compile" description="Pack jabaws core classes">
+               <echo>Jar file: JABAWS core jar</echo>
+               <delete file="${basedir}/${core}"></delete>
+               <jar jarfile="${basedir}/${core}">
+                       <zipgroupfileset excludes="META-INF/*.SF" dir="${web.lib.path}" >
+                               <include name="${compbio-util}"/>
+                               <include name="${compbio-annotation}"/>
+                       </zipgroupfileset>
+                       <fileset refid="fullclient"/>
+                       <manifest>
+                               <attribute name="Built-By" value="${author}" />
+                               <attribute name="Class-Path" value="." />
+                               <attribute name="Implementation-Title" value="JABAWS Core for ${product}" />
+                               <attribute name="Implementation-Vendor" value="${author}" />
+                               <attribute name="Implementation-URL" value="${project.url}" />
+                       </manifest>
+               </jar>
+       </target>
+       
+       <target name="core-source-jar" depends="compile" description="Pack jabaws core java sources">
+               <delete file="${core-src}"></delete>
+               <jar jarfile="${core-src}">
+                       <fileset dir="${basedir}/datamodel">
+                               <include name="**"/>
+                       </fileset>
+                       <fileset dir="${basedir}/engine">
+                               <include name="**"/>
+                       </fileset>
+                       <zipgroupfileset excludes="META-INF/*.MF" dir="${lib.path}/src">
+                               <include name="**"/>
+                       </zipgroupfileset>
+                       <manifest>
+                               <attribute name="Built-By" value="${author}" />
+                               <attribute name="Implementation-Title" value="${product} JABAWS Core Source Code Archive" />
+                               <attribute name="Implementation-Vendor" value="${author}" />
+                               <attribute name="Implementation-URL" value="${project.url}" />
+                       </manifest>
+               </jar>
+       </target>
+
+       <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. -->
-                                       <include name="compbio/data/msa/**"/>
-                                       <exclude name="compbio/ws/client/ServicesUtil**"/>
-                                       <exclude name="compbio/ws/client/AAConClient**"/>
-                                       <include name="compbio/ws/client/**"/>
-                               </fileset>
-                               <manifest>
-                                       <attribute name="Built-By" value="${author}" />
-                                       <attribute name="Implementation-Title" value="${product} Client Source Code" />
-                                       <attribute name="Implementation-Vendor" value="${author}" />
-                                       <attribute name="Implementation-URL" value="${project.url}" />
-                               </manifest>
-                       </jar>
+                       <fileset dir="${basedir}/webservices">
+                               <!-- This will include JAXWS artifacts. Alternatively they can be generated on the fly. -->
+                               <include name="compbio/data/msa/**"/>
+                               <exclude name="compbio/ws/client/ServicesUtil**"/>
+                               <exclude name="compbio/ws/client/AAConClient**"/>
+                               <include name="compbio/ws/client/**"/>
+                       </fileset>
+                       <manifest>
+                               <attribute name="Built-By" value="${author}" />
+                               <attribute name="Implementation-Title" value="${product} Client Source Code" />
+                               <attribute name="Implementation-Vendor" value="${author}" />
+                               <attribute name="Implementation-URL" value="${project.url}" />
+                       </manifest>
+               </jar>
        </target>
-       
-       <target name="minimal-jaba-client-jar" description="Pack metadata, data model, WS interfaces, a simple ws client class" depends="compile, datamodel-jar">
+
+       <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. -->
                                <include name="compbio/data/msa/**"/>
                                <include name="compbio/ws/client/**"/>
                        </fileset>
-                       <zipgroupfileset  excludes="META-INF/*" dir="" includes="WEB-INF/lib/log4j-1.2.15.jar" />
+                       <zipgroupfileset excludes="META-INF/*" dir="" includes="WEB-INF/lib/log4j-1.2.15.jar" />
                        <manifest>
                                <attribute name="Built-By" value="${author}" />
                                <attribute name="Main-Class" value="compbio.ws.client.Jws2Client" />
                                <attribute name="Implementation-URL" value="${project.url}" />
                        </manifest>
                </jar>
-       </target>
-
-       <target name="aacon-ws-client-jar" description="Pack metadata, data model, WS interfaces, a simple ws client class" depends="compile, datamodel-jar">
-               <echo>Jar file: AAConWS client jar</echo>
-               <delete file="${basedir}/${aacon-ws-client}">
-               </delete>
-               <jar jarfile="${basedir}/${aacon-ws-client}">
+               <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. -->
                        </fileset>
                        <manifest>
                                <attribute name="Built-By" value="${author}" />
-                               <attribute name="Main-Class" value="compbio.ws.client.AAConClient" />
+                               <attribute name="Main-Class" value="compbio.ws.client.Jws2Client" />
                                <attribute name="Class-Path" value="." />
-                               <attribute name="Implementation-Title" value="AACon Client" />
+                               <attribute name="Implementation-Title" value="Minimal ${product} Client" />
                                <attribute name="Implementation-Vendor" value="${author}" />
-                               <attribute name="Implementation-URL" value="http://www.compbio.dundee.ac.uk/aacon" />
+                               <attribute name="Implementation-URL" value="${project.url}" />
                        </manifest>
                </jar>
        </target>
 
-       <target name="source-jar" description="Pack java sources" depends="datamodel-source-jar">
-               <delete file="${basedir}/${jaba-source-jar}">
-               </delete>
-               <jar jarfile="${basedir}/${jaba-source-jar}">
-                       <zipgroupfileset  excludes="META-INF/*.MF" file="${datamodel-src}"/>
-                       <fileset dir="${basedir}/runner">
-                               <include name="**"/>
-                       </fileset>
-                       <fileset dir="${basedir}/engine">
-                               <include name="**"/>
-                       </fileset>
-                       <fileset dir="${basedir}/webservices/">
-                               <include name="**"/>
+
+       <target name="stat-updater" depends="compile" description="Prepare executable jar for stat updater">
+               <echo>Jar file: StatUpdater jar</echo>
+               <delete file="${basedir}/${stat-updater}"></delete>
+               <copy file="${basedir}/log/log4j.properties.updater" tofile="${basedir}/log4j.properties"/>
+               <jar jarfile="${basedir}/${stat-updater}">
+                       <fileset dir="${basedir}">
+                               <include name="log4j.properties"/>
                        </fileset>
-                       <manifest>
+                       <fileset refid="statupdater"/>
+                       <zipgroupfileset excludes="META-INF/*" dir="" includes="WEB-INF/lib/log4j-1.2.15.jar" />
+                       <zipgroupfileset excludes="META-INF/*" dir="" includes="WEB-INF/lib/derby-10.8.2.2.jar" />
+                       <zipgroupfileset excludes="META-INF/*" dir="" includes="lib/jcommander-1.30.jar" />
+                       <zipgroupfileset excludes="META-INF/*.SF" dir="${web.lib.path}" >
+                               <include name="${compbio-util}"/>
+                       </zipgroupfileset>                      <manifest>
                                <attribute name="Built-By" value="${author}" />
+                               <attribute name="Main-Class" value="compbio.stat.collector.ExecutionStatUpdater" />
                                <attribute name="Class-Path" value="." />
-                               <attribute name="Implementation-Title" value="${product} Source Code Archive" />
+                               <attribute name="Implementation-Title" value="JABAWS Statistics Updating Program ${product}" />
                                <attribute name="Implementation-Vendor" value="${author}" />
                                <attribute name="Implementation-URL" value="${project.url}" />
                        </manifest>
                </jar>
+               <delete file="${basedir}/log4j.properties"/>
        </target>
        
-       <target name="datamodel-source-jar" description="Pack java sources" depends="compile">
-                       <delete file="${datamodel-src}">
-                       </delete>
-                       <jar jarfile="${datamodel-src}">
-                               <fileset dir="${basedir}/datamodel">
-                                       <include name="**"/>
-                               </fileset>
-                               <zipgroupfileset excludes="META-INF/*.MF" dir="${lib.path}/src">
-                                       <include name="**"/>
-                               </zipgroupfileset>
-                               <manifest>
-                                       <attribute name="Built-By" value="${author}" />
-                                       <attribute name="Implementation-Title" value="${product} Datamodel Source Code Archive" />
-                                       <attribute name="Implementation-Vendor" value="${author}" />
-                                       <attribute name="Implementation-URL" value="${project.url}" />
-                               </manifest>
-                       </jar>
-               </target>
-
-       <fileset dir="${basedir}/WEB-INF/classes/" id="fullclient">
-               <!-- Datamodel -->
-               <include name="compbio/data/**"/>
-               <include name="compbio/metadata/**"/>
-               <!-- Engines -->
-               <include name="compbio/engine/**"/>
-               <!-- Runners -->
-               <include name="compbio/runner/**"/>
-               <!-- Logging configuration -->
-       </fileset>
-
-       <target name="full-jaba-client-jar" description="Pack datamodel, engine and runners" depends="compile">
+       <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="log4j-1.2.15.jar"/>
                                <include name="${compbio-util}"/>
                                <include name="${compbio-annotation}"/>
                                <include name="drmaa.jar"/>
                </jar>
        </target>
 
-       <target name="full-jaba-client" description="Pack binaries with sources and configuration files" 
-                       depends="full-jaba-client-jar, pack-binaries">
+       <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="full-jaba-jar" description="Pack datamodel, engine, runners, configuration, binaries and webservices" depends="compile">
-               <echo>Jar file: Full JABAWS jar</echo>
-               <delete file="${full-jaba-jar}">
+
+       <target name="source-jar" depends="datamodel-source-jar" description="Pack java sources">
+               <delete file="${basedir}/${jabaws-source-jar}">
                </delete>
-               <jar jarfile="${full-jaba-jar}">
+               <jar jarfile="${basedir}/${jabaws-source-jar}">
+                       <zipgroupfileset  excludes="META-INF/*.MF" file="${datamodel-src}"/>
+                       <fileset dir="${basedir}/runner">
+                               <include name="**"/>
+                       </fileset>
+                       <fileset dir="${basedir}/engine">
+                               <include name="**"/>
+                       </fileset>
+                       <fileset dir="${basedir}/webservices/">
+                               <include name="**"/>
+                       </fileset>
+                       <manifest>
+                               <attribute name="Built-By" value="${author}" />
+                               <attribute name="Class-Path" value="." />
+                               <attribute name="Implementation-Title" value="${product} Source Code Archive" />
+                               <attribute name="Implementation-Vendor" value="${author}" />
+                               <attribute name="Implementation-URL" value="${project.url}" />
+                       </manifest>
+               </jar>
+       </target>
+
+       <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-jabaws-client}">
+               </delete>
+               <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}"/>
                                <include name="${compbio-annotation}"/>
                                <include name="drmaa.jar"/>
                        </zipgroupfileset>
+                       <fileset refid="fullclient">
+                       </fileset>
                        <fileset dir="${basedir}/WEB-INF/classes/">
-                               <include name="compbio/**"/>
+                               <!-- Statistics web application -->
+                               <include name="compbio/stat/**"/>
+                               <!-- Web services-->
+                               <include name="compbio/ws/**"/>
                        </fileset>
                        <!-- Set WSTester as main to help user to test their deployments -->
                        <manifest>
                </zip>
        </target>
 
-<!-- DEPRICATED 
-       <target name="pack-windows-binaries" description="Zip only windows binary files">
-               <delete file="${win-binaries}" failonerror="false" />
-               <zip destfile="${win-binaries}">
-                       <zipfileset dir="${basedir}/binaries" prefix="binaries" >
-                               <include name="matrices/*" />
-                               <include name="windows/*" />
-                       </zipfileset>
-               </zip>
-       </target>
--->
-
-       <target name="jaba-no-binaries" description="Prepare JABAWS war file without native binaries" depends="full-jaba-jar, clearStatDB">
+       <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" description="Prepare JABAWS war file without runtime dependency - JAXWS jars" depends="jaba-no-binaries, pack-binaries">
+       <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>
 
-<!--
-DEPRICATED - STANDARD JABA WAR WILL WORK FOR WINDOWS JUST FINE, DOWNLOAD SPACE SAVING IS NOT WORTH THE ADDITIONAL COMPLEXITY 
-       <target name="jaba-complete-windows" description="Prepare JABAWS war file for windows" depends="jaba-no-binaries">
-               <echo>Preparing a complete war file</echo>
-               <copy tofile="${jaba-windows}" file="${jaba-no-binaries}"/>
-               <zip destfile="${jaba-windows}" update="true" >
-                       <zipgroupfileset file="${win-binaries}" />
-               </zip>
-       </target>
--->
-       <target name="build-all" description="Build-all the distributives"
-               depends="full-jaba-client, minimal-jaba-client-jar, jaba-no-binaries, jaba-complete, datamodel-jar, datamodel-source-jar, source-jar, jaba-client-src-jar"/>
+       <target name="build-all" depends="full-jabaws-client, minimal-jabaws-client-jar, jabaws-no-binaries, jabaws-complete, datamodel-jar, datamodel-source-jar, core-jar, core-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="*/**"/>
                </zip>
        </target>
 
-
+<!-- ####################################################################################################################################### -->
+<!-- Test targets -->
        <taskdef name="testNG" classname="org.testng.TestNGAntTask">
                <classpath refid="test.classpath">
                </classpath>
@@ -620,6 +667,4 @@ DEPRICATED - STANDARD JABA WAR WILL WORK FOR WINDOWS JUST FINE, DOWNLOAD SPACE S
                        <sysproperty key="TestingDataPath" value="${data.src}"/>
                </testNG>
        </target>
-
-
 </project>