-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
50 lines (41 loc) · 1.51 KB
/
build.xml
File metadata and controls
50 lines (41 loc) · 1.51 KB
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
<project name="Cashier" default="dist" basedir=".">
<property name="test.dir" location="test"/>
<property name="lib.dir" location="lib"/>
<property name="src.dir" location="src"/>
<property name="build.dir" location="build"/>
<property name="dist.dir" location="dist"/>
<path id="test">
<pathelement location="${build.dir}/tests" />
<pathelement location="${build.dir}/classes" />
<fileset dir="${lib.dir}">
<include name="**/*.jar"/>
</fileset>
</path>
<target name="clean">
<delete dir="${build.dir}"/>
<delete dir="${dist.dir}"/>
</target>
<target name="compile" depends="clean">
<mkdir dir="${build.dir}/classes"/>
<javac srcdir="${src.dir}" destdir="${build.dir}/classes" includeantruntime="false"/>
</target>
<target name="compile-tests" depends="compile">
<mkdir dir="${build.dir}/tests"/>
<javac srcdir="${test.dir}" destdir="${build.dir}/tests" classpathref="test" includeantruntime="false"/>
</target>
<target name="dist" depends="compile">
<mkdir dir="${dist.dir}"/>
<jar jarfile="${dist.dir}/cashier.jar"/>
</target>
<target name="junit" depends="compile-tests">
<junit printsummary="yes" showoutput="true" fork="yes" haltonfailure="yes">
<formatter usefile="false" type="brief"/>
<classpath refid="test"/>
<batchtest fork="yes">
<fileset dir="${build.dir}/tests">
<include name="**/*Test.class" />
</fileset>
</batchtest>
</junit>
</target>
</project>