forked from kungfoo/java-mateview
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.xml
More file actions
59 lines (52 loc) · 1.99 KB
/
build.xml
File metadata and controls
59 lines (52 loc) · 1.99 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
51
52
53
54
55
56
57
58
59
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project name="java-mateview" default="test" basedir=".">
<property name="build.dir" location="bin" />
<property name="src.dir" location="src" />
<property name="test.dir" location="test" />
<property name="lib.dir" location="lib" />
<property name="build.prod.dir" location="${build.dir}" />
<property name="build.test.dir" location="${build.dir}/test" />
<property name="test.report.dir" location="${build.dir}/test-reports" />
<path id="project.classpath">
<pathelement location="${build.prod.dir}" />
<pathelement location="${build.test.dir}" />
<fileset dir="${lib.dir}">
<include name="*.jar" />
</fileset>
</path>
<target name="clean">
<delete dir="${build.dir}" />
</target>
<target name="prepare" depends="clean">
<mkdir dir="${build.prod.dir}" />
<mkdir dir="${build.test.dir}" />
</target>
<target name="compile" depends="prepare">
<javac srcdir="${src.dir}" destdir="${build.prod.dir}" debug="true" >
<classpath refid="project.classpath" />
</javac>
</target>
<target name="compile-tests" depends="compile">
<javac srcdir="${test.dir}" destdir="${build.test.dir}" debug="true">
<classpath refid="project.classpath" />
</javac>
</target>
<target name="compile-bench" depends="compile">
<javac srcdir="bench" destdir="${build.dir}" debug="false">
<classpath refid="project.classpath" />
</javac>
</target>
<target name="test" depends="compile-tests">
<delete dir="${test.report.dir}" />
<mkdir dir="${test.report.dir}" />
<junit errorproperty="test.failed" failureproperty="test.failed">
<classpath refid="project.classpath" />
<formatter type="brief" usefile="false"/>
<formatter type="xml" usefile="true" />
<batchtest todir="${test.report.dir}">
<fileset dir="${build.test.dir}" includes="**/*Test.class" />
</batchtest>
</junit>
<fail message="one or more tests failed!" if="test.failed" />
</target>
</project>