-
Notifications
You must be signed in to change notification settings - Fork 5
/
build.xml
443 lines (422 loc) · 17.4 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
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
<?xml version="1.0"?>
<project name="Verifoo Project" default="compile" basedir=".">
<!-- set global properties for this build -->
<property name="src.dir" location="src" />
<property name="build.dir" location="build" />
<property name="resources.dir" location="resources" />
<property name="javadoc.dir" location="docs" />
<property name="gen.dir" location="gen-src" />
<property name="dist.dir" location="dist" />
<property name="schema.dir" location="xsd" />
<property name="report.dir" location="log" />
<property name="lib.dir" location="WebContent/WEB-INF/lib" />
<property name="target.dir" location="target" />
<property name="PORT" value="8080" />
<property name="URL" value="http://localhost:${PORT}/verifoo/rest" />
<property name="URL_j2ee" value="http://localhost:${PORT}/verifoo_j2ee/rest" />
<property name="neo4jURL" value="bolt://127.0.0.1:7687" />
<property name="neo4jUsername" value="neo4j" />
<property name="neo4jPassword" value="password" />
<path id="class.path">
<fileset dir="${lib.dir}">
<include name="**/*.jar" />
</fileset>
<fileset dir="lib/lib4j/">
<include name="**/*.jar" />
</fileset>
<fileset dir="lib/junit/">
<include name="**/*.jar" />
</fileset>
</path>
<target name="init">
<!-- Create the time stamp -->
<tstamp />
<!-- Create the build directory structure used
by compile -->
<mkdir dir="${build.dir}" />
<mkdir dir="${report.dir}" />
<mkdir dir="${javadoc.dir}" />
</target>
<!-- Target chk-bindings -->
<target name="-chk-bindings">
<uptodate property="generate-bindings.notRequired" targetfile="${src.dir}/.flagfile">
<srcfiles dir="${schema.dir}" includes="**/*.xsd" />
</uptodate>
</target>
<!-- Target generate-bindings -->
<target name="generate-bindings" depends="init,-chk-bindings" description="Generate bindings from schema">
<mkdir dir="${gen.dir}" />
<exec executable="xjc" failonerror="true">
<arg value="-d" />
<arg value="${gen.dir}" />
<arg value="-p" />
<arg value="it.polito.verefoo.jaxb" />
<arg value="${schema.dir}/nfvSchema.xsd" />
</exec>
<touch file="${src.dir}/.flagfile" />
</target>
<target name="compile" depends="init, generate-bindings" description="compile the source ">
<property name="debug" value="off" />
<property name="debuglevel" value="lines,vars,source" />
<!-- Compile the code from ${src} into ${build} -->
<javac encoding="ISO-8859-1" includeantruntime="false" srcdir="${src.dir}" includes="${gen.dir}" destdir="${build.dir}" debug="${debug.dir}" debuglevel="${debuglevel}">
<src path="${gen.dir}" />
<include name="it/polito/verefoo/test/**" />
<include name="it/polito/verefoo/jaxb/**" />
<classpath refid="class.path" />
</javac>
</target>
<!-- Automatically generate the javadoc -->
<target name="javadoc" depends="compile" description="generate the javadoc">
<javadoc access="public" author="false" classpath="WebContent/WEB-INF/lib/com.microsoft.z3.jar;WebContent/WEB-INF/lib/hk2-api-2.5.0-b42.jar;lib/junit/junit.jar;WebContent/WEB-INF/lib/yasson-1.0.jar;WebContent/WEB-INF/lib/jersey-common.jar;WebContent/WEB-INF/lib/jersey-server.jar;WebContent/WEB-INF/lib/javassist-3.22.0-CR2.jar;WebContent/WEB-INF/lib/swagger-jaxrs-1.5.0.jar;WebContent/WEB-INF/lib/persistence-api-1.0.jar;WebContent/WEB-INF/lib/jersey-media-json-binding.jar;WebContent/WEB-INF/lib/swagger-jersey2-jaxrs-1.5.0.jar;WebContent/WEB-INF/lib/javax.inject-1.jar;WebContent/WEB-INF/lib/jaxb-api-2.2.7.jar;WebContent/WEB-INF/lib/hk2-utils-2.5.0-b42.jar;WebContent/WEB-INF/lib/javax.json-1.1.jar;WebContent/WEB-INF/lib/jersey-media-sse.jar;WebContent/WEB-INF/lib/jsr250-api-1.0.jar;WebContent/WEB-INF/lib/hk2-locator-2.5.0-b42.jar;WebContent/WEB-INF/lib/org.osgi.core-4.2.0.jar;lib/com.microsoft.z3.jar;WebContent/WEB-INF/lib/jersey-container-servlet.jar;WebContent/WEB-INF/lib/validation-api-1.1.0.Final.jar;lib/junit/org.hamcrest.core_1.3.0.v201303031735.jar;WebContent/WEB-INF/lib/jersey-media-jaxb.jar;WebContent/WEB-INF/lib/javax.inject-2.5.0-b42.jar;lib/lib4j/log4j-api-2.9.1.jar;WebContent/WEB-INF/lib/jackson-annotations-2.9.3.jar;WebContent/WEB-INF/lib/jackson-core-2.9.3.jar;WebContent/WEB-INF/lib/jboss-interceptors-api_1.1_spec-1.0.0.Beta1.jar;WebContent/WEB-INF/lib/javax.annotation-api-1.2.jar;WebContent/WEB-INF/lib/swagger-annotations-1.5.0.jar;WebContent/WEB-INF/lib/javax.json.bind-api-1.0.jar;WebContent/WEB-INF/lib/commons-lang3-3.7.jar;WebContent/WEB-INF/lib/osgi-resource-locator-1.0.1.jar;WebContent/WEB-INF/lib/jersey-hk2.jar;WebContent/WEB-INF/lib/swagger-core-1.5.0.jar;WebContent/WEB-INF/lib/jersey-container-servlet-core.jar;WebContent/WEB-INF/lib/javax.servlet-api-3.0.1.jar;WebContent/WEB-INF/lib/jersey-client.jar;WebContent/WEB-INF/lib/reflections-0.9.11.jar;WebContent/WEB-INF/lib/slf4j-simple-1.7.25.jar;lib/lib4j/log4j-core-2.9.1.jar;WebContent/WEB-INF/lib/log4j-api-2.9.1.jar;WebContent/WEB-INF/lib/slf4j-api-1.7.25.jar;WebContent/WEB-INF/lib/el-api-2.2.jar;WebContent/WEB-INF/lib/swagger-models-1.5.0.jar;lib/junit/concurrent-junit-1.0.0.jar;WebContent/WEB-INF/lib/javax.ws.rs-api-2.1.jar;WebContent/WEB-INF/lib/jackson-databind-2.9.3.jar;WebContent/WEB-INF/lib/aopalliance-repackaged-2.5.0-b42.jar;WebContent/WEB-INF/lib/jersey-media-multipart-2.26.jar;WebContent/WEB-INF/lib/javax.json-api-1.1.jar;WebContent/WEB-INF/lib/log4j-core-2.9.1.jar;WebContent/WEB-INF/lib/guava-23.6-jre.jar;WebContent/WEB-INF/lib/cdi-api-1.1.jar" destdir="${javadoc.dir}" nodeprecated="false" nodeprecatedlist="false" noindex="false" nonavbar="false" notree="false" packagenames="it.polito.verigraph.mcnet.components,it.polito.verifoo.rest.app,it.polito.verifoo.rest.medicine,it.polito.verifoo.rest.neo4j,it.polito.verifoo.rest.test,it.polito.verifoo.rest.jaxb,it.polito.verifoo.rest.logger,it.polito.verifoo.test,it.polito.verifoo.rest.common,it.polito.verifoo.rest.main,it.polito.verigraph.mcnet.netobjs,it.polito.verifoo.rest.webservice,it.polito.verifoo.random" source="1.8" sourcepath="src;resources" splitindex="true" use="true" version="true" />
</target>
<target name="VerigraphTest" depends="compile" description="Run the sample application">
<for param="letter" list="10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40">
<sequential>
<java classname="it.polito.verefoo.test.TestPerformanceScalabilityVerigraph" failonerror="true" fork="yes">
<sysproperty key="it.polito.verefoo.test.seed" value="@{letter}" />
<classpath>
<path refid="class.path" />
<pathelement path="${build.dir}" />
</classpath>
</java>
</sequential>
</for>
</target>
<target name="PandaTest" depends="compile" description="Run the sample application">
<for param="letter" list="76663
,185022
,183979
,773180
,542673
,489438
,490154
,144042
,750992
,583862
,409432
,204801
,749927
,722017
,157905
,248126
,370997
,450103
,680760
,653542
,551880
,614321
,726822
,431176
,246929
,548602
,94493
,75552
,489051
,72235
,476398
,56421
,429204
,279421
,337135
,277337
,770954
,380231
,265228
,742828
,627803
,124434
,170741
,572808
,222717
,744692
,779104
,2428
,780556
,238247
,655249
,603514
,465274
,340897
,109811
,254882
,210581
,638845
,74750
,678552
,26869
,339418
,706898
,721250
,534976
,236093
,607191
,333006
,155294
,507941
,241825
,68705
,355224
,616062
,599124
,781932
,282936
,75804
,773532
,86645
,769076
,619394
,694405
,443307
,487671
,781592
,274670
,3671
,9735
,11540
,388277
,722761
,27556
,691296
,766834
,531792
,716951
,292642
,354082
,458801">
<sequential>
<java classname="it.polito.verefoo.test.TestPerformanceScalabilityPanda" failonerror="true" fork="yes">
<sysproperty key="it.polito.verefoo.test.seed" value="@{letter}" />
<classpath>
<path refid="class.path" />
<pathelement path="${build.dir}" />
</classpath>
</java>
</sequential>
</for>
</target>
<target name="PandaTest2" depends="compile" description="Run the sample application">
<java classname="it.polito.verefoo.test.TestPerformanceScalabilityPanda2" failonerror="true" fork="yes">
<classpath>
<path refid="class.path" />
<pathelement path="${build.dir}" />
</classpath>
</java>
</target>
<taskdef resource="net/sf/antcontrib/antcontrib.properties">
<classpath>
<fileset dir="lib" />
</classpath>
</taskdef>
<taskdef resource="net/sf/antcontrib/antlib.xml">
<classpath>
<fileset dir="lib" />
</classpath>
</taskdef>
<target name="test" depends="compile">
<junit printsummary="yes" haltonfailure="no" showoutput="true">
<!-- Project classpath, must include junit.jar -->
<classpath location="lib/junit/junit.jar" />
<classpath location="lib/junit/concurrent-junit-1.0.0.jar" />
<classpath location="lib/junit/org.hamcrest.core_1.3.0.v201303031735.jar" />
<classpath location="lib/com.microsoft.z3.jar" />
<classpath location="lib/lib4j/log4j-api-2.9.1.jar" />
<classpath location="lib/lib4j/log4j-core-2.9.1.jar" />
<classpath>
<fileset dir="${lib.dir}">
<include name="**/*.jar" />
</fileset>
</classpath>
<!-- test class -->
<classpath location="${build.dir}" />
<test name="it.polito.verifoo.rest.test.TestXML" haltonfailure="no" todir="${report.dir}">
<formatter type="plain" />
<formatter type="xml" />
</test>
<test name="it.polito.verifoo.rest.test.TestProxy" haltonfailure="no" todir="${report.dir}">
<formatter type="plain" />
<formatter type="xml" />
</test>
</junit>
<fail if="test_failed" message="*** Some Tests FAILED ***" />
<echo>*** All Tests PASSED ***</echo>
</target>
<target name="war" depends="compile">
<war destfile="${target.dir}/verifoo.war" webxml="WebContent/WEB-INF/web.xml">
<fileset dir="WebContent">
<include name="**/*.*" />
</fileset>
<classes dir="${build.dir}" />
<classes dir="${resources.dir}" />
</war>
</target>
<target name="war_j2ee" depends="compile">
<war destfile="${target.dir}/verifoo_j2ee.war" webxml="WebContent/WEB-INF/web.xml">
<fileset dir="WebContent">
<exclude name="WEB-INF/lib/aopalliance-repackaged-2.5.0-b32.jar" />
<exclude name="WEB-INF/lib/commons-lang3-3.2.1.jar" />
<exclude name="WEB-INF/lib/guava-15.0.jar" />
<exclude name="WEB-INF/lib/hk2-api-2.5.0-b32.jar" />
<exclude name="WEB-INF/lib/hk2-locator-2.5.0-b32.jar" />
<exclude name="WEB-INF/lib/hk2-utils-2.5.0-b32.jar" />
<exclude name="WEB-INF/lib/jackson-annotations-2.4.0.jar" />
<exclude name="WEB-INF/lib/jackson-core-2.4.2.jar" />
<exclude name="WEB-INF/lib/jackson-databind-2.4.2.jar" />
<exclude name="WEB-INF/lib/javassist-3.20.0-GA.jar" />
<exclude name="WEB-INF/lib/javax.annotation-api-1.2.jar" />
<exclude name="WEB-INF/lib/javax.inject-2.5.0-b32.jar" />
<exclude name="WEB-INF/lib/javax.ws.rs-api-2.0.1.jar" />
<exclude name="WEB-INF/lib/jaxb-api-2.2.12-b140109.1041.jar" />
<exclude name="WEB-INF/lib/jersey-client-2.25.1.jar" />
<exclude name="WEB-INF/lib/jersey-common-2.25.1.jar" />
<exclude name="WEB-INF/lib/jersey-container-servlet-2.25.1.jar" />
<exclude name="WEB-INF/lib/jersey-container-servlet-core-2.25.1.jar" />
<exclude name="WEB-INF/lib/jersey-core-1.19.1.jar" />
<exclude name="WEB-INF/lib/jersey-entity-filtering-2.25.1.jar" />
<exclude name="WEB-INF/lib/jersey-guava-2.25.1.jar" />
<exclude name="WEB-INF/lib/jersey-media-jaxb-2.25.1.jar" />
<exclude name="WEB-INF/lib/jersey-media-moxy-2.25.1.jar" />
<exclude name="WEB-INF/lib/jersey-media-multipart-2.25.1.jar" />
<exclude name="WEB-INF/lib/jersey-server-2.25.1.jar" />
<exclude name="WEB-INF/lib/org.eclipse.persistence.moxy-2.6.0.jar" />
<exclude name="WEB-INF/lib/osgi-resource-locator-1.0.1.jar" />
<exclude name="WEB-INF/lib/reflections-0.9.9.jar" />
<exclude name="WEB-INF/lib/swagger-annotations-1.5.0.jar" />
<exclude name="WEB-INF/lib/swagger-core-1.5.0.jar" />
<exclude name="WEB-INF/lib/swagger-jaxrs-1.5.0.jar" />
<exclude name="WEB-INF/lib/swagger-jersey2-jaxrs-1.5.0.jar" />
<exclude name="WEB-INF/lib/swagger-models-1.5.0.jar" />
<exclude name="WEB-INF/lib/validation-api-1.1.0.Final.jar" />
</fileset>
<classes dir="${build.dir}" />
<classes dir="${resources.dir}" />
</war>
</target>
<target name="deploy" depends="war">
<sequential>
<antcall target="stop-tomcat" />
<antcall target="start-tomcat" />
<antcall target="redeployWS" />
</sequential>
</target>
<target name="deploy_j2ee" depends="war_j2ee">
<sequential>
<antcall target="stop-tomcat" />
<antcall target="start-tomcat" />
<antcall target="redeployWS">
<param name="service.name" value="verifoo_j2ee" />
</antcall>
</sequential>
</target>
<!-- Ant Script for controlling Tomcat-->
<property name="service.name" value="verifoo" />
<property name="root.location" value="${basedir}" />
<!-- <import file="tomcat-build.xml" /> -->
<target name="testWS" depends="deploy">
<junit printsummary="yes" haltonfailure="no" showoutput="true">
<!-- Project classpath, must include junit.jar -->
<classpath location="lib/junit/junit.jar" />
<classpath location="lib/junit/concurrent-junit-1.0.0.jar" />
<classpath location="lib/junit/org.hamcrest.core_1.3.0.v201303031735.jar" />
<classpath location="lib/com.microsoft.z3.jar" />
<classpath location="lib/lib4j/log4j-api-2.9.1.jar" />
<classpath location="lib/lib4j/log4j-core-2.9.1.jar" />
<classpath>
<fileset dir="${lib.dir}">
<include name="**/*.jar" />
</fileset>
</classpath>
<!-- test class -->
<sysproperty key="it.polito.rest.test.URL" value="${URL}" />
<classpath location="${build.dir}" />
<test name="it.polito.verifoo.rest.test.TestRestConcurrency" haltonfailure="no" todir="${report.dir}">
<formatter type="plain" />
<formatter type="xml" />
</test>
<test name="it.polito.verifoo.rest.test.TestRestConverter" haltonfailure="no" todir="${report.dir}">
<formatter type="plain" />
<formatter type="xml" />
</test>
<test name="it.polito.verifoo.rest.test.TestRestDeployment" haltonfailure="no" todir="${report.dir}">
<formatter type="plain" />
<formatter type="xml" />
</test>
<test name="it.polito.verifoo.rest.test.TestRestLog" haltonfailure="no" todir="${report.dir}">
<formatter type="plain" />
<formatter type="xml" />
</test>
<test name="it.polito.verifoo.rest.test.TestRestClient" haltonfailure="no" todir="${report.dir}">
<formatter type="plain" />
<formatter type="xml" />
</test>
</junit>
<fail if="test_failed" message="*** Some Tests FAILED ***" />
<echo>*** All Tests PASSED ***</echo>
<antcall target="stop-tomcat" />
</target>
<target name="testWS_j2ee" depends="deploy_j2ee">
<junit printsummary="yes" haltonfailure="no" showoutput="true">
<!-- Project classpath, must include junit.jar -->
<classpath location="lib/junit/junit.jar" />
<classpath location="lib/junit/concurrent-junit-1.0.0.jar" />
<classpath location="lib/junit/org.hamcrest.core_1.3.0.v201303031735.jar" />
<classpath location="lib/com.microsoft.z3.jar" />
<classpath location="lib/lib4j/log4j-api-2.9.1.jar" />
<classpath location="lib/lib4j/log4j-core-2.9.1.jar" />
<classpath>
<fileset dir="${lib.dir}">
<include name="**/*.jar" />
</fileset>
</classpath>
<!-- test class -->
<sysproperty key="it.polito.rest.test.URL" value="${URL_j2ee}" />
<classpath location="${build.dir}" />
<test name="it.polito.verifoo.rest.test.TestRestConcurrency" haltonfailure="no" todir="${report.dir}">
<formatter type="plain" />
<formatter type="xml" />
</test>
<test name="it.polito.verifoo.rest.test.TestRestConverter" haltonfailure="no" todir="${report.dir}">
<formatter type="plain" />
<formatter type="xml" />
</test>
<test name="it.polito.verifoo.rest.test.TestRestDeployment" haltonfailure="no" todir="${report.dir}">
<formatter type="plain" />
<formatter type="xml" />
</test>
<test name="it.polito.verifoo.rest.test.TestRestLog" haltonfailure="no" todir="${report.dir}">
<formatter type="plain" />
<formatter type="xml" />
</test>
<test name="it.polito.verifoo.rest.test.TestRestClient" haltonfailure="no" todir="${report.dir}">
<formatter type="plain" />
<formatter type="xml" />
</test>
</junit>
<fail if="test_failed" message="*** Some Tests FAILED ***" />
<echo>*** All Tests PASSED ***</echo>
<antcall target="stop-tomcat" />
</target>
<target name="clean" description="clean up">
<!-- Delete the ${build} and ${dist} directories -->
<delete dir="${build.dir}" />
<delete dir="${dist.dir}" />
<delete>
<fileset dir="${report.dir}" includes="**/*.txt,**/*.xml" />
</delete>
<delete file="${target.dir}/verifoo.war" />
</target>
<!-- Target for executing the main with some defined properties -->
<target name="main" description="Run main">
<java classname="it.polito.verifoo.rest.main.Main" failonerror="true" fork="yes">
<sysproperty key="it.polito.verifoo.rest.neo4j.neo4jURL" value="${neo4jURL}" />
<sysproperty key="it.polito.verifoo.rest.neo4j.neo4jUsername" value="${neo4jUsername}" />
<sysproperty key="it.polito.verifoo.rest.neo4j.neo4jPassword" value="${neo4jPassword}" />
<classpath>
<pathelement path="${build.dir}" />
<pathelement path="lib/lib4j/*" />
<pathelement path="lib/neo4j/*" />
<pathelement path="lib/*" />
</classpath>
</java>
</target>
</project>