-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
107 lines (93 loc) · 3.25 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
94
95
96
97
98
99
100
101
102
103
104
105
106
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xml>
<project name="AHRD" default="test" basedir=".">
<description>
Assign Human Readable Description (AHRD)
</description>
<!-- set global properties for this build -->
<property name="src" location="src" />
<property name="classes" location="classes" />
<property name="test.classes" location="classes/ahrd/test" />
<property name="lib" location="lib" />
<property name="src.test" location="test" />
<property name="dist" location="dist" />
<path id="classpath.compile">
<fileset dir="${lib}">
<include name="**/*.jar" />
</fileset>
</path>
<path id="classpath.test">
<fileset dir="${lib}">
<include name="**/*.jar" />
</fileset>
<pathelement location="${classes}" />
</path>
<target name="init">
<!-- Create the time stamp -->
<tstamp />
<!-- Create the build directory structure used by compile -->
<mkdir dir="${classes}" />
<delete>
<fileset dir="${classes}" />
</delete>
<mkdir dir="${classes}" />
</target>
<target name="compile" depends="init" description="compile the source ">
<!-- Compile the java code from ${src} into ${classes} -->
<javac srcdir="${src}" destdir="${classes}" includeAntRuntime="yes" nowarn="off">
<compilerarg value="-Xlint:unchecked" />
<classpath refid="classpath.compile" />
</javac>
</target>
<target name="compile.test" depends="compile" description="compile the test-classes">
<javac srcdir="${src.test}" destdir="${classes}" debug="true" includeAntRuntime="yes" nowarn="off">
<compilerarg value="-Xlint:unchecked" />
<classpath refid="classpath.test" />
</javac>
</target>
<target name="dist" depends="compile" description="generate the distribution">
<!-- Create the distribution directory -->
<mkdir dir="${dist}" />
<unzip dest="${classes}">
<fileset dir="${lib}" />
</unzip>
<!-- Put everything in ${classes} into the ahrd.jar file -->
<jar jarfile="${dist}/ahrd.jar" basedir="${classes}" manifest="MANIFEST.MF" />
<delete>
<fileset dir="${classes}" />
</delete>
</target>
<target name="clean" description="clean up">
<!-- Delete the ${classes} and ${dist} directory trees -->
<delete dir="${classes}" />
<delete dir="${dist}" />
</target>
<target name="test" depends="compile.test">
<junit printsummary="true" fork="true" forkmode="perTest" maxmemory="2048m">
<classpath refid="classpath.test" />
<formatter type="plain" usefile="false" />
<!-- <test name="ahrd.test.AhrdTest" /> -->
<batchtest>
<fileset dir="${classes}" includes="**/*Test.class" />
</batchtest>
</junit>
<delete file="test/ahrd_output.csv" />
<delete file="test/sim_anneal_path_log.csv" />
<delete dir="AHRD_DB" />
</target>
<target name="test.run" depends="compile.test">
<junit printsummary="true" fork="true" forkmode="perTest" maxmemory="2048m">
<classpath refid="classpath.test" />
<formatter type="plain" usefile="false" />
<test name="ahrd.test.AhrdTestRun" />
</junit>
<delete dir="AHRD_DB" />
</target>
<target name="test.regexs" depends="compile.test">
<junit printsummary="true" fork="true" forkmode="perTest">
<classpath refid="classpath.test" />
<formatter type="plain" usefile="false" />
<test name="ahrd.test.TestRegexs" />
</junit>
</target>
</project>