-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
369 lines (333 loc) · 13.8 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
<?xml version="1.0" standalone="yes"?>
<project name="verifuse" basedir="." default="run">
<!-- set global properties -->
<property name="root.location" location="." />
<property name="build.dir" location="${root.location}/build"/>
<property name="lib.dir" location="${root.location}/lib" />
<property name="report.dir" location="log" />
<property name="schema.dir" location="${root.location}/xsd"/>
<property name="src.dir" location="${root.location}/src"/>
<property name="test.dir" location="${root.location}/test"/>
<property name="gen-src.dir" location="${root.location}/gen-src"/>
<property name="outputChain.dir" location="${root.location}/outputChain"/>
<property name="outputXjc.dir" location="${root.location}/outXjc"/>
<property name="xml.dir" location="${root.location}/xmlInputFile"/>
<property name="schema.actions" value="Actions.xsd"/>
<property name="schema.fields" value="Fields.xsd"/>
<property name="schema.actionsmanifest" value="ActionsManifest.xsd"/>
<property name="schema.fieldsmanifest" value="FieldsManifest.xsd"/>
<property name="schema.manifestvnfs" value="ManifestVNFs.xsd"/>
<property name="schema.requirementslist" value="RequirementsList.xsd"/>
<property name="schema.node" value="node.xsd"/>
<property name="schema.chainfunctionality" value="ChainFunctionality.xsd"/>
<property name="schema.tools" value="tools.xsd"/>
<property name="schema.filesupport" value="fileSupport.xsd"/>
<property name="pckg.jaxb" value="it.polito.verifuse.jaxb"/>
<property name="pckg.actions" value="${pckg.jaxb}.actions"/>
<property name="pckg.fields" value="${pckg.jaxb}.fields"/>
<property name="pckg.actionsmanifest" value="${pckg.jaxb}.actionsmanifest"/>
<property name="pckg.fieldsmanifest" value="${pckg.jaxb}.fieldsmanifest"/>
<property name="pckg.manifestvnfs" value="${pckg.jaxb}.manifestvnfs"/>
<property name="pckg.requirementslist" value="${pckg.jaxb}.requirementslist"/>
<property name="pckg.node" value="${pckg.jaxb}.node"/>
<property name="pckg.chainfunctionality" value="${pckg.jaxb}.chainfunctionality"/>
<property name="pckg.tools" value="${pckg.jaxb}.tools"/>
<property name="pckg.filesupport" value="${pckg.jaxb}.filesupport"/>
<property name="pckg.jaxb.location" value="it/polito/verifuse/jaxb"/>
<property name="pckg.location.actions" value="${pckg.jaxb.location}/actions"/>
<property name="pckg.location.fields" value="${pckg.jaxb.location}/fields"/>
<property name="pckg.location.actionsmanifest" value="${pckg.jaxb.location}/actionsmanifest"/>
<property name="pckg.location.fieldsmanifest" value="${pckg.jaxb.location}/fieldsmanifest"/>
<property name="pckg.location.manifestvnfs" value="${pckg.jaxb.location}/manifestvnfs"/>
<property name="pckg.location.requirementslist" value="${pckg.jaxb.location}/requirementslist"/>
<property name="pckg.location.node" value="${pckg.jaxb.location}/node"/>
<property name="pckg.location.chainfunctionality" value="${pckg.jaxb.location}/chainfunctionality"/>
<property name="pckg.location.tools" value="${pckg.jaxb.location}/tools"/>
<property name="pckg.location.filesupport" value="${pckg.jaxb.location}/filesupport"/>
<property name="debug" value="off"/>
<property name="debuglevel" value="lines,vars,source"/>
<import file="neo4j-build.xml"/>
<path id="classpath">
<pathelement path="${src.dir}" />
<pathelement path="${gen-src.dir}" />
<pathelement path="${build.dir}" />
<pathelement path="${build.dir}/test-classes" />
<pathelement path="${schema.dir}" />
<pathelement path="${test.dir}" />
<fileset dir="${lib.dir}">
<include name="*.jar"/>
</fileset>
<fileset dir="${lib.dir}/junit">
<include name="*.jar"/>
</fileset>
</path>
<!-- Target generate-bindings -->
<target name="generate-bindings" description="Generate bindings">
<mkdir dir="${gen-src.dir}" />
<mkdir dir="${outputChain.dir}"/>
<mkdir dir="${outputXjc.dir}"/>
<!-- SERVER -->
<echo message="Compiling the schema Actions.xsd..." />
<exec executable="xjc" failonerror="true" output="${outputXjc.dir}/xjcActions_log.txt">
<arg value="-d" />
<arg value="${gen-src.dir}" />
<arg value="-p" />
<arg value="${pckg.actions}"/>
<arg value="${schema.dir}/${schema.actions}"/>
</exec>
<echo message="Compiling the schema Fields.xsd..." />
<exec executable="xjc" failonerror="true" output="${outputXjc.dir}/xjcFields_log.txt">
<arg value="-d" />
<arg value="${gen-src.dir}" />
<arg value="-p" />
<arg value="${pckg.fields}" />
<arg value="${schema.dir}/${schema.fields}" />
</exec>
<echo message="Compiling the schema ActionsManifest.xsd..." />
<exec executable="xjc" failonerror="true" output="${outputXjc.dir}/xjcActionsManifest_log.txt">
<arg value="-d" />
<arg value="${gen-src.dir}" />
<arg value="-p" />
<arg value="${pckg.actionsmanifest}" />
<arg value="${schema.dir}/${schema.actionsmanifest}" />
</exec>
<echo message="Compiling the schema FieldManifest.xsd..." />
<exec executable="xjc" failonerror="true" output="${outputXjc.dir}/xjcFieldsManifest_log.txt">
<arg value="-d" />
<arg value="${gen-src.dir}" />
<arg value="-p" />
<arg value="${pckg.fieldsmanifest}" />
<arg value="${schema.dir}/${schema.fieldsmanifest}" />
</exec>
<echo message="Compiling the schema RequirementsList.xsd..." />
<exec executable="xjc" failonerror="true" output="${outputXjc.dir}/xjcRequirementsList_log.txt">
<arg value="-d" />
<arg value="${gen-src.dir}" />
<arg value="-p" />
<arg value="${pckg.requirementslist}" />
<arg value="${schema.dir}/${schema.requirementslist}" />
</exec>
<echo message="Compiling the schema ManifestVNFs.xsd..." />
<exec executable="xjc" failonerror="true" output="${outputXjc.dir}/xjcManifestVNFs_log.txt">
<arg value="-d" />
<arg value="${gen-src.dir}" />
<arg value="-p" />
<arg value="${pckg.manifestvnfs}" />
<arg value="${schema.dir}/${schema.manifestvnfs}" />
</exec>
<echo message="Compiling the schema node.xsd..." />
<exec executable="xjc" failonerror="true" output="${outputXjc.dir}/xjcNode_log.txt">
<arg value="-d" />
<arg value="${gen-src.dir}" />
<arg value="-p" />
<arg value="${pckg.node}" />
<arg value="${schema.dir}/${schema.node}" />
</exec>
<echo message="Compiling the schema ChainFunctionality.xsd..." />
<exec executable="xjc" failonerror="true" output="${outputXjc.dir}/xjcChain_log.txt">
<arg value="-d" />
<arg value="${gen-src.dir}" />
<arg value="-p" />
<arg value="${pckg.chainfunctionality}" />
<arg value="${schema.dir}/${schema.chainfunctionality}" />
</exec>
<echo message="Compiling the schema Tools.xsd..." />
<exec executable="xjc" failonerror="true" output="${outputXjc.dir}/xjcTools_log.txt">
<arg value="-d" />
<arg value="${gen-src.dir}" />
<arg value="-p" />
<arg value="${pckg.tools}" />
<arg value="${schema.dir}/${schema.tools}" />
</exec>
<echo message="Compiling the schema fileSupport.xsd..." />
<exec executable="xjc" failonerror="true" output="${outputXjc.dir}/xjcfileSupport_log.txt">
<arg value="-d" />
<arg value="${gen-src.dir}" />
<arg value="-p" />
<arg value="${pckg.filesupport}" />
<arg value="${schema.dir}/${schema.filesupport}" />
</exec>
</target>
<!-- compile all the schema and Java source files -->
<target name="compile" depends="generate-bindings" description="Compile all Java source files">
<mkdir dir="${build.dir}" />
<!-- compile Java source files of the capabilities -->
<echo message="Compiling the java source files of Actions..." />
<javac
encoding="ISO-8859-1"
includeantruntime="false"
srcdir="${gen-src.dir}/${pckg.location.actions}"
destdir="${build.dir}"
debug="${debug}"
debuglevel="${debuglevel}">
<classpath refid="classpath"/>
</javac>
<echo message="Compiling the java source files of Fields..." />
<javac
encoding="ISO-8859-1"
includeantruntime="false"
srcdir="${gen-src.dir}/${pckg.location.fields}"
destdir="${build.dir}"
debug="${debug}"
debuglevel="${debuglevel}">
<classpath refid="classpath"/>
</javac>
<!-- compile Java source files -->
<echo message="Compiling the java source files of ActionsManifest..." />
<javac
encoding="ISO-8859-1"
includeantruntime="false"
srcdir="${gen-src.dir}/${pckg.location.actionsmanifest}"
destdir="${build.dir}"
debug="${debug}"
debuglevel="${debuglevel}">
<classpath refid="classpath"/>
</javac>
<!-- compile Java source files -->
<echo message="Compiling the java source files of FieldsManifest..." />
<javac
encoding="ISO-8859-1"
includeantruntime="false"
srcdir="${gen-src.dir}/${pckg.location.fieldsmanifest}"
destdir="${build.dir}"
debug="${debug}"
debuglevel="${debuglevel}">
<classpath refid="classpath"/>
</javac>
<!-- compile Java source files -->
<echo message="Compiling the java source files of RequirementsList..." />
<javac
encoding="ISO-8859-1"
includeantruntime="false"
srcdir="${gen-src.dir}/${pckg.location.requirementslist}"
destdir="${build.dir}"
debug="${debug}"
debuglevel="${debuglevel}">
<classpath refid="classpath"/>
</javac>
<!-- compile Java source files o -->
<echo message="Compiling the java source files of ManifetVNFs..." />
<javac
encoding="ISO-8859-1"
includeantruntime="false"
srcdir="${gen-src.dir}/${pckg.location.manifestvnfs}"
destdir="${build.dir}"
debug="${debug}"
debuglevel="${debuglevel}">
<classpath refid="classpath"/>
</javac>
<echo message="Compiling the java source files of Nodes..." />
<javac
encoding="ISO-8859-1"
includeantruntime="false"
srcdir="${gen-src.dir}/${pckg.location.node}"
destdir="${build.dir}"
debug="${debug}"
debuglevel="${debuglevel}">
<classpath refid="classpath"/>
</javac>
<echo message="Compiling the java source files of ChainFunctionality..." />
<javac
encoding="ISO-8859-1"
includeantruntime="false"
srcdir="${gen-src.dir}/${pckg.location.chainfunctionality}"
destdir="${build.dir}"
debug="${debug}"
debuglevel="${debuglevel}">
<classpath refid="classpath"/>
</javac>
<echo message="Compiling the java source files of Tools..." />
<javac
encoding="ISO-8859-1"
includeantruntime="false"
srcdir="${gen-src.dir}/${pckg.location.tools}"
destdir="${build.dir}"
debug="${debug}"
debuglevel="${debuglevel}">
<classpath refid="classpath"/>
</javac>
<echo message="Compiling the java source files of fileSupport..." />
<javac
encoding="ISO-8859-1"
includeantruntime="false"
srcdir="${gen-src.dir}/${pckg.location.filesupport}"
destdir="${build.dir}"
debug="${debug}"
debuglevel="${debuglevel}">
<classpath refid="classpath"/>
</javac>
<echo message="Compiling all the schema... DONE" />
<javac includeantruntime="false" destdir="${build.dir}" debug="on">
<src path="${src.dir}" />
<src path="${gen-src.dir}" />
<classpath refid="classpath" />
<compilerarg value="-Xlint"/>
</javac>
<echo message="DONE" />
</target>
<!-- run application -->
<target name="run" depends="compile" description="Run from the entry point">
<echo message="Running from the entry point..." />
<java classname="it.polito.verifuse.main.Main" fork="true">
<classpath refid="classpath" />
</java>
</target>
<target name="build-test" >
<mkdir dir="${build.dir}/test-classes"/>
<javac includeantruntime="false"
srcdir="${test.dir}/it/polito/verifuse/framework/test"
destdir="${build.dir}/test-classes">
<classpath refid="classpath"/>
</javac>
</target>
<!-- run test -->
<target name="testFramework" depends="build-test, clear-and-restart-neo4j">
<mkdir dir="${report.dir}" />
<junit printsummary="yes" haltonfailure="no" showoutput="false" fork="true">
<classpath refid="classpath"/>
<test name="it.polito.verifuse.framework.test.RDFTest"
haltonfailure="no" todir="${report.dir}">
<formatter type="plain" />
<formatter type="xml" />
</test>
<test name="it.polito.verifuse.framework.test.MainTest"
haltonfailure="no" todir="${report.dir}">
<formatter type="plain" />
<formatter type="xml" />
</test>
<test name="it.polito.verifuse.framework.test.LERTest"
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>
<!-- clean Project application -->
<target name="clean" description="Deletes all the generated artifacts.">
<delete dir="${gen-src.dir}" />
<delete dir="${build.dir}" />
<delete dir="${outputXjc.dir}" />
<delete dir="${outputChain.dir}" />
</target>
<!-- generate javadoc -->
<target name="javadoc" description="Generates javadoc" depends="compile">
<echo message="Generating javadoc..." />
<delete dir="docs/javadoc" />
<mkdir dir="docs/javadoc" />
<javadoc author="true"
windowtitle="VeriFUSE"
use="true"
classpathref="classpath"
destdir="docs/javadoc"
useexternalfile="yes"
additionalparam="-Xdoclint:none">
<sourcepath>
<path location="${src.dir}"/>
<path location="${gen-src.dir}"/>
<path location="${test.dir}"/>
</sourcepath>
</javadoc>
</target>
</project>