85 lines
2.9 KiB
XML
85 lines
2.9 KiB
XML
<project name="AnalysisTK" default="dist" basedir="." xmlns:ivy="antlib:org.apache.ivy.ant">
|
|
<description>Compile and distribute the Sting analysis toolkit</description>
|
|
|
|
<!-- set global properties for this build -->
|
|
<property name="src" location="src"/>
|
|
<property name="build" location="build"/>
|
|
<property name="dist" location="dist"/>
|
|
<property name="lib" location="lib"/>
|
|
<property name="javadoc" location="javadoc" />
|
|
|
|
<path id="classpath">
|
|
<fileset dir="${lib}" includes="*.jar" />
|
|
</path>
|
|
|
|
<!-- 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" />
|
|
|
|
<target name="resolve" depends="init"
|
|
description="locate and download library dependencies">
|
|
<!-- retrieve ivy if necessary -->
|
|
<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"/>
|
|
<!-- initialize and load ivy -->
|
|
<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" />
|
|
<!-- retrieve dependencies -->
|
|
<ivy:retrieve />
|
|
</target>
|
|
|
|
<target name="init">
|
|
<!-- Create the time stamp -->
|
|
<tstamp/>
|
|
<!-- Create the build directory structure used by compile -->
|
|
<mkdir dir="${build}"/>
|
|
</target>
|
|
|
|
<target name="compile" depends="init,resolve"
|
|
description="compile the source">
|
|
<!-- Compile the java code from ${src} into ${build} -->
|
|
<javac srcdir="${src}" destdir="${build}" classpathref="classpath"
|
|
debug="true" debuglevel="lines,vars,source" />
|
|
</target>
|
|
|
|
<target name="dist" depends="compile"
|
|
description="generate the distribution" >
|
|
<mkdir dir="${dist}"/>
|
|
|
|
<pathconvert property="jar.classpath" pathsep=" " refid="classpath">
|
|
<flattenmapper />
|
|
</pathconvert>
|
|
|
|
<jar jarfile="${dist}/AnalysisTK.jar" basedir="${build}">
|
|
<manifest>
|
|
<attribute name="Class-Path" value="${jar.classpath}" />
|
|
<attribute name="Main-Class" value="org.broadinstitute.sting.atk.AnalysisTK" />
|
|
</manifest>
|
|
</jar>
|
|
|
|
<copy todir="${dist}">
|
|
<fileset dir="${lib}" includes="*.jar" />
|
|
</copy>
|
|
</target>
|
|
|
|
<target name="javadoc">
|
|
<mkdir dir="${javadoc}" />
|
|
<javadoc sourcepath="${src}" destdir="${javadoc}" />
|
|
</target>
|
|
|
|
<target name="clean"
|
|
description="clean up" >
|
|
<delete dir="${build}"/>
|
|
<delete dir="${dist}"/>
|
|
<delete dir="${lib}" />
|
|
</target>
|
|
</project>
|