forked from MobilityFirst/gigapaxos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
412 lines (362 loc) · 16.6 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
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
<?xml version="1.0" encoding="UTF-8"?>
<project
name="Build file for gigapaxos"
basedir="."
default="jar" >
<!-- Properties -->
<property file="build.properties" />
<property name="src.dir" value="src"/>
<property name="testsrc.dir" location="test"/>
<property name="build.dir" value="build"/>
<property name="build.classes.dir" value="${build.dir}/classes"/>
<property name="build.androidclasses.dir" value="${build.dir}/androidclasses"/>
<property name="build.test.classes.dir" value="${build.dir}/test/classes"/>
<property name="test.dir" value="src" />
<property name="build.test.dir" value="${build.dir}/test"/>
<property name="build.jar.dir" value="jars"/>
<property name="lib.dir" value="lib"/>
<property name="dist.dir"
value="gigapaxos-${build.major.number}.${build.minor.number}.${build.revision.number}"/>
<property name="bin.dir" value="bin"/>
<property name="conf.dir" value="conf"/>
<path id="classpath.base">
<pathelement location="${build.dir}"/>
<pathelement location="${build.classes.dir}"/>
<!-- <pathelement location="${conf.dir}"/>-->
<fileset dir="${lib.dir}">
<include name="*.jar"/>
</fileset>
</path>
<target name="init">
<tstamp/>
<mkdir dir="${build.dir}"/>
<mkdir dir="${build.classes.dir}"/>
<mkdir dir="${build.androidclasses.dir}"/>
<mkdir dir="${build.jar.dir}"/>
</target>
<target name="compile" depends="init, buildnumber" description="compile java files">
<javac srcdir="${src.dir}" destdir="${build.classes.dir}" debug="true" debuglevel="lines,vars,source"
includeantruntime="false">
<compilerarg value="-Xlint:unchecked"/>
<classpath refid="classpath.base"/>
</javac>
<javac srcdir="${src.dir}" destdir="${build.androidclasses.dir}" debug="true" debuglevel="lines,vars,source"
includeantruntime="false">
<compilerarg value="-Xlint:unchecked"/>
<classpath refid="classpath.base"/>
</javac>
</target>
<target name="gigapaxos_jarbuild" depends="compile" description="generate jar files for gigpaxos">
<mkdir dir="${build.jar.dir}"/>
<jar
destfile="${build.jar.dir}/gigapaxos-${build.major.number}.${build.minor.number}.${build.revision.number}.jar" filesetmanifest="mergewithoutmain">
<manifest>
<attribute name="Built-By" value="${V. Arun}"/>
<attribute name="Implementation-Vendor"
value="University of Massachusetts" />
<attribute name="Implementation-Title" value="GigaPaxos" />
<attribute name="Implementation-Version"
value="${build.major.number}.${build.minor.number}.${build.revision.number}" />
<attribute name="Class-Path" value="."/>
<attribute name="Build-Version" value="${version.code}" />
</manifest>
<fileset dir="${build.classes.dir}" includes="**/*.class" />
<zipgroupfileset dir="${lib.dir}" includes="**/*.jar" />
</jar>
</target>
<target name="gigapaxos_android_jarbuild" depends="compile" description="generate jar files for gigpaxos">
<!-- Translate classes using RetroLambda -->
<exec executable="java">
<arg line="-Dretrolambda.inputDir=${build.androidclasses.dir} -Dretrolambda.classpath="${lib.dir}/*" -Dretrolambda.defaultMethods=true -javaagent:android/retrolambda.jar -jar android/retrolambda.jar"/>
</exec>
<mkdir dir="${build.jar.dir}"/>
<jar
destfile="${build.jar.dir}/gigapaxos-android-${build.major.number}.${build.minor.number}.${build.revision.number}.jar" filesetmanifest="mergewithoutmain">
<manifest>
<attribute name="Built-By" value="${V. Arun}"/>
<attribute name="Implementation-Vendor"
value="University of Massachusetts" />
<attribute name="Implementation-Title" value="GigaPaxos" />
<attribute name="Implementation-Version"
value="${build.major.number}.${build.minor.number}.${build.revision.number}" />
<attribute name="Class-Path" value="."/>
<attribute name="Build-Version" value="${version.code}" />
</manifest>
<fileset dir="${build.androidclasses.dir}" includes="**/*.class" />
<zipgroupfileset dir="${lib.dir}" includes="**/*.jar" />
</jar>
</target>
<target name="nio_jarbuild" depends="compile" description="generate jar files for nio">
<mkdir dir="${build.jar.dir}"/>
<jar destfile="${build.jar.dir}/nio-${nio.build.major.number}.${nio.build.minor.number}.${nio.build.revision.number}.jar"
filesetmanifest="mergewithoutmain">
<manifest>
<attribute name="Built-By" value="${V. Arun}"/>
<attribute name="Implementation-Vendor"
value="University of Massachusetts" />
<attribute name="Implementation-Title" value="nio" />
<attribute name="Implementation-Version"
value="${nio.build.major.number}.${nio.build.minor.number}.${nio.build.revision.number}" />
<attribute name="Build-Version" value="${version.code}" />
</manifest>
<fileset dir="${build.classes.dir}" includes="edu/umass/cs/nio/**/*.class"/>
<fileset dir="${build.classes.dir}" includes="edu/umass/cs/utils/*.class"/>
<fileset dir="${build.classes.dir}" includes="org/json/*.class"/>
<!-- interesting special cases here added because of one use of ReconfigurableClient in NIOInstrumenter
is this still needed?
-->
<fileset dir="${build.classes.dir}" includes="edu/umass/cs/reconfiguration/**/*.class"/>
<fileset dir="${build.classes.dir}" includes="edu/umass/cs/gigapaxos/**/*.class"/>
<fileset dir="${build.classes.dir}" includes="edu/umass/cs/protocoltask/**/*.class"/>
</jar>
</target>
<target name="gigapaxos_nio_src_jarbuild" depends="compile" description="generate source jar">
<mkdir dir="${build.jar.dir}"/>
<jar destfile="${build.jar.dir}/gigapaxos-nio-src.jar">
<fileset dir="${src.dir}" includes="**/*.java"/>
</jar>
</target>
<target name="clean" description="remove generated files">
<delete dir="${build.dir}"/>
<delete dir="${build.jar.dir}"/>
<delete dir="${dist.dir}"/>
</target>
<target name="doc" description="generate javadoc">
<mkdir dir="${build.dir}/doc"/>
<javadoc packagenames="edu.umass.cs.*"
sourcepath="${src.dir}"
destdir="${build.dir}/doc"
additionalparam="-Xdoclint:none">
<classpath refid="classpath.base"/>
<!-- <link href="http://java.sun.com/javase/6/docs/api/"/>-->
</javadoc>
<mkdir dir="${dist.dir}/doc"/>
<copy todir="${dist.dir}/doc">
<fileset dir="${build.dir}/doc" includes="**"/>
</copy>
</target>
<target name="jar" depends="gigapaxos_jarbuild, nio_jarbuild, gigapaxos_nio_src_jarbuild, gigapaxos_android_jarbuild">
</target>
<target name="dist" depends="gigapaxos_jarbuild, nio_jarbuild">
<mkdir dir="${dist.dir}"/>
<mkdir dir="${dist.dir}/${build.jar.dir}"/>
<mkdir dir="${dist.dir}/${bin.dir}"/>
<copy todir="${dist.dir}/${build.jar.dir}">
<fileset dir="${build.jar.dir}" includes="*.jar"/>
</copy>
<copy todir="${dist.dir}/${bin.dir}">
<fileset dir="${bin.dir}" includes="*"/>
</copy>
<copy todir="${dist.dir}">
<fileset dir="." includes="LICENSE.txt README.md"/>
</copy>
<copy todir="${dist.dir}/${conf.dir}">
<fileset dir="conf"/>
</copy>
</target>
<path id="classpath.test">
<pathelement location="${build.classes.dir}"/>
<pathelement location="${lib.dir}/junit-4.12.jar"/>
<pathelement location="${lib.dir}/hamcrest-all-1.3.jar"/>
<pathelement location="${lib.dir}/c3p0-0.9.5.jar"/>
<pathelement location="${lib.dir}/derby.jar"/>
<pathelement location="${lib.dir}/json-smart-1.2.jar"/>
<pathelement location="${lib.dir}/mchange-commons-java-0.2.9.jar"/>
<pathelement location="${lib.dir}/mapdb-2.0.0-20151103.120435-149.jar"/>
<pathelement location="${lib.dir}/zookeeper-3.3.6.jar"/>
<pathelement location="${lib.dir}/msgpack-core-0.8.8.jar"/>
<pathelement location="${lib.dir}/jedis-2.8.1.jar"/>
<pathelement location="${lib.dir}/netty-all-4.1.4.Final.jar"/>
<!-- <pathelement location="${conf.dir}"/>-->
</path>
<target name="ensure-test-name" unless="test">
<fail message="You must run this target with -Dtest=TestName"/>
</target>
<target name="ensure-pkg-name" unless="pkg">
<fail message="You must run this target with -Dpkg=pattern"/>
</target>
<target name="ensure-class-name" unless="class">
<fail message="You must run this target with -Dclass=classname"/>
</target>
<target name="compiletest" depends="compile" description="Compile all the test files">
<mkdir dir="${build.test.dir}" />
<mkdir dir="${build.test.classes.dir}" />
<javac srcdir="${test.dir}"
destdir="${build.test.classes.dir}"
debug="on"
includeantruntime="false">
<classpath refid="classpath.test"/>
</javac>
</target>
<target name="runtest" description="Runs the test you specify on the command line with -Dtest="
depends="compiletest, ensure-test-name">
<junit printsummary="withOutAndErr" fork="true" forkmode="once" showoutput="true" haltonfailure="on">
<jvmarg value="-ea"/>
<jvmarg value="-Djava.util.logging.config.file=logging.properties"/>
<jvmarg value="-Djavax.net.ssl.trustStorePassword=qwerty"/>
<jvmarg value="-Djavax.net.ssl.trustStore=conf/keyStore/node100.jks"/>
<jvmarg value="-Djavax.net.ssl.keyStorePassword=qwerty"/>
<jvmarg value="-Djavax.net.ssl.keyStore=conf/keyStore/node100.jks"/>
<jvmarg value="-DgigapaxosConfig=gigapaxos.properties"/>
<classpath>
<pathelement location="${build.test.classes.dir}"/>
</classpath>
<!-- Make sure these libraries are included -->
<classpath refid="classpath.test" />
<formatter type="plain" usefile="false"/>
<batchtest>
<fileset dir="${test.dir}">
<include name="**/${test}.java"/>
</fileset>
</batchtest>
<batchtest>
<fileset dir="${build.test.classes.dir}">
<include name="**/${test}/*Test.class"/>
</fileset>
</batchtest>
</junit>
</target>
<target name="run" description="Runs the test you specify on the
command line with -Dclass="
depends="jar, compiletest, ensure-class-name">
<java classname="${class}">
<jvmarg value="-ea"/>
<jvmarg value="-Djava.util.logging.config.file=logging.properties"/>
<jvmarg value="-Djavax.net.ssl.trustStorePassword=qwerty"/>
<jvmarg value="-Djavax.net.ssl.trustStore=conf/keyStore/node100.jks"/>
<jvmarg value="-Djavax.net.ssl.keyStorePassword=qwerty"/>
<jvmarg value="-Djavax.net.ssl.keyStore=conf/keyStore/node100.jks"/>
<jvmarg value="-DgigapaxosConfig=gigapaxos.properties"/>
<classpath>
<pathelement location="${build.test.classes.dir}"/>
</classpath>
<!-- Make sure these libraries are included -->
<classpath refid="classpath.test" />
</java>
</target>
<target name="test" description="Runs the default integration test"
depends="jar, compiletest">
<junit printsummary="yes" fork="yes" haltonfailure="on" showoutput="yes">
<test name="edu.umass.cs.reconfiguration.testing.TESTReconfigurationClient"/>
<formatter type="plain" usefile="false"/>
<jvmarg value="-ea"/>
<jvmarg value="-Djava.util.logging.config.file=logging.properties"/>
<jvmarg value="-Djavax.net.ssl.trustStorePassword=qwerty"/>
<jvmarg value="-Djavax.net.ssl.trustStore=conf/keyStore/node100.jks"/>
<jvmarg value="-Djavax.net.ssl.keyStorePassword=qwerty"/>
<jvmarg value="-Djavax.net.ssl.keyStore=conf/keyStore/node100.jks"/>
<classpath>
<pathelement location="${build.test.classes.dir}"/>
</classpath>
<!-- Make sure these libraries are included -->
<classpath refid="classpath.test" />
</junit>
</target>
<target name="test1" description="Runs the default integration test"
depends="compiletest">
<junit printsummary="yes" fork="yes" haltonfailure="on"
showoutput="yes">
<test
name="edu.umass.cs.reconfiguration.testing.TESTRCDebug"/>
<formatter type="plain" usefile="false"/>
<jvmarg value="-ea"/>
<jvmarg value="-Djava.util.logging.config.file=logging.properties"/>
<jvmarg value="-DtestingConfig=conf/debugTesting.properties"/>
<jvmarg value="-Djavax.net.ssl.trustStorePassword=qwerty"/>
<jvmarg
value="-Djavax.net.ssl.trustStore=conf/keyStore/node100.jks"/>
<jvmarg value="-Djavax.net.ssl.keyStorePassword=qwerty"/>
<jvmarg
value="-Djavax.net.ssl.keyStore=conf/keyStore/node100.jks"/>
<classpath>
<pathelement location="${build.test.classes.dir}"/>
</classpath>
<!-- Make sure these libraries are included -->
<classpath refid="classpath.test" />
</junit>
</target>
<target name="testMethod" description="Runs the default integration test"
depends="jar, compiletest">
<junit printsummary="yes" fork="yes" haltonfailure="on" showoutput="yes">
<test name="edu.umass.cs.reconfiguration.testing.TESTReconfigurationClient" methods="${test}"/>
<formatter type="plain" usefile="false"/>
<jvmarg value="-ea"/>
<jvmarg value="-Djava.util.logging.config.file=logging.properties"/>
<jvmarg value="-Djavax.net.ssl.trustStorePassword=qwerty"/>
<jvmarg value="-Djavax.net.ssl.trustStore=conf/keyStore/node100.jks"/>
<jvmarg value="-Djavax.net.ssl.keyStorePassword=qwerty"/>
<jvmarg value="-Djavax.net.ssl.keyStore=conf/keyStore/node100.jks"/>
<classpath>
<pathelement location="${build.test.classes.dir}"/>
</classpath>
<!-- Make sure these libraries are included -->
<classpath refid="classpath.test" />
</junit>
</target>
<target name="all" depends="clean,jar"
description="build all files"/>
<target name="buildnumber" description="Generates version number and sets it in properties file.">
<buildnumber file="build.number" />
<property name="version.code"
value="${build.major.number}.${build.minor.number}.${build.revision.number}_build${build.number}" />
<echo>Version: ${version.code}</echo>
</target>
<property file="build.properties"/>
<property name="build.mmr.number" value="${build.major.number}.${build.minor.number}.${build.revision.number}"/>
<target name="current-number">
<echo>Current build number:${build.mmr.number}</echo>
</target>
<!--
<target name="compile">
<antcall target="revision"></antcall>
</target>
<target name="dist">
<antcall target="minor"></antcall>
</target>
-->
<target name="revision">
<propertyfile file="build.properties">
<entry key="build.revision.number" type="int" operation="+" value="1" pattern="00"/>
</propertyfile>
</target>
<target name="minor">
<propertyfile file="build.properties">
<entry key="build.minor.number" type="int" operation="+" value="1" pattern="00"/>
<entry key="build.revision.number" type="int" value="0" pattern="00"/>
</propertyfile>
</target>
<target name="major">
<propertyfile file="build.properties">
<entry key="build.major.number" type="int" operation="+" value="1" pattern="00"/>
<entry key="build.minor.number" type="int" value="0" pattern="00"/>
<entry key="build.revision.number" type="int" value="0" pattern="00"/>
</propertyfile>
</target>
<target name="niorevision">
<propertyfile file="build.properties">
<entry key="no.build.revision.number" type="int" operation="+" value="1" pattern="00"/>
</propertyfile>
</target>
<target name="niominor">
<propertyfile file="build.properties">
<entry key="nio.build.minor.number" type="int" operation="+" value="1" pattern="00"/>
<entry key="build.revision.number" type="int" value="0" pattern="00"/>
</propertyfile>
</target>
<target name="niomajor">
<propertyfile file="build.properties">
<entry key="nio.build.major.number" type="int" operation="+" value="1" pattern="00"/>
<entry key="build.minor.number" type="int" value="0" pattern="00"/>
<entry key="build.revision.number" type="int" value="0" pattern="00"/>
</propertyfile>
</target>
<!--
<target name="all">
<propertyfile file="build_info.properties">
<entry key="build.major.number" type="int" operation="+" value="1" pattern="00"/>
<entry key="build.minor.number" type="int" operation="+" value="1" pattern="00"/>
<entry key="build.revision.number" type="int" operation="+" value="1" pattern="00"/>
</propertyfile>
</target>
-->
</project>