-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
111 lines (92 loc) · 3.01 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
<!-- Build file HotCiv TDD start.
Adapted for the dSoftArk course.
This source code is from the book
"Flexible, Reliable Software:
Using Patterns and Agile Development"
published 2010 by CRC Press.
Author:
Henrik B Christensen
Computer Science Department
Aarhus University
This source code is provided WITHOUT ANY WARRANTY either
expressed or implied. You may study, use, modify, and
distribute it for non-commercial purposes. For any
commercial use, see http://www.baerbak.com/
-->
<project name="HotCiv" default="help" basedir=".">
<property name="source-directory" value="src"/>
<property name="test-source-directory" value="test"/>
<property name="build-directory" value="build"/>
<property name="resourceDirectory" value="resource"/>
<property name="docDirectory" value="doc"></property>
<property name="junitJar" value="lib/junit-4.4.jar"/>
<path id="class-path">
<pathelement location="${build-directory}"/>
<pathelement location="${junitJar}"/>
</path>
<target name="help">
<echo>
HotCiv build management.
Targets:
build-src: Builds production code.
clean: Removes all bytecode.
javadoc: Generate JavaDoc (output in doc/index.html)
test: Run JUnit test cases.
</echo>
</target>
<target name="clean">
<delete dir="${build-directory}"/>
<delete dir="${docDirectory}"/>
</target>
<target name="prepare">
<mkdir dir="${build-directory}"/>
<mkdir dir="${docDirectory}"/>
</target>
<target name="build-src" depends="prepare">
<javac srcdir="${source-directory}"
destdir="${build-directory}"
debug="on"
includeantruntime="no"
>
<classpath refid="class-path"/>
</javac>
</target>
<target name="build-test" depends="build-src">
<javac srcdir="${test-source-directory}"
destdir="${build-directory}"
debug = "on"
includeantruntime="no"
>
<classpath refid="class-path"/>
</javac>
</target>
<target name="build-all" depends="build-src,build-test"/>
<target name="mkdirdoc">
<mkdir dir="${docDirectory}"></mkdir>
</target>
<target name="javadoc" depends="clean,build-src,mkdirdoc">
<javadoc
source = "1.5"
packagenames="hotciv.*"
sourcepath="${source-directory}"
destdir="${docDirectory}"
package="true"
doctitle="<b>HotCiv</b>"
bottom="<b>Skeleton code authored by Henrik B. Christensen </b>"
windowtitle="HotCiv" >
<sourcepath>
<pathelement path="${source-directory}"/>
</sourcepath>
<classpath>
<path refid="class-path"/>
</classpath>
</javadoc>
</target>
<!-- JUnit testing -->
<target name="test" depends="build-all">
<java classname="org.junit.runner.JUnitCore">
<arg value="hotciv.standard.TestAlphaCiv"/>
<classpath refid="class-path"/>
</java>
</target>
</project>