forked from armanbilge/BECKY
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
82 lines (68 loc) · 2.82 KB
/
build.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<project basedir="." default="build" name="BECKY">
<property name="JDK_VERSION" value="1.6"/>
<!-- set global properties for this build -->
<property name="src" location="src"/>
<property name="build" location="build"/>
<property name="lib" location="lib"/>
<property name="dist" location="${build}/dist"/>
<property name="main_class" value="org.ithinktree.becky.tools.CoevolutionSimulator"/>
<path id="classpath">
<fileset dir="${lib}" includes="**/*.jar"/>
</path>
<!-- start -->
<target name="init">
<echo message="${ant.project.name}: ${ant.file}"/>
</target>
<target name="clean">
<delete dir="${build}"/>
</target>
<target name="build" depends="clean,compile-all,dist-all"
description="Clean and Build all and distribute jar">
</target>
<target name="test" depends="clean,compile-all,junit"
description="Clean and Build all run-time stuff with unit test">
</target>
<!-- compile Java source code -->
<target name="compile-all" depends="init">
<mkdir dir="${build}"/>
<!-- Compile the java code from ${src} into ${build} /bin -->
<javac source="${JDK_VERSION}" target="${JDK_VERSION}" srcdir="${src}" destdir="${build}" classpathref="classpath"
debug="true"
fork="true"
memoryinitialsize="256m"
memorymaximumsize="1024m">
<include name="org/ithinktree/becky/**"/>
<include name="test/org/ithinktree/becky/**"/>
</javac>
<echo message="Successfully compiled."/>
</target>
<target name="dist-all" depends="compile-all">
<!-- Create the distribution directory -->
<mkdir dir="${dist}"/>
<jar jarfile="${dist}/org.ithinktree.becky.BECKY.jar">
<manifest>
<attribute name="Built-By" value="${user.name}"/>
<attribute name="Main-Class" value="${main_class}"/>
</manifest>
<fileset dir="${build}">
<include name="org/ithinktree/becky/**"/>
</fileset>
<zipgroupfileset dir="${lib}" includes="beast.jar"/>
<zipgroupfileset dir="${lib}" includes="jprime-0.3.3.jar"/>
</jar>
</target>
<target name="junit" depends="compile-all">
<junit showoutput="yes" fork="true" printsummary="yes" haltonfailure="yes" dir="${build}/..">
<classpath>
<path refid="classpath"/>
<path location="${build}"/>
</classpath>
<formatter type="plain" usefile="false" />
<batchtest>
<fileset dir="${build}">
<include name="test/org/ithinktree/becky/**/*Test.class"/>
</fileset>
</batchtest>
</junit>
</target>
</project>