-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
240 lines (190 loc) · 9.11 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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
<?xml version="1.0" encoding="ISO-8859-1"?>
<project name="test-load-balancer" default="all">
<property file="test-load-balancer.properties"/>
<!-- Uncomment the following property if no tests compilation is needed -->
<!--
<property name="skip.tests" value="true"/>
-->
<!-- Compiler options -->
<property name="compiler.debug" value="on"/>
<property name="compiler.generate.no.warnings" value="off"/>
<property name="compiler.args" value=""/>
<property name="compiler.max.memory" value="128m"/>
<property name="target" value="target"/>
<property name="log4j.properties" value="${basedir}/log4j.properties"/>
<patternset id="ignored.files">
<exclude name="**/CVS/**"/>
<exclude name="**/SCCS/**"/>
<exclude name="**/RCS/**"/>
<exclude name="**/rcs/**"/>
<exclude name="**/.DS_Store/**"/>
<exclude name="**/.svn/**"/>
<exclude name="**/.sbas/**"/>
<exclude name="**/.IJI.*/**"/>
<exclude name="**/vssver.scc/**"/>
<exclude name="**/vssver2.scc/**"/>
</patternset>
<patternset id="compiler.resources">
<include name="**/?*.properties"/>
<include name="**/?*.xml"/>
<include name="**/?*.gif"/>
<include name="**/?*.png"/>
<include name="**/?*.jpeg"/>
<include name="**/?*.jpg"/>
<include name="**/?*.html"/>
<include name="**/?*.dtd"/>
<include name="**/?*.tld"/>
</patternset>
<!-- JDK definitions -->
<!-- Project Libraries -->
<path id="library.production.classpath">
<fileset dir="${basedir}/lib/production">
<include name="**/*.jar"/>
</fileset>
</path>
<path id="library.all.classpath">
<path refid="library.production.classpath"/>
<fileset dir="${basedir}/lib/test">
<include name="**/*.jar"/>
</fileset>
</path>
<!-- Modules -->
<!-- Module test-load-balancer -->
<dirname property="module.test-load-balancer.basedir" file="${ant.file}"/>
<property name="compiler.args.test-load-balancer" value="${compiler.args}"/>
<property name="test-load-balancer.output.dir"
value="${module.test-load-balancer.basedir}/out/production/test-load-balancer"/>
<property name="test-load-balancer.testoutput.dir"
value="${module.test-load-balancer.basedir}/out/test/test-load-balancer"/>
<path id="test-load-balancer.module.bootclasspath">
<!-- Paths to be included in compilation bootclasspath -->
</path>
<path id="test-load-balancer.module.classpath">
<path refid="library.all.classpath"/>
</path>
<path id="test-load-balancer.runtime.module.classpath">
<pathelement location="${test-load-balancer.output.dir}"/>
<pathelement location="${test-load-balancer.testoutput.dir}"/>
<path refid="library.production.classpath"/>
</path>
<patternset id="excluded.from.module.test-load-balancer">
<patternset refid="ignored.files"/>
</patternset>
<patternset id="excluded.from.compilation.test-load-balancer">
<patternset refid="excluded.from.module.test-load-balancer"/>
</patternset>
<path id="test-load-balancer.module.sourcepath">
<dirset dir="${module.test-load-balancer.basedir}">
<include name="src"/>
</dirset>
</path>
<path id="test-load-balancer.module.test.sourcepath">
<dirset dir="${module.test-load-balancer.basedir}">
<include name="ft/tests"/>
<include name="ut"/>
</dirset>
</path>
<target name="compile.module.test-load-balancer"
depends="compile.module.test-load-balancer.production,compile.module.test-load-balancer.tests"
description="Compile module test-load-balancer"/>
<target name="compile.module.test-load-balancer.production"
description="Compile module test-load-balancer; production classes">
<mkdir dir="${test-load-balancer.output.dir}"/>
<javac destdir="${test-load-balancer.output.dir}" debug="${compiler.debug}"
nowarn="${compiler.generate.no.warnings}" memorymaximumsize="${compiler.max.memory}" fork="true">
<compilerarg line="${compiler.args.test-load-balancer}"/>
<bootclasspath refid="test-load-balancer.module.bootclasspath"/>
<classpath refid="test-load-balancer.module.classpath"/>
<src refid="test-load-balancer.module.sourcepath"/>
<patternset refid="excluded.from.compilation.test-load-balancer"/>
</javac>
<copy todir="${test-load-balancer.output.dir}">
<fileset dir="${module.test-load-balancer.basedir}/src">
<patternset refid="compiler.resources"/>
<type type="file"/>
</fileset>
<fileset file="${log4j.properties}"/>
</copy>
</target>
<target name="compile.module.test-load-balancer.tests" depends="compile.module.test-load-balancer.production"
description="compile module test-load-balancer; test classes" unless="skip.tests">
<mkdir dir="${test-load-balancer.testoutput.dir}"/>
<javac destdir="${test-load-balancer.testoutput.dir}" debug="${compiler.debug}"
nowarn="${compiler.generate.no.warnings}" memorymaximumsize="${compiler.max.memory}" fork="true">
<compilerarg line="${compiler.args.test-load-balancer}"/>
<classpath refid="test-load-balancer.module.classpath"/>
<classpath location="${test-load-balancer.output.dir}"/>
<src refid="test-load-balancer.module.test.sourcepath"/>
<patternset refid="excluded.from.compilation.test-load-balancer"/>
</javac>
<copy todir="${test-load-balancer.testoutput.dir}">
<fileset dir="${module.test-load-balancer.basedir}/ft">
<patternset refid="compiler.resources"/>
<type type="file"/>
</fileset>
<fileset dir="${module.test-load-balancer.basedir}/ut">
<patternset refid="compiler.resources"/>
<type type="file"/>
</fileset>
</copy>
</target>
<target name="ut.module.test-load-balancer">
<junit printsummary="yes" dir="${module.test-load-balancer.basedir}" haltonfailure="true" fork="true"
forkMode="once">
<classpath refid="test-load-balancer.runtime.module.classpath"></classpath>
<formatter type="brief" usefile="false"/>
<formatter type="xml"/>
<batchtest todir="${target}/testoutput">
<fileset dir="${module.test-load-balancer.basedir}/ut">
<include name="**/*Test.java"></include>
</fileset>
</batchtest>
</junit>
</target>
<target name="ft.module.test-load-balancer" depends="init, clean, compile.module.test-load-balancer, jar.module.test-load-balancer">
<junit printsummary="yes" dir="${module.test-load-balancer.basedir}" haltonfailure="true" fork="true"
forkMode="once">
<classpath refid="test-load-balancer.runtime.module.classpath"></classpath>
<formatter type="brief" usefile="false"/>
<formatter type="xml"/>
<batchtest todir="${target}/testoutput">
<fileset dir="${module.test-load-balancer.basedir}/ft/tests">
<include name="**/*Test.java"></include>
</fileset>
</batchtest>
</junit>
</target>
<target name="jar.module.test-load-balancer" depends="clean, init, compile.module.test-load-balancer.production">
<jar destfile="${target}/test-load-balancer.jar">
<fileset dir="${test-load-balancer.output.dir}">
<include name="**/*.class"/>
<include name="**/log4j.properties"/>
</fileset>
</jar>
</target>
<target name="jar" depends="jar.module.test-load-balancer"/>
<target name="publish" depends="jar.module.test-load-balancer">
<delete dir="${basedir}/ft/junit/connectfour/lib/tlb"/>
<copy todir="${basedir}/ft/junit/connectfour/lib/tlb" overwrite="true">
<fileset dir="${basedir}/lib/production">
<include name="**/*.jar"/>
</fileset>
<fileset file="${target}/test-load-balancer.jar"/>
</copy>
</target>
<target name="clean.module.test-load-balancer" description="cleanup module">
<delete dir="${test-load-balancer.output.dir}"/>
<delete dir="${test-load-balancer.testoutput.dir}"/>
</target>
<target name="init" description="Build initialization">
<delete dir="${target}"/>
<mkdir dir="${target}"/>
<mkdir dir="${target}/testoutput"/>
</target>
<target name="clean" depends="clean.module.test-load-balancer" description="cleanup all"/>
<import file="ft/twist/tlb-twist/build.xml"/>
<target name="all"
depends="init, clean, compile.module.test-load-balancer, ut.module.test-load-balancer,
jar.module.test-load-balancer, publish, ft.module.test-load-balancer"
description="build all"/>
</project>