-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
106 lines (93 loc) · 3.37 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
<project name="Auction Sniper" default="build">
<property name="build.dir" location="build" />
<property name="src.dir" location="src" />
<property name="test.dir" location="test"/>
<property name="lib.dir" value="lib" />
<property name="app.classes.dir" location="${build.dir}/classes/app" />
<property name="test.classes.dir" location="${build.dir}/classes/test" />
<path id="app.lib.path">
<fileset dir="${lib.dir}/deploy" includes="*.jar"/>
</path>
<path id="test.lib.path">
<fileset dir="${lib.dir}/develop" includes="*.jar" excludes="*-src.jar"/>
<path location="${app.classes.dir}" />
<path refid="app.lib.path"/>
</path>
<target name="clean">
<delete dir="${build.dir}" quiet="true" />
</target>
<target name="init">
<property environment="env" />
<condition property="scala.home" value="${env.SCALA_HOME}">
<isset property="env.SCALA_HOME" />
</condition>
<fail unless="scala.home">You must set SCALA_HOME first</fail>
<property name="scala-library.jar" value="${scala.home}/lib/scala-library.jar" />
<property name="scala-compiler.jar" value="${scala.home}/lib/scala-compiler.jar" />
<path id="app.lib.path">
<pathelement location="${scala-library.jar}" />
<pathelement location="${scala-compiler.jar}" />
<fileset dir="${lib.dir}/deploy" includes="*.jar" />
</path>
<path id="test.lib.path">
<fileset dir="${lib.dir}/develop" includes="*.jar" excludes="*-src.jar" />
<path location="${app.classes.dir}" />
<path refid="app.lib.path" />
</path>
<taskdef resource="scala/tools/ant/antlib.xml">
<classpath>
<pathelement location="${scala-compiler.jar}" />
<pathelement location="${scala-library.jar}" />
</classpath>
</taskdef>
</target>
<target name="app.compile" depends="init">
<property name="app.src.dir" location="${src.dir}" />
<mkdir dir="${app.classes.dir}" />
<scalac destdir="${app.classes.dir}"
srcdir="${app.src.dir}"
classpathref="app.lib.path"
force="changed"
deprecation="on"
unchecked="on">
<include name="**/*.scala" />
</scalac>
</target>
<target name="test.compile" depends="app.compile">
<property name="test.src.dir" location="${test.dir}/end-to-end" />
<mkdir dir="${test.classes.dir}" />
<scalac destdir="${test.classes.dir}"
srcdir="${test.src.dir}"
classpathref="test.lib.path"
force="changed"
deprecation="on"
unchecked="on">
<include name="**/*.scala" />
</scalac>
</target>
<target name="openfire.check">
<waitfor checkevery="1" checkeveryunit="second" maxwait="20" timeoutproperty="openfire.is.down">
<http url="http://localhost:9090" />
</waitfor>
</target>
<target name="test.run"
description="Run the tests"
depends="test.compile, openfire.check" >
<fail message="OpenFire is not running" if="openfire.is.down"/>
<property name="test.reports.dir" location="${build.dir}/testreports"/>
<mkdir dir="${test.reports.dir}"/>
<junit>
<batchtest todir="${test.reports.dir}" haltonfailure="true" haltonerror="true">
<formatter type="plain"/>
<fileset dir="${test.classes.dir}" includes="**/*Test.class" />
</batchtest>
<classpath>
<path refid="test.lib.path" />
<path location="${test.classes.dir}" />
</classpath>
</junit>
</target>
<target name="build"
description="Clean, build, and full test"
depends="clean, test.run" />
</project>