-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
65 lines (54 loc) · 1.9 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
<project name="Frontline" default="dist" basedir=".">
<description>
Frontline build file
</description>
<property name="src" location="src"/>
<property name="build" location="build"/>
<property name="dist" location="dist"/>
<property name="test" location="test"/>
<target name="init">
<tstamp/>
<mkdir dir="${build}"/>
</target>
<target name="compile" depends="init" description="compile the source and unit tests">
<javac srcdir="${src}" destdir="${build}" encoding="UTF-8" includeantruntime="false"/>
<javac includeantruntime="false" srcdir="${test}" destdir="${build}" encoding="UTF-8">
<classpath>
<pathelement location="lib/junit.jar" />
<pathelement location="lib/hamcrest-core.jar" />
<pathelement path="${java.class.path}"/>
<pathelement path="${build}" />
</classpath>
</javac>
</target>
<target name="dist" depends="compile" description="generate the distribution">
<mkdir dir="${dist}/lib"/>
<jar jarfile="${dist}/lib/Frontline.jar" basedir="${build}">
<zipfileset dir="res"/>
<manifest>
<attribute name="Main-Class" value="frontline.Frontline"/>
</manifest>
</jar>
</target>
<target name="test" depends="dist" description="run JUnit tests">
<junit printsummary="yes">
<classpath>
<pathelement location="lib/junit.jar" />
<pathelement location="lib/hamcrest-core.jar" />
<pathelement path="res"/>
<pathelement path="${java.class.path}"/>
<pathelement path="${build}"/>
</classpath>
<formatter type="plain" usefile="no"/>
<batchtest fork="yes" todir="test/reports">
<fileset dir="test">
<include name="**/*.java" />
</fileset>
</batchtest>
</junit>
</target>
<target name="clean" description="clean up">
<delete dir="${build}"/>
<delete dir="${dist}"/>
</target>
</project>