-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.xml
93 lines (81 loc) · 3.12 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
83
84
85
86
87
88
89
90
91
92
93
<?xml version="1.0" ?>
<project name="metapop" default="compile" basedir=".">
<property name="source" value="source"/>
<property name="testsource" value="test"/>
<property name="build" value="build"/>
<property name="testclasses" value="build/classes/test"/>
<property name="frameworkclasses" value="build/classes/framework"/>
<property name="jar" value="build/jar"/>
<property name="doc" value="doc"/>
<path id="dependencies">
<pathelement location="lib/commons-math.jar"/>
</path>
<path id="testdependencies">
<path refid="dependencies"/>
<pathelement location="${frameworkclasses}"/>
<pathelement location="lib/junit-4.11.jar"/>
<pathelement location="lib/hamcrest-all-1.3.jar"/>
</path>
<target name="clean">
<delete dir="${build}"/>
</target>
<target name="compile" description="Compile all Java source code">
<mkdir dir="${frameworkclasses}"/>
<mkdir dir="${testclasses}"/>
<javac
verbose="off"
srcdir="${source}"
destdir="${frameworkclasses}"
debug="on"
includeantruntime="false"
classpathref="dependencies">
<compilerarg value="-Xlint:deprecation"/>
<!-- <include name="**/MonodCalculator.java"/>
<include name="**/FitnessCalculator.java"/> -->
</javac>
<javac srcdir="${testsource}"
destdir="${testclasses}"
debug="on"
includeantruntime="false"
classpathref="testdependencies">
<compilerarg value="-Xlint:deprecation"/>
</javac>
<mkdir dir="${testclasses}"/>
<javac srcdir="${testsource}" destdir="${testclasses}"
debug="on"
includeantruntime="false">
<classpath>
<path refid="testdependencies"/>
</classpath>
</javac>
</target>
<target name="test" depends="clean, compile" description="Run unit tests">
<junit printsummary="on" haltonerror="true" haltonfailure="true">
<assertions><enable/></assertions>
<classpath>
<pathelement location="${testclasses}"/>
<path refid="testdependencies"/>
</classpath>
<batchtest>
<fileset dir="${testclasses}" includes="**/*Test.class"/>
</batchtest>
<formatter type="plain" usefile="false"/>
</junit>
</target>
<target name="doc" depends="compile">
<mkdir dir="${doc}"/>
<javadoc sourcepath="${source}" destdir="${doc}"
classpathref="dependencies"
linksource="yes" />
</target>
<target name="jar" depends="compile, doc">
<mkdir dir="${jar}"/>
<jar destfile="${jar}/${ant.project.name}.jar"
basedir="${frameworkclasses}"/>
<jar destfile="${jar}/${ant.project.name}_source.jar">
<fileset dir="." includes="doc/** source/** test/** build.xml"/>
</jar>
<jar destfile="${jar}/${ant.project.name}_docs.jar"
basedir="${doc}"/>
</target>
</project>