-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Some refactoring to remove duplicates, and getting package ready for …
…BEAUTI.
- Loading branch information
1 parent
8bf5e2d
commit 3575817
Showing
10 changed files
with
1,096 additions
and
734 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,211 @@ | ||
<!-- Build BDMM. It is also used by Hudson BDMM project. JUnit test is available for this build. --> | ||
<project basedir="." default="build_jar_all_BDMM" name="BUILD_BDMM"> | ||
<description> | ||
Build BDMM. | ||
Also used by Hudson BDMM project. | ||
JUnit test is available for this build. | ||
$Id: build_BDMM.xml $ | ||
</description> | ||
|
||
<!-- set global properties for this build --> | ||
<property name="srcBDMM" location="src" /> | ||
<property name="buildBDMM" location="build" /> | ||
<property name="libBDMM" location="lib" /> | ||
<property name="release_dir" value="release" /> | ||
<property name="distBDMM" location="${buildBDMM}/dist" /> | ||
<property name="beast2path" location="../beast2" /> | ||
<property name="libBeast2" location="${beast2path}/lib" /> | ||
<property name="srcBeast2" location="${beast2path}/src" /> | ||
<property name="beast2classpath" location="${beast2path}/build" /> | ||
<property name="masterclasspath" location="../MASTER/build" /> | ||
<property name="mttclasspath" location="../MultiTypeTree/build" /> | ||
<property name="sampledancestorclasspath" location="..out/production/sampled-ancestors" /> | ||
<property name="Add_on_dir" value="${release_dir}/add-on" /> | ||
|
||
<import file="${beast2path}/build.xml" /> | ||
|
||
<property name="main_class_BEAST" value="beast.app.BeastMCMC" /> | ||
<property name="report" value="${buildBDMM}/junitreport"/> | ||
|
||
<path id="classpath"> | ||
<pathelement path="${buildBDMM}"/> | ||
<fileset dir="${libBeast2}" includes="junit-4.8.2.jar"/> | ||
<fileset dir="${libBeast2}" includes="fest.jar"/> | ||
<fileset dir="${libBeast2}" includes="jam.jar"/> | ||
<fileset dir="${libBeast2}" includes="commons-math3-3.1.1.jar"/> | ||
<fileset dir="${libBeast2}" includes="antlr-runtime-4.5.jar"/> | ||
<fileset dir="../MultiTypeTree/build-lib" includes="guava-15.0.jar"/> | ||
<pathelement path="${beast2classpath}"/> | ||
<pathelement path="${masterclasspath}"/> | ||
<pathelement path="${mttclasspath}"/> | ||
<pathelement path="${sampledancestorclasspath}"/> | ||
</path> | ||
|
||
<!-- start --> | ||
<target name="initBDMM"> | ||
<echo message="${ant.project.name}: ${ant.file}" /> | ||
</target> | ||
|
||
<target name="cleanBDMM"> | ||
<delete dir="${buildBDMM}" /> | ||
</target> | ||
|
||
<!-- clean previous build, and then compile Java source code, and Juint test --> | ||
<target name="build_all_BDMM" depends="cleanBDMM,compile-allBDMM,junitBDMM" | ||
description="Clean and Build all run-time stuff"> | ||
</target> | ||
|
||
<!-- clean previous build, compile Java source code, and Junit test, and make the beast.jar and beauti.jar --> | ||
<target name="build_jar_all_BDMM" depends="cleanBDMM,compile-allBDMM,junitBDMM,dist_all_BDMM" | ||
description="Clean and Build all run-time stuff"> | ||
</target> | ||
|
||
|
||
<!-- No JUnit Test, clean previous build, compile Java source code, and make the BDMM.jar and beauti.jar --> | ||
<target name="build_jar_all_BDMM_NoJUnitTest" depends="cleanBDMM,compile-allBDMM,dist_all_BDMM" | ||
description="Clean and Build all run-time stuff"> | ||
</target> | ||
|
||
<!-- compile Java source code --> | ||
<target name="compile-allBDMM" depends="initBDMM,compile-all"> | ||
|
||
|
||
<!-- Capture the path as a delimited property using the refid attribute --> | ||
<property name="myclasspath" refid="classpath"/> | ||
<!-- Emit the property to the ant console --> | ||
<echo message="Classpath = ${myclasspath}"/> | ||
|
||
<mkdir dir="${buildBDMM}" /> | ||
|
||
<!-- Compile the java code from ${srcBDMM} into ${buildBDMM} /bin --> | ||
<javac srcdir="${srcBDMM}" destdir="${buildBDMM}" classpathref="classpath" | ||
fork="true" | ||
memoryinitialsize="256m" | ||
memorymaximumsize="256m" | ||
includeAntRuntime='false' | ||
source="1.8" | ||
target="1.8"> | ||
<include name="beast/**/**" /> | ||
<!-- compile JUnit test classes --> | ||
<include name="test/beast/**" /> | ||
</javac> | ||
<echo message="Successfully compiled." /> | ||
</target> | ||
|
||
<!-- make the beast.jar and beauti.jar --> | ||
<target name="dist_all_BDMM" depends="compile-allBDMM" description="create BDMM jar"> | ||
<!-- Create the distribution directory --> | ||
<mkdir dir="${distBDMM}" /> | ||
|
||
<!-- Put everything in ${buildBDMM} into the beast.jar file --> | ||
<jar jarfile="${distBDMM}/BDMM.jar"> | ||
<manifest> | ||
<attribute name="Built-By" value="${user.name}" /> | ||
<attribute name="Main-Class" value="${main_class_BEAST}" /> | ||
</manifest> | ||
<fileset dir="${buildBDMM}"> | ||
<include name="beast/**/*.class" /> | ||
</fileset> | ||
<fileset dir="${beast2classpath}"> | ||
<include name="beast/**/*.class" /> | ||
<include name="beast/**/*.properties" /> | ||
<include name="beast/**/*.png" /> | ||
<include name="beagle/**/*.class" /> | ||
<include name="org/**/*.class" /> | ||
</fileset> | ||
</jar> | ||
<jar jarfile="${distBDMM}/BDMM.src.jar"> | ||
<fileset dir="${srcBDMM}"> | ||
<include name="beast/**/*.java" /> | ||
<include name="beast/**/*.png" /> | ||
<include name="beast/**/*.xsl" /> | ||
</fileset> | ||
</jar> | ||
<jar jarfile="${distBDMM}/BDMM.addon.jar"> | ||
<manifest> | ||
<attribute name="Built-By" value="${user.name}" /> | ||
</manifest> | ||
<fileset dir="${buildBDMM}"> | ||
<include name="beast/**/*.class" /> | ||
<include name="util/**/*.class" /> | ||
<include name="**/*.properties" /> | ||
</fileset> | ||
</jar> | ||
</target> | ||
|
||
<!-- run beast.jar --> | ||
<target name="run_BDMM"> | ||
<java jar="${distBDMM}/BDMM.jar" fork="true" /> | ||
</target> | ||
|
||
|
||
<!-- JUnit test --> | ||
<target name="junitBDMM"> | ||
<mkdir dir="${report}" /> | ||
<junit printsummary="yes"> <!--showoutput='yes'--> | ||
<classpath> | ||
<path refid="classpath" /> | ||
<path location="${buildBDMM}" /> | ||
</classpath> | ||
|
||
<formatter type="xml" /> | ||
|
||
<batchtest fork="yes" todir="${report}"> | ||
<fileset dir="${srcBDMM}"> | ||
<include name="test/**/*Test.java"/> | ||
</fileset> | ||
<fileset dir="${srcBeast2}"> | ||
<include name="test/beast/integration/**/*Test.java"/> | ||
<exclude name="test/beast/integration/**/ResumeTest.java"/> | ||
</fileset> | ||
</batchtest> | ||
</junit> | ||
<echo message="JUnit test finished." /> | ||
</target> | ||
|
||
<target name="junitreport"> | ||
<junitreport todir="${report}"> | ||
<fileset dir="${report}" includes="*.xml"/> | ||
<report format="frames" todir="${report}"/> | ||
</junitreport> | ||
<echo message="JUnit test report finished." /> | ||
</target> | ||
|
||
|
||
<target name="addon" | ||
depends="build_jar_all_BDMM_NoJUnitTest" | ||
description="release BEAST 2 add-on version of BDMM"> | ||
|
||
<delete dir="${Add_on_dir}" /> | ||
<!-- Create the release directory --> | ||
<mkdir dir="${Add_on_dir}" /> | ||
<mkdir dir="${Add_on_dir}/lib" /> | ||
<mkdir dir="${Add_on_dir}/examples" /> | ||
<mkdir dir="${Add_on_dir}/templates" /> | ||
|
||
<copy todir="${Add_on_dir}"> | ||
<fileset file="version.xml"/> | ||
</copy> | ||
<copy todir="${Add_on_dir}/examples"> | ||
<fileset dir="examples" /> | ||
</copy> | ||
<copy todir="${Add_on_dir}/lib"> | ||
<fileset dir="${distBDMM}" includes="BDMM.addon.jar" /> | ||
</copy> | ||
<copy todir="${Add_on_dir}"> | ||
<fileset dir="${distBDMM}" includes="BDMM.src.jar" /> | ||
</copy> | ||
<!--copy todir="${Add_on_dir}/templates"> | ||
<fileset file="templates/BDSKY_contemp.xml" /> | ||
<fileset file="templates/BDSKY_serial.xml" /> | ||
</copy--> | ||
|
||
<jar jarfile="${distBDMM}/BDMM.addon.zip"> | ||
<fileset dir="${Add_on_dir}"> | ||
<include name="**/*" /> | ||
</fileset> | ||
</jar> | ||
<echo message="Add-on version release is finished." /> | ||
</target> | ||
|
||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.