2009-03-19 03:13:19 +08:00
|
|
|
<project name="Sting" default="dist" basedir="." xmlns:ivy="antlib:org.apache.ivy.ant">
|
2009-03-19 07:39:00 +08:00
|
|
|
<description>Compile and distribute the Sting toolkit</description>
|
2009-03-12 06:58:22 +08:00
|
|
|
|
2009-03-19 07:39:00 +08:00
|
|
|
<!-- Set target based on STING_BUILD_TYPE environment variable -->
|
|
|
|
|
<property environment="env" />
|
|
|
|
|
<condition property="target" value="playground" else="core">
|
|
|
|
|
<equals arg1="${env.STING_BUILD_TYPE}" arg2="playground" casesensitive="false" />
|
|
|
|
|
</condition>
|
|
|
|
|
<condition property="target.is.playground" value="true">
|
|
|
|
|
<equals arg1="${target}" arg2="playground" />
|
|
|
|
|
</condition>
|
2009-03-19 03:13:19 +08:00
|
|
|
|
2009-03-19 07:39:00 +08:00
|
|
|
<!-- set global properties for this build -->
|
|
|
|
|
<path id="thirdparty.dependencies">
|
2009-03-24 07:19:54 +08:00
|
|
|
<fileset dir="lib" includes="*.jar" />
|
2009-03-19 07:39:00 +08:00
|
|
|
</path>
|
|
|
|
|
|
2009-03-24 07:19:54 +08:00
|
|
|
<path id="source">
|
|
|
|
|
<dirset dir="java/src">
|
|
|
|
|
<patternset>
|
|
|
|
|
<include name="org/broadinstitute/sting/*" />
|
|
|
|
|
<exclude name="**/playground/**" unless="target.is.playground" />
|
|
|
|
|
</patternset>
|
|
|
|
|
</dirset>
|
2009-03-19 07:39:00 +08:00
|
|
|
</path>
|
|
|
|
|
|
2009-03-12 01:14:04 +08:00
|
|
|
<!-- ivy properties -->
|
|
|
|
|
<property name="ivy.install.version" value="2.0.0" />
|
|
|
|
|
<property name="ivy.home" value="${user.home}/.ant" />
|
|
|
|
|
<property name="ivy.jar.dir" value="${ivy.home}/lib" />
|
|
|
|
|
<property name="ivy.jar.file" value="ivy-${ivy.install.version}.jar" />
|
|
|
|
|
<property name="ivy.settings.dir" value="settings" />
|
|
|
|
|
<property file="${ivy.settings.dir}/ivysettings.properties" />
|
|
|
|
|
|
2009-03-12 06:58:22 +08:00
|
|
|
<target name="resolve" depends="init"
|
|
|
|
|
description="locate and download library dependencies">
|
|
|
|
|
<!-- retrieve ivy if necessary -->
|
2009-03-12 01:14:04 +08:00
|
|
|
<mkdir dir="${ivy.jar.dir}" />
|
|
|
|
|
<get src="http://repo1.maven.org/maven2/org/apache/ivy/ivy/${ivy.install.version}/${ivy.jar.file}"
|
|
|
|
|
dest="${ivy.jar.dir}/${ivy.jar.file}"
|
|
|
|
|
usetimestamp="true"/>
|
2009-03-12 06:58:22 +08:00
|
|
|
<!-- initialize and load ivy -->
|
2009-03-12 01:14:04 +08:00
|
|
|
<taskdef resource="org/apache/ivy/ant/antlib.xml"
|
|
|
|
|
uri="antlib:org.apache.ivy.ant"
|
|
|
|
|
classpath="${ivy.jar.dir}/${ivy.jar.file}" />
|
|
|
|
|
<ivy:settings file="${ivy.settings.dir}/ivysettings.xml" />
|
2009-03-12 06:58:22 +08:00
|
|
|
<!-- retrieve dependencies -->
|
2009-03-12 01:14:04 +08:00
|
|
|
<ivy:retrieve />
|
|
|
|
|
</target>
|
|
|
|
|
|
2009-03-02 02:27:32 +08:00
|
|
|
<target name="init">
|
|
|
|
|
<!-- Create the time stamp -->
|
|
|
|
|
<tstamp/>
|
2009-03-19 07:39:00 +08:00
|
|
|
|
|
|
|
|
<echo message="Compiling module ${target}" />
|
|
|
|
|
|
2009-03-02 02:27:32 +08:00
|
|
|
<!-- Create the build directory structure used by compile -->
|
2009-03-24 07:19:54 +08:00
|
|
|
<mkdir dir="build" />
|
2009-03-02 02:27:32 +08:00
|
|
|
</target>
|
|
|
|
|
|
2009-03-12 01:14:04 +08:00
|
|
|
<target name="compile" depends="init,resolve"
|
2009-03-12 06:58:22 +08:00
|
|
|
description="compile the source">
|
2009-03-24 07:19:54 +08:00
|
|
|
<!-- Compile the java code from ${src} into build -->
|
|
|
|
|
<javac destdir="build" classpathref="thirdparty.dependencies"
|
2009-03-19 07:39:00 +08:00
|
|
|
debug="true" debuglevel="lines,vars,source">
|
2009-03-24 07:19:54 +08:00
|
|
|
<src refid="source" />
|
2009-03-19 07:39:00 +08:00
|
|
|
</javac>
|
2009-03-02 02:27:32 +08:00
|
|
|
</target>
|
|
|
|
|
|
|
|
|
|
<target name="dist" depends="compile"
|
2009-03-12 06:58:22 +08:00
|
|
|
description="generate the distribution" >
|
2009-03-24 07:19:54 +08:00
|
|
|
<mkdir dir="dist"/>
|
2009-03-02 02:27:32 +08:00
|
|
|
|
2009-03-24 07:19:54 +08:00
|
|
|
<copy todir="dist">
|
|
|
|
|
<fileset dir="lib" includes="*.jar" />
|
2009-03-19 03:13:19 +08:00
|
|
|
</copy>
|
|
|
|
|
|
2009-03-24 07:19:54 +08:00
|
|
|
<jar jarfile="dist/StingUtils.jar">
|
|
|
|
|
<fileset dir="build" includes="**/utils/**/*.class" />
|
2009-03-19 03:13:19 +08:00
|
|
|
</jar>
|
|
|
|
|
|
2009-03-24 07:19:54 +08:00
|
|
|
<jar jarfile="dist/GenomeAnalysisTK.jar">
|
|
|
|
|
<fileset dir="build" includes="**/gatk/**/*.class" />
|
2009-03-19 03:13:19 +08:00
|
|
|
<manifest>
|
|
|
|
|
<attribute name="Main-Class" value="org.broadinstitute.sting.gatk.GenomeAnalysisTK" />
|
|
|
|
|
</manifest>
|
|
|
|
|
</jar>
|
|
|
|
|
|
2009-03-24 07:19:54 +08:00
|
|
|
<jar jarfile="dist/FourBaseCaller.jar" whenmanifestonly="skip">
|
|
|
|
|
<fileset dir="build" includes="**/fourbasecaller/**/*.class" />
|
|
|
|
|
<manifest>
|
|
|
|
|
<attribute name="Main-Class" value="org.broadinstitute.sting.playground.fourbasecaller.FourBaseCaller" />
|
|
|
|
|
</manifest>
|
|
|
|
|
</jar>
|
|
|
|
|
|
2009-03-25 04:10:48 +08:00
|
|
|
<jar jarfile="dist/FourBaseRecaller.jar" whenmanifestonly="skip">
|
|
|
|
|
<!--<fileset dir="build" includes="**/fourbasecaller/**/*.class" />-->
|
|
|
|
|
<fileset dir="build">
|
|
|
|
|
<include name="**/fourbasecaller/**/*.class" />
|
|
|
|
|
<include name="**/illumina/**/*.class" />
|
|
|
|
|
</fileset>
|
|
|
|
|
<manifest>
|
|
|
|
|
<attribute name="Main-Class" value="org.broadinstitute.sting.playground.fourbasecaller.FourBaseRecaller" />
|
|
|
|
|
</manifest>
|
|
|
|
|
</jar>
|
|
|
|
|
|
2009-03-24 07:19:54 +08:00
|
|
|
<jar jarfile="dist/Playground.jar" whenmanifestonly="skip">
|
|
|
|
|
<fileset dir="build">
|
|
|
|
|
<include name="**/*.class" />
|
|
|
|
|
<exclude name="**/utils/**" />
|
|
|
|
|
<exclude name="**/gatk/**" />
|
|
|
|
|
<exclude name="**/fourbasecaller/**" />
|
|
|
|
|
</fileset>
|
|
|
|
|
</jar>
|
2009-03-19 03:13:19 +08:00
|
|
|
|
|
|
|
|
<pathconvert property="jar.classpath" pathsep=" ">
|
2009-03-12 06:58:22 +08:00
|
|
|
<flattenmapper />
|
2009-03-24 07:19:54 +08:00
|
|
|
<fileset dir="dist" includes="*.jar" />
|
2009-03-12 03:44:02 +08:00
|
|
|
</pathconvert>
|
|
|
|
|
|
2009-03-24 07:19:54 +08:00
|
|
|
<jar jarfile="dist/StingUtils.jar" update="true">
|
2009-03-19 03:13:19 +08:00
|
|
|
<manifest>
|
|
|
|
|
<attribute name="Class-Path" value="${jar.classpath}" />
|
|
|
|
|
</manifest>
|
|
|
|
|
</jar>
|
|
|
|
|
|
2009-03-24 07:19:54 +08:00
|
|
|
<jar jarfile="dist/GenomeAnalysisTK.jar" update="true">
|
2009-03-19 03:13:19 +08:00
|
|
|
<manifest>
|
|
|
|
|
<attribute name="Class-Path" value="${jar.classpath}" />
|
|
|
|
|
</manifest>
|
|
|
|
|
</jar>
|
2009-03-22 01:59:13 +08:00
|
|
|
|
2009-03-24 07:19:54 +08:00
|
|
|
<jar jarfile="dist/FourBaseCaller.jar" update="true" whenmanifestonly="skip">
|
2009-03-22 01:59:13 +08:00
|
|
|
<manifest>
|
|
|
|
|
<attribute name="Class-Path" value="${jar.classpath}" />
|
|
|
|
|
</manifest>
|
|
|
|
|
</jar>
|
2009-03-19 03:13:19 +08:00
|
|
|
|
2009-03-25 04:10:48 +08:00
|
|
|
<jar jarfile="dist/FourBaseRecaller.jar" update="true" whenmanifestonly="skip">
|
|
|
|
|
<manifest>
|
|
|
|
|
<attribute name="Class-Path" value="${jar.classpath}" />
|
|
|
|
|
</manifest>
|
|
|
|
|
</jar>
|
|
|
|
|
|
2009-03-24 07:19:54 +08:00
|
|
|
<jar jarfile="dist/Playground.jar" update="true" whenmanifestonly="skip">
|
2009-03-11 03:34:00 +08:00
|
|
|
<manifest>
|
2009-03-12 03:44:02 +08:00
|
|
|
<attribute name="Class-Path" value="${jar.classpath}" />
|
2009-03-11 03:34:00 +08:00
|
|
|
</manifest>
|
|
|
|
|
</jar>
|
2009-03-02 02:27:32 +08:00
|
|
|
</target>
|
|
|
|
|
|
2009-03-14 02:43:07 +08:00
|
|
|
<target name="javadoc">
|
2009-03-24 07:19:54 +08:00
|
|
|
<mkdir dir="javadoc" />
|
|
|
|
|
<javadoc sourcepathref="${target}.srcdir" destdir="javadoc" />
|
2009-03-14 02:43:07 +08:00
|
|
|
</target>
|
|
|
|
|
|
2009-03-02 02:27:32 +08:00
|
|
|
<target name="clean"
|
2009-03-12 06:58:22 +08:00
|
|
|
description="clean up" >
|
2009-03-24 07:19:54 +08:00
|
|
|
<delete dir="out" />
|
|
|
|
|
<delete dir="build" />
|
|
|
|
|
<delete dir="dist" />
|
|
|
|
|
<delete dir="lib" />
|
2009-03-02 02:27:32 +08:00
|
|
|
</target>
|
2009-03-07 06:58:12 +08:00
|
|
|
</project>
|