-
Notifications
You must be signed in to change notification settings - Fork 10
/
build.xml
82 lines (67 loc) · 2.23 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>
<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/main/java"
destdir="build"
includeantruntime="false"
debug="true" >
<classpath refid="project.class.path" />
</javac>
<javac srcdir="src/test/java"
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>
<delete dir="build" />
</target>
<target name="run" description="run the main" depends="compile">
<java classname="edu.ucsb.cs56.projects.games.pokemon.framework.Main" classpath="build" fork="true"/>
</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="edu.ucsb.cs56.projects.games.pokemon.framework,Main"/>
</manifest>
</jar>
</target>
<target name="test" depends="compile" description="run JUnit tests">
<junit haltonerror="no" haltonfailure="no" fork="true">
<classpath refid="project.class.path" />
<batchtest fork="yes">
<fileset dir="src/test/java">
<include name="**/*.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="main/java/**/*.java"/>
<include name="test/java/**/*.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>