forked from stardog-union/pellet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-analysis.xml
374 lines (334 loc) · 15.3 KB
/
build-analysis.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
<?xml version="1.0"?>
<project name="PelletTestCoverage" default="coverage" basedir=".">
<import file="build.xml" optional="false" />
<!--
Cobertura for test coverage analysis
+ cobertura.libdir must be set to directory with all cobertura jars
-->
<property name="instrumented.class" location="instrumented" />
<property name="coverage.html.dir" location="coverage-report" />
<property name="cobertura.datafile" location="${basedir}/cobertura.ser" />
<property name="cobertura.libdir" location="/home/mstocker/javalib/cobertura-lib/"/>
<path id="cobertura.class.path">
<fileset dir="${cobertura.libdir}">
<include name="**/*.jar" />
</fileset>
</path>
<taskdef classpathref="cobertura.class.path" resource="tasks.properties" />
<target name="instrument" depends="compile">
<delete file="${cobertura.datafile}" />
<cobertura-instrument todir="${instrumented.class}">
<fileset dir="${build.cli.class.dir}">
<include name="**/*.class" />
</fileset>
<fileset dir="${build.dig.class.dir}">
<include name="**/*.class" />
</fileset>
<fileset dir="${build.explanation.class.dir}">
<include name="**/*.class" />
</fileset>
<fileset dir="${build.jena.class.dir}">
<include name="**/*.class" />
</fileset>
<fileset dir="${build.modularity.class.dir}">
<include name="**/*.class" />
</fileset>
<fileset dir="${build.owlapi.class.dir}">
<include name="**/*.class" />
</fileset>
<fileset dir="${build.pellint.class.dir}">
<include name="**/*.class" />
</fileset>
<fileset dir="${build.query.class.dir}">
<include name="**/*.class" />
</fileset>
<fileset dir="${build.root.class.dir}">
<include name="**/*.class" />
</fileset>
</cobertura-instrument>
</target>
<target name="coverage" depends="instrument">
<junit printsummary="true" haltonfailure="false" fork="yes" forkmode="perTest" maxmemory="1536m" dir="${basedir}">
<sysproperty key="net.sourceforge.cobertura.datafile" file="${cobertura.datafile}" />
<classpath location="${instrumented.class}" />
<classpath refid="project.class.path"/>
<classpath refid="cobertura.class.path"/>
<formatter type="plain" usefile="false"/>
<test name="${test.class.name}" />
<jvmarg value="-enableassertions" />
</junit>
<cobertura-report destdir="${coverage.html.dir}">
<fileset dir="${cli.src.dir}" defaultexcludes="yes">
<include name="**/*.java"/>
</fileset>
<fileset dir="${core.src.dir}" defaultexcludes="yes">
<include name="**/*.java"/>
</fileset>
<fileset dir="${datatypes.src.dir}" defaultexcludes="yes">
<include name="**/*.java"/>
</fileset>
<fileset dir="${dig.src.dir}" defaultexcludes="yes">
<include name="**/*.java"/>
</fileset>
<fileset dir="${el.src.dir}" defaultexcludes="yes">
<include name="**/*.java"/>
</fileset>
<fileset dir="${explanation.src.dir}" defaultexcludes="yes">
<include name="**/*.java"/>
</fileset>
<fileset dir="${jena.src.dir}" defaultexcludes="yes">
<include name="**/*.java"/>
</fileset>
<fileset dir="${modularity.src.dir}" defaultexcludes="yes">
<include name="**/*.java"/>
</fileset>
<fileset dir="${owlapi.src.dir}" defaultexcludes="yes">
<include name="**/*.java"/>
</fileset>
<fileset dir="${pellint.src.dir}" defaultexcludes="yes">
<include name="**/*.java"/>
</fileset>
<fileset dir="${query.src.dir}" defaultexcludes="yes">
<include name="**/*.java"/>
</fileset>
<fileset dir="${query.gensrc.root.dir}" defaultexcludes="yes">
<include name="**/*.java"/>
</fileset>
<fileset dir="${rules.src.dir}" defaultexcludes="yes">
<include name="**/*.java"/>
</fileset>
</cobertura-report>
</target>
<target name="clean-coverage">
<delete quiet="true" includeEmptyDirs="true">
<fileset dir="${instrumented.class}" />
<fileset dir="${coverage.html.dir}" />
</delete>
</target>
<!--
FindBugs for static analysis
+ findbugs.home must be set to unzipped distribution directory
-->
<property name="findbugs.dir" location="${basedir}/findbugs-report" />
<path id="findbugs.class.path">
<path refid="project.class.path" />
<fileset dir="${findbugs.home}/lib">
<include name="*.jar" />
</fileset>
</path>
<taskdef classpathref="findbugs.class.path" name="findbugs" classname="edu.umd.cs.findbugs.anttask.FindBugsTask" />
<target name="fb-mkoutput">
<mkdir dir="${findbugs.dir}" />
</target>
<target name="findbugs" depends="dist">
<findbugs home="${findbugs.home}" effort="max" output="text" jvmargs="-Xmx1024m">
<class location="${pellet.cli.jar}" />
<sourcepath location="${cli.src.dir}" />
<auxClasspath refid="findbugs.class.path" />
</findbugs>
<findbugs home="${findbugs.home}" effort="max" output="text" jvmargs="-Xmx1024m">
<class location="${pellet.core.jar}" />
<sourcepath location="${core.src.dir}" />
<auxClasspath refid="findbugs.class.path" />
</findbugs>
<findbugs home="${findbugs.home}" effort="max" output="text" jvmargs="-Xmx1024m">
<class location="${pellet.datatypes.jar}" />
<sourcepath location="${datatypes.src.dir}" />
<auxClasspath refid="findbugs.class.path" />
</findbugs>
<findbugs home="${findbugs.home}" effort="max" output="text" jvmargs="-Xmx1024m">
<class location="${pellet.dig.jar}" />
<sourcepath location="${dig.src.dir}" />
<auxClasspath refid="findbugs.class.path" />
</findbugs>
<findbugs home="${findbugs.home}" effort="max" output="text" jvmargs="-Xmx1024m">
<class location="${pellet.el.jar}" />
<sourcepath location="${dig.el.dir}" />
<auxClasspath refid="findbugs.class.path" />
</findbugs>
<findbugs home="${findbugs.home}" effort="max" output="text" jvmargs="-Xmx1024m">
<class location="${pellet.explanation.jar}" />
<sourcepath location="${explanation.src.dir}" />
<auxClasspath refid="findbugs.class.path" />
</findbugs>
<findbugs home="${findbugs.home}" effort="max" output="text" jvmargs="-Xmx1024m">
<class location="${pellet.jena.jar}" />
<sourcepath location="${jena.src.dir}" />
<auxClasspath refid="findbugs.class.path" />
</findbugs>
<findbugs home="${findbugs.home}" effort="max" output="text" jvmargs="-Xmx1024m">
<class location="${pellet.modularity.jar}" />
<sourcepath location="${modularity.src.dir}" />
<auxClasspath refid="findbugs.class.path" />
</findbugs>
<findbugs home="${findbugs.home}" effort="max" output="text" jvmargs="-Xmx1024m">
<class location="${pellet.owlapi.jar}" />
<sourcepath location="${owlapi.src.dir}" />
<auxClasspath refid="findbugs.class.path" />
</findbugs>
<findbugs home="${findbugs.home}" effort="max" output="text" jvmargs="-Xmx1024m">
<class location="${pellet.pellint.jar}" />
<sourcepath location="${pellint.src.dir}" />
<auxClasspath refid="findbugs.class.path" />
</findbugs>
<findbugs home="${findbugs.home}" effort="max" output="text" jvmargs="-Xmx1024m">
<class location="${pellet.query.jar}" />
<sourcepath location="${query.src.dir}" />
<auxClasspath refid="findbugs.class.path" />
</findbugs>
<findbugs home="${findbugs.home}" effort="max" output="text" jvmargs="-Xmx1024m">
<class location="${pellet.rules.jar}" />
<sourcepath location="${rules.src.dir}" />
<auxClasspath refid="findbugs.class.path" />
</findbugs>
</target>
<target name="findbugs-html" depends="dist,fb-mkoutput">
<findbugs home="${findbugs.home}" effort="max" output="html" outputFile="${findbugs.dir}/output-cli.html" jvmargs="-Xmx1024m">
<class location="${pellet.cli.jar}" />
<sourcepath location="${cli.src.dir}" />
<auxClasspath refid="findbugs.class.path" />
</findbugs>
<findbugs home="${findbugs.home}" effort="max" output="html" outputFile="${findbugs.dir}/output-core.html" jvmargs="-Xmx1024m">
<class location="${pellet.core.jar}" />
<sourcepath location="${core.src.dir}" />
<auxClasspath refid="findbugs.class.path" />
</findbugs>
<findbugs home="${findbugs.home}" effort="max" output="html" outputFile="${findbugs.dir}/output-datatypes.html" jvmargs="-Xmx1024m">
<class location="${pellet.datatypes.jar}" />
<sourcepath location="${datatypes.src.dir}" />
<auxClasspath refid="findbugs.class.path" />
</findbugs>
<findbugs home="${findbugs.home}" effort="max" output="html" outputFile="${findbugs.dir}/output-dig.html" jvmargs="-Xmx1024m">
<class location="${pellet.dig.jar}" />
<sourcepath location="${dig.src.dir}" />
<auxClasspath refid="findbugs.class.path" />
</findbugs>
<findbugs home="${findbugs.home}" effort="max" output="html" outputFile="${findbugs.dir}/output-el.html" jvmargs="-Xmx1024m">
<class location="${pellet.el.jar}" />
<sourcepath location="${dig.el.dir}" />
<auxClasspath refid="findbugs.class.path" />
</findbugs>
<findbugs home="${findbugs.home}" effort="max" output="html" outputFile="${findbugs.dir}/output-explanation.html" jvmargs="-Xmx1024m">
<class location="${pellet.explanation.jar}" />
<sourcepath location="${explanation.src.dir}" />
<auxClasspath refid="findbugs.class.path" />
</findbugs>
<findbugs home="${findbugs.home}" effort="max" output="html" outputFile="${findbugs.dir}/output-jena.html" jvmargs="-Xmx1024m">
<class location="${pellet.jena.jar}" />
<sourcepath location="${jena.src.dir}" />
<auxClasspath refid="findbugs.class.path" />
</findbugs>
<findbugs home="${findbugs.home}" effort="max" output="html" outputFile="${findbugs.dir}/output-modularity.html" jvmargs="-Xmx1024m">
<class location="${pellet.modularity.jar}" />
<sourcepath location="${modularity.src.dir}" />
<auxClasspath refid="findbugs.class.path" />
</findbugs>
<findbugs home="${findbugs.home}" effort="max" output="html" outputFile="${findbugs.dir}/output-owlapi.html" jvmargs="-Xmx1024m">
<class location="${pellet.owlapi.jar}" />
<sourcepath location="${owlapi.src.dir}" />
<auxClasspath refid="findbugs.class.path" />
</findbugs>
<findbugs home="${findbugs.home}" effort="max" output="html" outputFile="${findbugs.dir}/output-pellint.html" jvmargs="-Xmx1024m">
<class location="${pellet.pellint.jar}" />
<sourcepath location="${pellint.src.dir}" />
<auxClasspath refid="findbugs.class.path" />
</findbugs>
<findbugs home="${findbugs.home}" effort="max" output="html" outputFile="${findbugs.dir}/output-query.html" jvmargs="-Xmx1024m">
<class location="${pellet.query.jar}" />
<sourcepath location="${query.src.dir}" />
<auxClasspath refid="findbugs.class.path" />
</findbugs>
<findbugs home="${findbugs.home}" effort="max" output="html" outputFile="${findbugs.dir}/output-rules.html" jvmargs="-Xmx1024m">
<class location="${pellet.rules.jar}" />
<sourcepath location="${rules.src.dir}" />
<auxClasspath refid="findbugs.class.path" />
</findbugs>
</target>
<target name="findbugs-xml" depends="dist,fb-mkoutput">
<findbugs home="${findbugs.home}" effort="max" output="xml:withMessages" outputFile="${findbugs.dir}/output-cli.xml" jvmargs="-Xmx1024m">
<class location="${pellet.cli.jar}" />
<sourcepath location="${cli.src.dir}" />
<auxClasspath refid="findbugs.class.path" />
</findbugs>
<findbugs home="${findbugs.home}" effort="max" output="xml:withMessages" outputFile="${findbugs.dir}/output-core.xml" jvmargs="-Xmx1024m">
<class location="${pellet.core.jar}" />
<sourcepath location="${core.src.dir}" />
<auxClasspath refid="findbugs.class.path" />
</findbugs>
<findbugs home="${findbugs.home}" effort="max" output="xml:withMessages" outputFile="${findbugs.dir}/output-datatypes.xml" jvmargs="-Xmx1024m">
<class location="${pellet.datatypes.jar}" />
<sourcepath location="${datatypes.src.dir}" />
<auxClasspath refid="findbugs.class.path" />
</findbugs>
<findbugs home="${findbugs.home}" effort="max" output="xml:withMessages" outputFile="${findbugs.dir}/output-dig.xml" jvmargs="-Xmx1024m">
<class location="${pellet.dig.jar}" />
<sourcepath location="${dig.src.dir}" />
<auxClasspath refid="findbugs.class.path" />
</findbugs>
<findbugs home="${findbugs.home}" effort="max" output="xml:withMessages" outputFile="${findbugs.dir}/output-el.xml" jvmargs="-Xmx1024m">
<class location="${pellet.el.jar}" />
<sourcepath location="${dig.el.dir}" />
<auxClasspath refid="findbugs.class.path" />
</findbugs>
<findbugs home="${findbugs.home}" effort="max" output="xml:withMessages" outputFile="${findbugs.dir}/output-explanation.xml" jvmargs="-Xmx1024m">
<class location="${pellet.explanation.jar}" />
<sourcepath location="${explanation.src.dir}" />
<auxClasspath refid="findbugs.class.path" />
</findbugs>
<findbugs home="${findbugs.home}" effort="max" output="xml:withMessages" outputFile="${findbugs.dir}/output-jena.xml" jvmargs="-Xmx1024m">
<class location="${pellet.jena.jar}" />
<sourcepath location="${jena.src.dir}" />
<auxClasspath refid="findbugs.class.path" />
</findbugs>
<findbugs home="${findbugs.home}" effort="max" output="xml:withMessages" outputFile="${findbugs.dir}/output-modularity.xml" jvmargs="-Xmx1024m">
<class location="${pellet.modularity.jar}" />
<sourcepath location="${modularity.src.dir}" />
<auxClasspath refid="findbugs.class.path" />
</findbugs>
<findbugs home="${findbugs.home}" effort="max" output="xml:withMessages" outputFile="${findbugs.dir}/output-owlapi.xml" jvmargs="-Xmx1024m">
<class location="${pellet.owlapi.jar}" />
<sourcepath location="${owlapi.src.dir}" />
<auxClasspath refid="findbugs.class.path" />
</findbugs>
<findbugs home="${findbugs.home}" effort="max" output="xml:withMessages" outputFile="${findbugs.dir}/output-pellint.xml" jvmargs="-Xmx1024m">
<class location="${pellet.pellint.jar}" />
<sourcepath location="${pellint.src.dir}" />
<auxClasspath refid="findbugs.class.path" />
</findbugs>
<findbugs home="${findbugs.home}" effort="max" output="xml:withMessages" outputFile="${findbugs.dir}/output-query.xml" jvmargs="-Xmx1024m">
<class location="${pellet.query.jar}" />
<sourcepath location="${query.src.dir}" />
<auxClasspath refid="findbugs.class.path" />
</findbugs>
<findbugs home="${findbugs.home}" effort="max" output="xml:withMessages" outputFile="${findbugs.dir}/output-rules.xml" jvmargs="-Xmx1024m">
<class location="${pellet.rules.jar}" />
<sourcepath location="${rules.src.dir}" />
<auxClasspath refid="findbugs.class.path" />
</findbugs>
</target>
<target name="clean-findbugs">
<delete quiet="true" includeEmptyDirs="true">
<fileset dir="${findbugs.dir}" />
</delete>
</target>
<!--
******************** PERFORMANCE TEST ********************
-->
<property name="performancetest.class.name"
value="profiler.statistical.ReleasePerformanceTestSuite"/>
<target name="performance-test" depends="build">
<junit maxmemory="1536m" fork="yes" haltonfailure="false" dir="${basedir}"
failureproperty="pellet.junit.failure">
<test name="${performancetest.class.name}"/>
<formatter type="plain" usefile="false"/>
<formatter type="xml" usefile="true" if="pellet.junit.formatter.xml"/>
<classpath refid="project.class.path"/>
<jvmarg value="-enableassertions" />
</junit>
<fail if="pellet.junit.failure" message="JUnit test failure."/>
</target>
<!-- override clean target to get all analysis artifacts -->
<target name="clean" depends="clean-coverage,clean-findbugs" />
<!-- default target outputs all html reports -->
<target name="html" depends="coverage,findbugs-html" />
</project>