-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathbuild.xml
executable file
·56 lines (50 loc) · 1.56 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
<?xml version="1.0"?>
<project name="java-course" default="hudson" basedir=".">
<target name="info">
<echo>This is an ant build script.</echo>
<echo>Currently used by Hudson to ensure the repository is always healthy.</echo>
</target>
<target name="hudson" description="for continous integration" depends="clean,compile,compile-tests,test"/>
<target name="clean">
<delete dir="classes-src"/>
<delete dir="classes-test"/>
<delete dir="test-results"/>
</target>
<target name="compile">
<mkdir dir="classes-src"/>
<javac srcdir="src" destdir="classes-src" encoding="UTF-8" target="1.6">
<classpath>
<fileset dir="lib" includes="*.jar"/>
</classpath>
</javac>
<copy todir="classes-src">
<fileset dir="src" includes="**/*" excludes="**/*.java"/>
</copy>
</target>
<target name="compile-tests">
<mkdir dir="classes-test"/>
<javac srcdir="test" destdir="classes-test" encoding="UTF-8" target="1.6">
<classpath>
<path path="classes-src"/>
<fileset dir="lib" includes="*.jar"/>
</classpath>
</javac>
<copy todir="classes-test">
<fileset dir="test" includes="**/*" excludes="**/*.java"/>
</copy>
</target>
<target name="test">
<mkdir dir="test-results"/>
<junit haltonfailure="true">
<batchtest todir="test-results">
<fileset dir="classes-test" includes="**/*Test.class" excludes="**/Abstract*"/>
<formatter type="xml"/>
</batchtest>
<classpath>
<path path="classes-src"/>
<path path="classes-test"/>
<fileset dir="lib" includes="*.jar"/>
</classpath>
</junit>
</target>
</project>