-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
148 lines (130 loc) · 5.82 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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
<?xml version="1.0" encoding="UTF-8"?>
<project name="Auction Sniper" default="build.full">
<property name="jvmVersion" value="1.6"/>
<property name="build.dir" location="build" />
<property name="src.dir" location="src" />
<property name="test.dir" location="test"/>
<property name="lib.dir" value="libs" />
<property name="test.acceptance.src.dir" location="${test.dir}/acceptance" />
<property name="test.unit.src.dir" location="${test.dir}/unit" />
<property name="test.integration.src.dir" location="${test.dir}/integration" />
<property name="app.classes.dir" location="${build.dir}/classes/app" />
<property name="test.classes.dir" location="${build.dir}/classes/test" />
<property name="test.unit.classes.dir" location="${test.classes.dir}/unit" />
<property name="test.integration.classes.dir" location="${test.classes.dir}/integration" />
<property name="test.acceptance.classes.dir" location="${test.classes.dir}/acceptance" />
<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="app.compile">
<property name="app.src.dir" location="${src.dir}" />
<mkdir dir="${app.classes.dir}" />
<javac destdir="${app.classes.dir}"
srcdir="${app.src.dir}"
classpathref="app.lib.path"
debug="on"
source="${jvmVersion}"
target="${jvmVersion}"/>
</target>
<target name="test.acceptance.compile"
depends="app.compile">
<mkdir dir="${test.acceptance.classes.dir}" />
<javac destdir="${test.acceptance.classes.dir}"
srcdir="${test.acceptance.src.dir}"
classpathref="test.lib.path"
debug="on"
source="${jvmVersion}"
target="${jvmVersion}" />
</target>
<target name="test.integration.compile"
depends="app.compile, test.acceptance.compile">
<mkdir dir="${test.integration.classes.dir}" />
<javac destdir="${test.integration.classes.dir}"
srcdir="${test.integration.src.dir}"
debug="on"
source="${jvmVersion}"
target="${jvmVersion}" >
<classpath>
<path refid="test.lib.path" />
<path location="${test.acceptance.classes.dir}" />
</classpath>
</javac>
</target>
<target name="test.unit.compile"
depends="app.compile">
<mkdir dir="${test.unit.classes.dir}" />
<javac destdir="${test.unit.classes.dir}"
srcdir="${test.unit.src.dir}"
classpathref="test.lib.path"
debug="on"
source="${jvmVersion}"
target="${jvmVersion}" />
</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.unit.run"
description="Run the tests"
depends="clean, test.unit.compile" >
<property name="test.unit.reports.dir" location="${build.dir}/testreports/unit"/>
<mkdir dir="${test.unit.reports.dir}"/>
<junit showoutput="true">
<batchtest todir="${test.unit.reports.dir}" haltonfailure="true" haltonerror="true">
<formatter type="xml"/>
<fileset dir="${test.dir}/unit" includes="**/*Test.java" />
</batchtest>
<classpath>
<path refid="test.lib.path" />
<path location="${test.unit.classes.dir}" />
</classpath>
</junit>
</target>
<target name="test.acceptance.run"
description="Run the tests"
depends="test.acceptance.compile, openfire.check" >
<fail message="OpenFire is not running" if="openfire.is.down"/>
<property name="test.acceptance.reports.dir" location="${build.dir}/testreports/acceptance"/>
<mkdir dir="${test.acceptance.reports.dir}"/>
<junit showoutput="true">
<batchtest todir="${test.acceptance.reports.dir}" haltonfailure="true" haltonerror="true">
<formatter type="xml"/>
<fileset dir="${test.dir}/acceptance" includes="**/*Test.java" />
</batchtest>
<classpath>
<path refid="test.lib.path" />
<path location="${test.acceptance.classes.dir}" />
</classpath>
</junit>
</target>
<target name="test.integration.run"
description="Run the tests"
depends="test.integration.compile, openfire.check" >
<fail message="OpenFire is not running" if="openfire.is.down"/>
<property name="test.integration.reports.dir" location="${build.dir}/testreports/integration"/>
<mkdir dir="${test.integration.reports.dir}"/>
<junit showoutput="true">
<batchtest todir="${test.integration.reports.dir}" haltonfailure="true" haltonerror="true">
<formatter type="xml"/>
<fileset dir="${test.dir}/integration" includes="**/*Test.java" />
</batchtest>
<classpath>
<path refid="test.lib.path" />
<path location="${test.acceptance.classes.dir}" />
<path location="${test.integration.classes.dir}" />
</classpath>
</junit>
</target>
<target name="build.full"
description="Clean, build, and full test"
depends="clean, test.unit.run, test.acceptance.run, test.integration.run" />
</project>