Repository navigation
Expand file tree
/
Copy pathpom.xml
More file actions
497 lines (484 loc) · 24.5 KB
/
Copy pathpom.xml
File metadata and controls
497 lines (484 loc) · 24.5 KB
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
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.embabel.build</groupId>
<artifactId>embabel-build-parent</artifactId>
<version>2.0.4</version>
</parent>
<groupId>com.embabel.dice</groupId>
<artifactId>dice-parent</artifactId>
<version>0.5.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Dice Parent</name>
<description>Knowledge graph construction and reasoning library (multi-module aggregator)</description>
<url>https://github.com/embabel/dice</url>
<scm>
<url>https://github.com/embabel/dice</url>
<connection>scm:git:https://github.com/embabel/dice.git</connection>
<developerConnection>scm:git:https://github.com/embabel/dice.git</developerConnection>
<tag>HEAD</tag>
</scm>
<developers>
<developer>
<id>rjohnson</id>
<name>Rod Johnson</name>
<email>rod@embabel.com</email>
<organization>Embabel Pty Ltd</organization>
<organizationUrl>https://www.embabel.com</organizationUrl>
<roles>
<role>Founder and Project Lead</role>
</roles>
</developer>
<developer>
<id>jimador</id>
<name>James Dunnam</name>
<email>james@embabel.com</email>
<organization>Embabel Pty Ltd</organization>
<organizationUrl>https://www.embabel.com</organizationUrl>
<roles>
<role>lead</role>
</roles>
</developer>
<developer>
<id>alexheifetz</id>
<name>Alex Hein-Heifetz</name>
<email>alex@embabel.com</email>
<organization>Embabel Pty Ltd</organization>
<organizationUrl>https://www.embabel.com</organizationUrl>
<roles>
<role>lead</role>
</roles>
</developer>
<developer>
<id>igordayen</id>
<name>Igor Dayen</name>
<email>igor@embabel.com</email>
<organization>Embabel Pty Ltd</organization>
<organizationUrl>https://www.embabel.com</organizationUrl>
<roles>
<role>lead</role>
</roles>
</developer>
<developer>
<id>jasperblues</id>
<name>Jasper Blues</name>
<email>jasper@embabel.com</email>
<organization>Embabel Pty Ltd</organization>
<organizationUrl>https://www.embabel.com</organizationUrl>
<roles>
<role>lead</role>
</roles>
</developer>
<developer>
<id>tschuehly</id>
<name>Thomas Schilling</name>
<email>thomas@embabel.com</email>
<organization>Embabel Pty Ltd</organization>
<organizationUrl>https://www.embabel.com</organizationUrl>
<roles>
<role>lead</role>
</roles>
</developer>
</developers>
<modules>
<module>dice</module>
<module>dice-storage</module>
<module>dice-storage-autoconfigure</module>
<module>dice-report</module>
<module>dice-ingestion</module>
<module>dice-metamodel</module>
<module>dice-store-conformance</module>
<module>dice-mcp-autoconfigure</module>
<module>dice-dependencies</module>
<module>dice-starters</module>
</modules>
<properties>
<embabel-agent.version>1.5.4</embabel-agent.version>
<!--
tuProlog stays at 1.0.4. Releases 1.1.0 to 1.1.5 depend on a kotlin-stdlib-common 2.2 jar
that Kotlin does not publish, and releases from 1.2.0 are built with Kotlin 2.4.
-->
<tuprolog.version>1.0.4</tuprolog.version>
<drivine.version>0.6.2</drivine.version>
<!--
Docker Engine API version the Testcontainers docker-java client talks. The client's
default is below the engine minimum, which disables container-backed tests; pin it here
and reference it from the surefire system properties below.
-->
<testcontainers.docker.api.version>1.41</testcontainers.docker.api.version>
<!--
JetBrains annotations, for @ApiStatus on experimental API. Not managed by
embabel-agent-dependencies, so the version is set here and every module inherits it.
-->
<jetbrains.annotations.version>26.0.2</jetbrains.annotations.version>
<!--
mockito-kotlin version is also not managed by embabel-agent-dependencies, so the version
is set here and test scope dependencies inherit it.
-->
<mockito-kotlin.version>5.4.0</mockito-kotlin.version>
<!-- check compares each module's public API with its committed listing; update rewrites the listing -->
<api.listing.mode>check</api.listing.mode>
<!--
Kotlin ABI tools version for the API listings. It is kept apart from kotlin.version so a
compiler upgrade cannot change the listing format in the same change. It reads the
compiler's metadata, and its versions follow Kotlin's, so the build stops when Kotlin's
major and minor version passes this one (see the enforcer plugin below).
-->
<abi-tools.version>2.2.21</abi-tools.version>
<!-- Reads the source file name of a compiled class, so the listing can leave generated code out -->
<asm.version>9.8</asm.version>
<!-- A module with generated sources sets this to their root, and the listing leaves them out -->
<api.listing.generated.sources></api.listing.generated.sources>
<!-- The api-listing-update profile sets this, so update mode knows the class directory was emptied -->
<api.listing.fresh-classes>false</api.listing.fresh-classes>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.embabel.agent</groupId>
<artifactId>embabel-agent-dependencies</artifactId>
<version>${embabel-agent.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<!-- Internal modules -->
<dependency>
<groupId>com.embabel.dice</groupId>
<artifactId>dice</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.embabel.dice</groupId>
<artifactId>dice-storage</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.embabel.dice</groupId>
<artifactId>dice-ingestion</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.embabel.dice</groupId>
<artifactId>dice-report</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.embabel.dice</groupId>
<artifactId>dice-metamodel</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.embabel.dice</groupId>
<artifactId>dice-storage-autoconfigure</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.embabel.dice</groupId>
<artifactId>dice-mcp-autoconfigure</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.embabel.dice</groupId>
<artifactId>dice-store-conformance</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.embabel.dice</groupId>
<artifactId>dice-starter</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.embabel.dice</groupId>
<artifactId>dice-starter-neo4j</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.embabel.dice</groupId>
<artifactId>dice-starter-sqlite</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.embabel.dice</groupId>
<artifactId>dice-starter-mcp</artifactId>
<version>${project.version}</version>
</dependency>
<!-- Drivine Spring Boot starter -->
<dependency>
<groupId>org.drivine</groupId>
<artifactId>drivine4j-spring-boot-starter</artifactId>
<version>${drivine.version}</version>
</dependency>
<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
<version>${jetbrains.annotations.version}</version>
</dependency>
<dependency>
<groupId>org.mockito.kotlin</groupId>
<artifactId>mockito-kotlin</artifactId>
<version>${mockito-kotlin.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
<repositories>
<repository>
<id>embabel-releases</id>
<url>https://repo.embabel.com/artifactory/libs-release</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>embabel-snapshots</id>
<url>https://repo.embabel.com/artifactory/libs-snapshot</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<build>
<pluginManagement>
<plugins>
<plugin>
<!--
Compares a module's compiled public API with the listing committed under its api
directory, so an API change always shows up in review. A module opts in by naming
this plugin in its own build.
-->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>3.1.0</version>
<dependencies>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>abi-tools</artifactId>
<version>${abi-tools.version}</version>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<version>${asm.version}</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>public-api-listing</id>
<phase>process-classes</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target xmlns:if="ant:if">
<!-- Update mode relies on the api-listing-update profile having emptied the class directory -->
<fail message="Pass -Dapi.listing.mode=update on the command line, so the api-listing-update profile empties the class directory before compile.">
<condition>
<and>
<equals arg1="${api.listing.mode}" arg2="update"/>
<not>
<equals arg1="${api.listing.fresh-classes}" arg2="true"/>
</not>
</and>
</condition>
</fail>
<!--
Compiled from build-support's sources on disk into this module's own
target, so a module built alone with -pl needs nothing from the reactor.
javac skips the compile when the class is newer than its source. A stamp
file holds the classpath and compiler settings of the last compile, and a
change to either (another abi-tools or ASM version, say) deletes the class
to force a compile. Line numbers stay in, so a stack trace names its lines.
-->
<property name="api.listing.classes" location="${project.build.directory}/api-listing"/>
<property name="api.listing.stamp" location="${project.build.directory}/api-listing.classpath"/>
<pathconvert property="api.listing.classpath" refid="maven.plugin.classpath"/>
<property name="api.listing.compile"
value="release=${maven.compiler.target} debug=true ${api.listing.classpath}"/>
<loadfile property="api.listing.compiled" srcFile="${api.listing.stamp}"
failonerror="false" quiet="true"/>
<condition property="api.listing.recompile">
<not>
<equals arg1="${api.listing.compile}" arg2="${api.listing.compiled}"/>
</not>
</condition>
<delete dir="${api.listing.classes}" if:set="api.listing.recompile"/>
<mkdir dir="${api.listing.classes}"/>
<javac srcdir="${maven.multiModuleProjectDirectory}/build-support/src/main/java"
destdir="${api.listing.classes}" classpathref="maven.plugin.classpath"
includeantruntime="false" release="${maven.compiler.target}" encoding="UTF-8"
debug="true"/>
<echo file="${api.listing.stamp}" message="${api.listing.compile}"/>
<!-- Forked, because the program ends with System.exit -->
<java classname="com.embabel.dice.apilisting.ApiListing" fork="true" failonerror="false"
resultproperty="api.listing.exit" errorproperty="api.listing.error">
<classpath>
<pathelement location="${api.listing.classes}"/>
<path refid="maven.plugin.classpath"/>
</classpath>
<arg value="${api.listing.mode}"/>
<arg file="${project.build.outputDirectory}"/>
<arg file="${project.basedir}/api"/>
<arg value="${project.artifactId}"/>
<arg value="--generated=${api.listing.generated.sources}"/>
<arg value="--source=${project.basedir}/src/main/kotlin"/>
<arg value="--source=${project.basedir}/src/main/java"/>
</java>
<!-- Put the program's own explanation in the build error, so it shows in quiet mode too -->
<fail message="${api.listing.error}">
<condition>
<not>
<equals arg1="${api.listing.exit}" arg2="0"/>
</not>
</condition>
</fail>
</target>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<!--
The ABI tools read the Kotlin compiler's metadata, so they must be at least as new as
Kotlin. Their versions follow Kotlin's, and the build stops at validate when Kotlin's
major and minor version is ahead of abi-tools.version.
-->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<executions>
<execution>
<!-- The build parent's dependency convergence report stays off, as it was before this plugin was named here -->
<id>enforce-versions</id>
<phase>none</phase>
</execution>
<execution>
<id>abi-tools-keeps-up-with-kotlin</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<fail>true</fail>
<rules combine.self="override">
<evaluateBeanshell>
<condition><![CDATA[
String[] kotlin = "${kotlin.version}".split("[.-]");
String[] abiTools = "${abi-tools.version}".split("[.-]");
Integer.parseInt(kotlin[0]) * 1000 + Integer.parseInt(kotlin[1])
<= Integer.parseInt(abiTools[0]) * 1000 + Integer.parseInt(abiTools[1])
]]></condition>
<message>Kotlin ${kotlin.version} is newer than the Kotlin ABI tools ${abi-tools.version} that write the public API listings. Raise abi-tools.version in the root pom.xml to a release with the same major and minor version as Kotlin, then regenerate the listings with ./mvnw -B -Dapi.listing.mode=update process-classes and review the difference.</message>
</evaluateBeanshell>
</rules>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<!--
Register src/main/kotlin and src/main/java as compile source roots (configured in
embabel-build-parent), so the sources jar below contains the Kotlin code, not just resources.
-->
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
</plugin>
<plugin>
<!-- Attach a sources jar to every module; Maven Central requires one. Configured in embabel-build-parent. -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
</plugin>
<plugin>
<!--
Pin the Docker Engine API version the Testcontainers docker-java client uses;
its default is below the engine minimum and disables container-backed tests.
Honoured only as a JVM system property, and tests fork, so it must be set here.
The value lives in the testcontainers.docker.api.version property above.
-->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<systemPropertyVariables>
<api.version>${testcontainers.docker.api.version}</api.version>
</systemPropertyVariables>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<!--
Integration tests, the user guide and the API listing program are built by default but are not published.
activeByDefault profiles switch off when any other profile in this POM is activated,
so the Maven Central release (-Psonatype) builds only the published modules above.
-->
<profile>
<id>unpublished-modules</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<modules>
<module>dice-integration-tests</module>
<module>dice-user-guide</module>
<module>build-support</module>
</modules>
</profile>
<!--
Declared here (the release setup itself lives in embabel-build-parent) so that
-Psonatype deactivates unpublished-modules.
-->
<profile>
<id>sonatype</id>
</profile>
<!--
Regenerating the API listings with -Dapi.listing.mode=update starts from an empty class
directory, so a class left from an earlier build cannot reach a listing. The Kotlin compiler
rebuilds every class on each run anyway, and a check build never runs this. Activating this
profile also switches off unpublished-modules, which have no listings.
-->
<profile>
<id>api-listing-update</id>
<activation>
<property>
<name>api.listing.mode</name>
<value>update</value>
</property>
</activation>
<properties>
<api.listing.fresh-classes>true</api.listing.fresh-classes>
</properties>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>public-api-listing-fresh-classes</id>
<phase>initialize</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<!-- Incremental Kotlin compiles only changed files, so the listing would be partial -->
<fail message="Regenerate the API listings without -Dkotlin.compiler.incremental=true, so every class is compiled.">
<condition>
<equals arg1="${kotlin.compiler.incremental}" arg2="true"/>
</condition>
</fail>
<delete dir="${project.build.outputDirectory}"/>
</target>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>
</profile>
</profiles>
</project>