-
Notifications
You must be signed in to change notification settings - Fork 12
/
build.xml
391 lines (346 loc) · 16.9 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
<project name="semanticpublishingbenchmark" basedir="." default="show-usage">
<property name="version.number.major" value="2" />
<property name="version.number.minor" value="0" />
<property name="version.number.patch" value="1" />
<property name="dir.src" location="src"/>
<property name="dir.bin" location="bin"/>
<property name="dir.dist" location="dist"/>
<property name="dir.data" location="data"/>
<property name="dir.datasets.and.queries" location="datasets_and_queries"/>
<property name="dir.lib" location="lib/"/>
<property name="dir.lib.jfreechart" location="${dir.lib}/jFreeChart"/>
<property name="jar.file.name" value="semantic_publishing_benchmark"/>
<property name="jar.charttool.file.name" value="semantic_publishing_benchmark_chart_tool"/>
<property name="ref.knowledge.and.queries.archive.name" value="${jar.file.name}_reference_knowledge_data"/>
<property name="validation.data.archive.name" value="validation_data"/>
<property name="validation.data.info.archive.name" value="validation_data_info"/>
<path id="classpath-lib">
<fileset dir="${dir.lib}">
<include name="*.jar"/>
</fileset>
</path>
<path id="classpath-jfreechart-lib">
<fileset dir="${dir.lib.jfreechart}">
<include name="*.jar"/>
</fileset>
</path>
<target name="clean">
<delete dir="${dir.bin}" />
<delete dir="${dir.dist}" />
</target>
<target name="compile" depends="clean">
<mkdir dir="${dir.bin}"/>
<mkdir dir="${dir.dist}"/>
<javac srcdir="${dir.src}"
destdir="${dir.bin}"
debug="off"
source="1.6"
target="1.6"
includeantruntime="false">
<classpath refid="classpath-lib"/>
<classpath refid="classpath-jfreechart-lib"/>
</javac>
</target>
<target name="rebuild" depends="clean, compile">
</target>
<target name="clear-conformance-queries">
<delete>
<fileset dir="./data/sparql/conformance/cardinalities/" includes="*.txt"/>
<fileset dir="./data/sparql/conformance/disjointness/" includes="*.txt"/>
<fileset dir="./data/sparql/conformance/inverseOf/" includes="*.txt"/>
<fileset dir="./data/sparql/conformance/keys/" includes="*.txt"/>
<fileset dir="./data/sparql/conformance/oneOf/" includes="*.txt"/>
<fileset dir="./data/sparql/conformance/pchain/" includes="*.txt"/>
<fileset dir="./data/sparql/conformance/property-constraints/" includes="*.txt"/>
<fileset dir="./data/sparql/conformance/rng-dom/" includes="*.txt"/>
<fileset dir="./data/sparql/conformance/same-as/" includes="*.txt"/>
<fileset dir="./data/sparql/conformance/subsumption/" includes="*.txt"/>
<fileset dir="./data/sparql/conformance/uni-int/" includes="*.txt"/>
</delete>
</target>
<target name="unzip-conformance-queries">
<unzip src="./data/sparql/conformance/cardinalities/${conformance_archive_name}.zip" dest="./data/sparql/conformance/cardinalities/"/>
<unzip src="./data/sparql/conformance/disjointness/${conformance_archive_name}.zip" dest="./data/sparql/conformance/disjointness/"/>
<unzip src="./data/sparql/conformance/inverseOf/${conformance_archive_name}.zip" dest="./data/sparql/conformance/inverseOf/"/>
<unzip src="./data/sparql/conformance/keys/${conformance_archive_name}.zip" dest="./data/sparql/conformance/keys/"/>
<unzip src="./data/sparql/conformance/oneOf/${conformance_archive_name}.zip" dest="./data/sparql/conformance/oneOf/"/>
<unzip src="./data/sparql/conformance/pchain/${conformance_archive_name}.zip" dest="./data/sparql/conformance/pchain/"/>
<unzip src="./data/sparql/conformance/property-constraints/${conformance_archive_name}.zip" dest="./data/sparql/conformance/property-constraints/"/>
<unzip src="./data/sparql/conformance/rng-dom/${conformance_archive_name}.zip" dest="./data/sparql/conformance/rng-dom/"/>
<unzip src="./data/sparql/conformance/same-as/${conformance_archive_name}.zip" dest="./data/sparql/conformance/same-as/"/>
<unzip src="./data/sparql/conformance/subsumption/${conformance_archive_name}.zip" dest="./data/sparql/conformance/subsumption/"/>
<unzip src="./data/sparql/conformance/uni-int/${conformance_archive_name}.zip" dest="./data/sparql/conformance/uni-int/"/>
</target>
<target name="setup-querymix">
<delete file="${dir.src}/eu/ldbc/semanticpublishing/agents/AggregationAgent.java"/>
<copy file="${dir.src}/eu/ldbc/semanticpublishing/agents/AggregationAgent.${querymix}" tofile="${dir.src}/eu/ldbc/semanticpublishing/agents/AggregationAgent.java"/>
<delete file="${dir.src}/eu/ldbc/semanticpublishing/statistics/Statistics.java"/>
<copy file="${dir.src}/eu/ldbc/semanticpublishing/statistics/Statistics.${querymix}" tofile="${dir.src}/eu/ldbc/semanticpublishing/statistics/Statistics.java"/>
<delete dir="${dir.data}"/>
<mkdir dir="./data-temp"/>
<copy file="datasets_and_queries/RdfsRules-optimized-spb.pie" todir="./data-temp"/>
<mkdir dir="./data-temp/datasets"/>
<copy todir="./data-temp/datasets">
<fileset dir="datasets_and_queries/datasets"/>
</copy>
<mkdir dir="./data-temp/ontologies"/>
<copy todir="./data-temp/ontologies">
<fileset dir="datasets_and_queries/ontologies"/>
</copy>
<mkdir dir="./data-temp/sparql"/>
<copy todir="./data-temp/sparql">
<fileset dir="datasets_and_queries/sparql/${querymix}"/>
</copy>
<mkdir dir="./data-temp/validation"/>
<copy todir="./data-temp/validation">
<fileset dir="datasets_and_queries/validation/${querymix}/${customization}"/>
</copy>
<unzip src="./datasets_and_queries/validation/data/${validation.data.archive.name}.zip" dest="./data-temp/validation/"/>
<unzip src="./datasets_and_queries/validation/data/${validation.data.info.archive.name}.zip" dest="./data-temp/validation/"/>
<mkdir dir="./data-temp/scripts/enterprise"/>
<copy todir="./data-temp/scripts/enterprise">
<fileset dir="datasets_and_queries/scripts/enterprise"/>
</copy>
<mkdir dir="./data-temp/scripts/postLoad"/>
<copy todir="./data-temp/scripts/postLoad">
<fileset dir="datasets_and_queries/scripts/postLoad" includes="${customization}*.* *.txt"/>
</copy>
<mkdir dir="./data-temp/dictionaries"/>
<copy file="datasets_and_queries/dictionaries/WordsDictionary.txt" todir="./data-temp/dictionaries"/>
<delete dir="./data-temp/sparql/aggregation"/>
<mkdir dir="./data-temp/sparql/aggregation"/>
<copy todir="./data-temp/sparql/aggregation">
<fileset dir="./data-temp/sparql/aggregation_${customization}"/>
</copy>
<delete dir="./data-temp/sparql/system"/>
<mkdir dir="./data-temp/sparql/system"/>
<copy todir="./data-temp/sparql/system">
<fileset dir="./data-temp/sparql/system_${customization}"/>
</copy>
<delete dir="./data-temp/sparql/validation"/>
<mkdir dir="./data-temp/sparql/validation"/>
<copy todir="./data-temp/sparql/validation">
<fileset dir="./data-temp/sparql/validation_${customization}"/>
</copy>
<!-- Clean all combinations -->
<delete dir="./data-temp/sparql/aggregation_standard"/>
<delete dir="./data-temp/sparql/aggregation_graphdb"/>
<delete dir="./data-temp/sparql/aggregation_virtuoso"/>
<delete dir="./data-temp/sparql/system_standard"/>
<delete dir="./data-temp/sparql/system_graphdb"/>
<delete dir="./data-temp/sparql/system_virtuoso"/>
<delete dir="./data-temp/sparql/validation_standard"/>
<delete dir="./data-temp/sparql/validation_graphdb"/>
<delete dir="./data-temp/sparql/validation_virtuoso"/>
<move file="./data-temp" toFile="./data"/>
<delete dir="./data-temp"/>
<delete>
<fileset dir="./src/eu/ldbc/semanticpublishing/templates/aggregation" includes="*.java"/>
</delete>
<unzip src="./src/eu/ldbc/semanticpublishing/templates/aggregation/${querymix}.zip" dest="./src/eu/ldbc/semanticpublishing/templates/aggregation/" />
<move toDir="${dir.src}/eu/ldbc/semanticpublishing/templates/aggregation/" includeemptydirs="false">
<fileset dir="${dir.src}/eu/ldbc/semanticpublishing/templates/aggregation/"/>
<mapper type="glob" from="Query*Template.${customization}" to="Query*Template.java"/>
</move>
<delete>
<fileset dir="./src/eu/ldbc/semanticpublishing/templates/aggregation" excludes="*.java, *.zip, *.txt"/>
</delete>
<antcall target="clear-conformance-queries"/>
<antcall target="unzip-conformance-queries">
<param name="conformance_archive_name" value="${customization}"/>
</antcall>
<delete file="./definitions.properties"/>
<copy file="datasets_and_queries/definitions.properties-${querymix}" tofile="./definitions.properties"/>
</target>
<target name="copy-config-files-to-dist" >
<copy todir="${dir.dist}">
<fileset file="readme.txt" />
<fileset file="test.properties" />
<fileset file="definitions.properties" />
</copy>
</target>
<target name="build-charttool-jar">
<jar destfile="${dir.dist}\${jar.charttool.file.name}.jar" basedir="${dir.bin}" duplicate="preserve">
<manifest>
<attribute name="Main-Class" value="eu.ldbc.semanticpublishing.tools.PerformanceChartTool"/>
<attribute name="Benchmark-Release-Version" value="${version.number.major}.${version.number.minor}.${version.number.patch}.${revision.number}"/>
</manifest>
<zipgroupfileset dir="${dir.lib.jfreechart}" includes="*.jar"/>
</jar>
</target>
<target name="build-jar">
<jar destfile="${dir.dist}\${jar.file.name}-${querymix}-${customization}.jar" basedir="${dir.bin}" duplicate="preserve">
<manifest>
<attribute name="Main-Class" value="eu.ldbc.semanticpublishing.TestDriver"/>
<attribute name="Benchmark-Release-Version" value="${version.number.major}.${version.number.minor}.${version.number.patch}.${revision.number}"/>
<attribute name="Benchmark-Release-Type" value="${querymix} qierymix, ${customization}"/>
</manifest>
<zipgroupfileset dir="${dir.lib}" includes="*.jar"/>
<fileset file="readme.txt" />
<fileset file="test.properties" />
<fileset file="definitions.properties" />
<fileset file="log4j.xml" />
</jar>
<antcall target="copy-config-files-to-dist"/>
<antcall target="unzip-all-compressed-datasets"/>
<antcall target="move-reference-knowledge-and-queries"/>
<delete dir="./data"/>
<delete file="./definitions.properties" />
</target>
<target name="build-basic-querymix" depends="build.release.version">
<antcall target="setup-querymix">
<param name="querymix" value="basic"/>
<param name="customization" value="standard"/>
</antcall>
<antcall target="rebuild"/>
<antcall target="build-jar">
<param name="querymix" value="basic"/>
<param name="customization" value="standard"/>
</antcall>
<antcall target="build-charttool-jar"/>
</target>
<target name="build-basic-querymix-graphdb" depends="build.release.version">
<antcall target="setup-querymix">
<param name="querymix" value="basic"/>
<param name="customization" value="graphdb"/>
</antcall>
<antcall target="rebuild"/>
<antcall target="build-jar">
<param name="querymix" value="basic"/>
<param name="customization" value="graphdb"/>
</antcall>
<antcall target="build-charttool-jar"/>
</target>
<target name="build-basic-querymix-virtuoso" depends="build.release.version">
<antcall target="setup-querymix">
<param name="querymix" value="basic"/>
<param name="customization" value="virtuoso"/>
</antcall>
<antcall target="rebuild"/>
<antcall target="build-jar">
<param name="querymix" value="basic"/>
<param name="customization" value="virtuoso"/>
</antcall>
<antcall target="build-charttool-jar"/>
</target>
<target name="build-advanced-querymix" depends="build.release.version">
<antcall target="setup-querymix">
<param name="querymix" value="advanced"/>
<param name="customization" value="standard"/>
</antcall>
<antcall target="rebuild"/>
<antcall target="build-jar">
<param name="querymix" value="advanced"/>
<param name="customization" value="standard"/>
</antcall>
<antcall target="build-charttool-jar"/>
</target>
<target name="build-advanced-querymix-graphdb" depends="build.release.version">
<antcall target="setup-querymix">
<param name="querymix" value="advanced"/>
<param name="customization" value="graphdb"/>
</antcall>
<antcall target="rebuild"/>
<antcall target="build-jar">
<param name="querymix" value="advanced"/>
<param name="customization" value="graphdb"/>
</antcall>
<antcall target="build-charttool-jar"/>
</target>
<target name="build-advanced-querymix-virtuoso" depends="build.release.version">
<antcall target="setup-querymix">
<param name="querymix" value="advanced"/>
<param name="customization" value="virtuoso"/>
</antcall>
<antcall target="rebuild"/>
<antcall target="build-jar">
<param name="querymix" value="advanced"/>
<param name="customization" value="virtuoso"/>
</antcall>
<antcall target="build-charttool-jar"/>
</target>
<!-- Zip reference knowledge (ontologies and reference datasets) -->
<target name="zip-reference-knowledge-and-queries">
<zip destfile="${dir.dist}/${ref.knowledge.and.queries.archive.name}-${querymix}.zip">
<zipfileset dir="." includes="data/**" excludes="data/datasets/*.zip"/>
</zip>
</target>
<!-- Move reference knowledge (ontologies and reference datasets) to the distribution folder -->
<target name="move-reference-knowledge-and-queries">
<move todir="${dir.dist}/data">
<fileset dir="data/">
<exclude name="data/datasets/*.zip"/>
</fileset>
</move>
</target>
<!-- UnZip all compressed datasets -->
<target name="unzip-all-compressed-datasets">
<unzip dest="${dir.data}/datasets">
<fileset dir="${dir.data}/datasets">
<include name="**/*.zip"/>
</fileset>
</unzip>
<delete>
<fileset dir="${dir.data}/datasets" includes="*.zip"/>
</delete>
</target>
<!-- SVN -->
<!-- This target requires that an svn client is installed -->
<!--
<target name="build.release.version">
<exec executable="svn" outputproperty="revision.number">
<arg line="info"/>
<redirector>
<outputfilterchain>
<linecontainsregexp>
<regexp pattern='^Revision' />
</linecontainsregexp>
<tokenfilter>
<replaceregex pattern='[\D]+([\d]+)' replace="\1" />
</tokenfilter>
</outputfilterchain>
</redirector>
</exec>
<echo>Benchmark Release Version : ${version.number.major}.${version.number.minor}.${revision.number}</echo>
</target>
-->
<!-- Git -->
<available file=".git" type="dir" property="git.present"/>
<target name="build.release.version" description="Store git revision in ${revision.number}" if="git.present">
<exec executable="git" outputproperty="git.revision" failifexecutionfails="false" errorproperty="">
<arg value="describe"/>
<arg value="--tags"/>
<arg value="--always"/>
<arg value="HEAD"/>
</exec>
<condition property="revision.number" value="${git.revision}" else="unknown">
<and>
<isset property="git.revision"/>
<length string="${git.revision}" trim="yes" length="0" when="greater"/>
</and>
</condition>
<echo>Benchmark Release Version : ${version.number.major}.${version.number.minor}.${version.number.patch}.${revision.number}</echo>
</target>
<target name="deploy">
<move todir="${dir.deploy}">
<fileset dir="${dir.dist}" includes="*.jar"/>
<fileset dir="${dir.dist}" includes="*.zip"/>
</move>
</target>
<target name="show-usage">
<echo>
-------------------------------------------------------------------------------------------------------------------------------------
To build the LDBC Semantic Publishing Benchmark, execute :
SPARQL compliant version:
ant build-basic-querymix - builds the benchmark driver with basic query mix, standard SPARQL 1.1 compliance
ant build-advanced-querymix - builds the benchmark driver with advanced query mix, standard SPARQL 1.1 compliance
GraphDB:
ant build-basic-querymix-graphdb - builds the benchmark driver with basic query mix and queries optimized for GraphDB
ant build-advanced-querymix-graphdb - builds the benchmark driver with advanced query mix and queries optimized for GraphDB
Virtuoso:
ant build-basic-querymix-virtuoso - builds the benchmark driver with basic query mix and queries optimized for Virtuoso
ant build-advanced-querymix-virtuoso - builds the benchmark driver with advanced query mix and queries optimized for Virtuoso
-------------------------------------------------------------------------------------------------------------------------------------
</echo>
</target>
</project>