added the abilty to build the jar's to a different location, like the following:

ant -Ddist=altDist

or 

ant -Ddist=/where/you/want/jars

Also changed the test build to depend on playground build instead of core, right now tests fail if you only build the core. 



git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@1299 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
aaron 2009-07-23 04:06:58 +00:00
parent f8b1dbe3b3
commit f7168bd7cf
1 changed files with 20 additions and 19 deletions

View File

@ -3,6 +3,7 @@
<property name="source.dir" value="java/src" /> <property name="source.dir" value="java/src" />
<property name="single" value="*Test" /> <property name="single" value="*Test" />
<property name="dist" value="dist" />
<!-- If running the 'package' task, this property controls the name of the xml file to package --> <!-- If running the 'package' task, this property controls the name of the xml file to package -->
<property name="executable" value="GenomeAnalysisTK" /> <property name="executable" value="GenomeAnalysisTK" />
@ -52,7 +53,7 @@
<!-- where to put reports and tests--> <!-- where to put reports and tests-->
<property name="report" value="build/report"/> <property name="report" value="build/report"/>
<property name="test.classes" value="build/testclasses"/> <property name="test.classes" value="build/testclasses"/>
<property name="test.output" value="dist/test"/> <property name="test.output" value="${dist}/test"/>
<property name="test.sources" value="java/test"/> <property name="test.sources" value="java/test"/>
<property name="classes" value="classes"/> <property name="classes" value="classes"/>
@ -81,27 +82,27 @@
<target name="dist" depends="compile" <target name="dist" depends="compile"
description="generate the distribution"> description="generate the distribution">
<mkdir dir="dist"/> <mkdir dir="${dist}"/>
<delete> <delete>
<fileset dir="dist" includes="*.jar" /> <fileset dir="${dist}" includes="*.jar" />
</delete> </delete>
<copy todir="dist"> <copy todir="${dist}">
<fileset dir="lib" includes="*.jar"/> <fileset dir="lib" includes="*.jar"/>
</copy> </copy>
<jar jarfile="dist/StingUtils.jar"> <jar jarfile="${dist}/StingUtils.jar">
<fileset dir="build" includes="**/utils/**/*.class"/> <fileset dir="build" includes="**/utils/**/*.class"/>
</jar> </jar>
<jar jarfile="dist/GenomeAnalysisTK.jar"> <jar jarfile="${dist}/GenomeAnalysisTK.jar">
<fileset dir="build" includes="**/gatk/**/*.class"/> <fileset dir="build" includes="**/gatk/**/*.class"/>
<manifest> <manifest>
<attribute name="Main-Class" value="org.broadinstitute.sting.gatk.CommandLineGATK"/> <attribute name="Main-Class" value="org.broadinstitute.sting.gatk.CommandLineGATK"/>
</manifest> </manifest>
</jar> </jar>
<jar jarfile="dist/FourBaseRecaller.jar" whenmanifestonly="skip"> <jar jarfile="${dist}/FourBaseRecaller.jar" whenmanifestonly="skip">
<fileset dir="build"> <fileset dir="build">
<include name="**/secondarybase/**/*.class" /> <include name="**/secondarybase/**/*.class" />
</fileset> </fileset>
@ -110,7 +111,7 @@
</manifest> </manifest>
</jar> </jar>
<jar jarfile="dist/Playground.jar" whenmanifestonly="skip"> <jar jarfile="${dist}/Playground.jar" whenmanifestonly="skip">
<fileset dir="build"> <fileset dir="build">
<include name="**/*.class"/> <include name="**/*.class"/>
<exclude name="**/utils/**"/> <exclude name="**/utils/**"/>
@ -120,28 +121,28 @@
<pathconvert property="jar.classpath" pathsep=" "> <pathconvert property="jar.classpath" pathsep=" ">
<flattenmapper/> <flattenmapper/>
<fileset dir="dist" includes="*.jar"/> <fileset dir="${dist}" includes="*.jar"/>
</pathconvert> </pathconvert>
<jar jarfile="dist/StingUtils.jar" update="true"> <jar jarfile="${dist}/StingUtils.jar" update="true">
<manifest> <manifest>
<attribute name="Class-Path" value="${jar.classpath}"/> <attribute name="Class-Path" value="${jar.classpath}"/>
</manifest> </manifest>
</jar> </jar>
<jar jarfile="dist/GenomeAnalysisTK.jar" update="true"> <jar jarfile="${dist}/GenomeAnalysisTK.jar" update="true">
<manifest> <manifest>
<attribute name="Class-Path" value="${jar.classpath}"/> <attribute name="Class-Path" value="${jar.classpath}"/>
</manifest> </manifest>
</jar> </jar>
<jar jarfile="dist/FourBaseRecaller.jar" update="true" whenmanifestonly="skip"> <jar jarfile="${dist}/FourBaseRecaller.jar" update="true" whenmanifestonly="skip">
<manifest> <manifest>
<attribute name="Class-Path" value="${jar.classpath}" /> <attribute name="Class-Path" value="${jar.classpath}" />
</manifest> </manifest>
</jar> </jar>
<jar jarfile="dist/Playground.jar" update="true" whenmanifestonly="skip"> <jar jarfile="${dist}/Playground.jar" update="true" whenmanifestonly="skip">
<manifest> <manifest>
<attribute name="Class-Path" value="${jar.classpath}"/> <attribute name="Class-Path" value="${jar.classpath}"/>
</manifest> </manifest>
@ -160,7 +161,7 @@
</antcall> </antcall>
</target> </target>
<target name="test.compile" depends="compile"> <target name="test.compile" depends="playground">
<echo message="Sting: Compiling test cases!"/> <echo message="Sting: Compiling test cases!"/>
<mkdir dir="${test.classes}"/> <mkdir dir="${test.classes}"/>
<javac destdir="${test.classes}" debug="true" optimize="on"> <javac destdir="${test.classes}" debug="true" optimize="on">
@ -226,7 +227,7 @@
<target name="stage" description="stage files for distribution"> <target name="stage" description="stage files for distribution">
<mkdir dir="staging"/> <mkdir dir="staging"/>
<unjar dest="staging" overwrite="false"> <unjar dest="staging" overwrite="false">
<fileset dir="dist"> <fileset dir="${dist}">
<patternset refid="dependency.mask" /> <patternset refid="dependency.mask" />
</fileset> </fileset>
</unjar> </unjar>
@ -234,15 +235,15 @@
<!-- Build a package consisting of all supporting files --> <!-- Build a package consisting of all supporting files -->
<target name="package" depends="dist,stage" description="bundle up an executable for distribution"> <target name="package" depends="dist,stage" description="bundle up an executable for distribution">
<mkdir dir="dist/packages" /> <mkdir dir="${dist}/packages" />
<xslt in="packages/${executable}.xml" out="dist/packages/Build${executable}.xml" style="packages/CreatePackager.xsl" /> <xslt in="packages/${executable}.xml" out="${dist}/packages/Build${executable}.xml" style="packages/CreatePackager.xsl" />
<ant antfile="dist/packages/Build${executable}.xml" /> <ant antfile="${dist}/packages/Build${executable}.xml" />
</target> </target>
<target name="clean" description="clean up"> <target name="clean" description="clean up">
<delete dir="out"/> <delete dir="out"/>
<delete dir="build"/> <delete dir="build"/>
<delete dir="dist"/> <delete dir="${dist}"/>
<delete dir="lib"/> <delete dir="lib"/>
<delete dir="staging"/> <delete dir="staging"/>
</target> </target>