forked from ucsb-cs56-pconrad/cs56-rational-ex08
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
70 lines (59 loc) · 1.84 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
<project>
<path id="project.class.path">
<pathelement location="build"/>
<pathelement location="lib/junit-4.8.2.jar"/>
</path>
<target name="compile" description="compile the code">
<mkdir dir="build" />
<javac srcdir="src"
destdir="build"
includeantruntime="false"
debug="true" >
<classpath refid="project.class.path" />
</javac>
</target>
<target name="clean" description="clean up the project">
<delete>
<fileset dir="build" includes="*.class"/>
<fileset dir="build" includes="*.jar"/>
</delete>
</target>
<target name="run" description="run the main">
<java classname="Rational" classpath="build"/>
</target>
<target name="jar" depends="compile" description="create a jar file">
<jar destfile="build/rational.jar">
<fileset dir="build" includes="*.class"/>
<manifest>
<attribute name="Main-Class" value="Rational"/>
</manifest>
</jar>
</target>
<target name="test" depends="compile" description="run JUnit tests">
<junit haltonerror="no" haltonfailure="no">
<classpath refid="project.class.path" />
<batchtest fork="yes">
<fileset dir="src">
<include name="*Test.java"/>
</fileset>
</batchtest>
<formatter type="brief" usefile="false" />
</junit>
</target>
<property name="javadoc_absolute_path" location="javadoc"/>
<target name="javadoc" depends="compile" description="generate javadoc">
<delete>
<fileset dir="javadoc" />
</delete>
<javadoc destdir="javadoc">
<fileset dir="src" >
<include name="*.java"/>
</fileset>
<classpath refid="project.class.path" />
<link href="http://docs.oracle.com/javase/8/docs/api/" />
</javadoc>
<echo>
javadoc written to file://${javadoc_absolute_path}/index.html
</echo>
</target>
</project>