-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.xml
123 lines (115 loc) · 4.38 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
<project name = "Project See" default = "run" basedir = ".">
<!-- Project properties -->
<property name="source" location="src"/>
<property name="source.test" location="test"/>
<property name="zip.name" value="ProjectSee.zip"/>
<property name="target.base" location="build"/>
<property name="debug.target" location="${target.base}/debug/classes"/>
<property name="release.target" location="${target.base}/release/classes"/>
<include file="project.properties"/>
<!-- Create a zip file for the professor. -->
<target name = "zip">
<zip destfile = "${zip.name}">
<fileset dir = "." includes = "**/*.java"/>
<fileset dir = "." includes = "**/*.bluej"/>
<fileset dir = "." includes = "**/*.txt"/>
<fileset dir = "." includes = "**/*.xml"/>
</zip>
</target>
<!-- Clean up autogenerated files. -->
<target name = "clean">
<delete>
<fileset dir = "." includes="**/*.zip"/>
<fileset dir = "." includes="**/*.class"/>
<fileset dir = "." includes="**/*.ctxt"/>
</delete>
<delete dir = "${target.base}"/>
<delete dir = "**/doc"/>
<delete dir = "results"/>
</target>
<target name = "debug">
<property name="debug.use" value="true"/>
</target>
<target name = "prereqs">
<mkdir dir = "${target.base}"/>
<mkdir dir = "${source}"/>
<mkdir dir = "${source.test}"/>
<mkdir dir = "results"/>
<!-- <mkdir dir = "results"/> -->
</target>
<!-- Compile source. -->
<target name = "buildDebug" depends="prereqs" if="debug.use">
<property name="cp" location="${debug.target}"/>
<mkdir dir = "${debug.target}"/>
<javac srcdir = "${source}" destdir = "${debug.target}" debug = "on">
<classpath>
<pathelement path = "${debug.target}"/>
<pathelement path = "${junit.path}"/>
</classpath>
<!--<compilerarg value="-Xlint"/>-->
</javac>
<javac srcdir = "${source.test}" destdir = "${debug.target}" debug = "on">
<classpath>
<pathelement path = "${debug.target}"/>
<pathelement path = "${junit.path}"/>
</classpath>
<!--<compilerarg value="-Xlint"/>-->
</javac>
</target>
<!-- Compile source. -->
<target name = "buildRelease" depends="prereqs" unless="debug.use">
<property name="cp" location="${release.target}"/>
<mkdir dir = "${release.target}"/>
<javac srcdir = "${source}" destdir = "${release.target}">
<classpath>
<pathelement path = "${debug.target}"/>
</classpath>
<exclude name="test/"/>
</javac>
</target>
<target name = "build" depends="buildRelease,buildDebug">
</target>
<!-- Run the program. -->
<target name = "run" depends = "build">
<java classname = "Plays" classpath = "${cp}"
failonerror = "true" >
<!-- Sample argument -->
<arg value="test"/>
</java>
</target>
<!-- Run experiment 1. -->
<target name = "exp1" depends = "build">
<java classname = "Experiment" classpath = "${cp}"
failonerror = "true" >
<!-- File name. -->
<arg value="src/AllDrawingArchiveTable.csv"/>
<!-- Designate experiment 1 -->
<arg value="1"/>
<!-- Output prefix. -->
<arg value="results/output"/>
</java>
</target>
<!-- Run experiment 3. -->
<target name = "exp3" depends = "build">
<java classname = "Experiment" classpath = "${cp}"
failonerror = "true" >
<!-- File name. -->
<arg value="src/AllDrawingArchiveTable.csv"/>
<!-- Designate experiment 3 -->
<arg value="3"/>
<!-- Output prefix. -->
<arg value="results/output"/>
</java>
</target>
<!-- We need test units. -->
<target name = "test" depends = "debug,build">
<junit printsummary = "yes" haltonfailure = "true">
<formatter type = "plain" usefile = "false"/>
<classpath>
<pathelement path = "${cp}"/>
<pathelement path = "${junit.path}"/>
</classpath>
<test name = ""/>
</junit>
</target>
</project>