forked from sboesebeck/morphium
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpom.xml
More file actions
509 lines (505 loc) · 19.6 KB
/
Copy pathpom.xml
File metadata and controls
509 lines (505 loc) · 19.6 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
498
499
500
501
502
503
504
505
506
507
508
509
<?xml version="1.0"?>
<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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>de.caluga</groupId>
<artifactId>morphium-parent</artifactId>
<version>6.3.7-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Morphium Parent</name>
<url>http://caluga.de</url>
<description>
Morphium - a Caching Object Mapper for MongoDB (Parent POM)
</description>
<licenses>
<license>
<name>The Apache Software License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<url>https://github.com/sboesebeck/morphium</url>
<connection>scm:git:git://github.com/sboesebeck/morphium.git</connection>
<developerConnection>scm:git:git@github.com:sboesebeck/morphium.git</developerConnection>
<tag>HEAD</tag>
</scm>
<developers>
<developer>
<id>sBoesebeck</id>
<name>Stephan Bösebeck</name>
<email>sb@caluga.de</email>
</developer>
</developers>
<!--
Core modules (always built) vs. extension modules (profile "extensions",
active by default).
Invariants that this setup guarantees:
I1: morphium-core/pom.xml does not reference any extension module.
I2: The core dependency tree stays free of jakarta.data/io.quarkus/org.springframework.
I3: Core (+PoppyDB) is buildable without the extensions: -DskipExtensions.
I4: Foreign BOMs (Quarkus/Spring) are NOT imported here, only in the
respective extension module's own POM.
I5: No cyclic module dependency (extension -> core, never the reverse).
Version properties vs. BOM imports (I4): a framework's *version
property* (e.g. quarkus.version) MAY live here in morphium-parent so
that upgrading it is a single-line change, but the framework's *BOM
import* (scope=import) must stay in that extension's own module POM.
Centralizing the version property in one place is safe and convenient;
moving the BOM import here would force every core build
(morphium-core/poppydb, no -DskipExtensions needed to trigger it) to
resolve ~400 foreign artifacts merely to read this parent POM, which is
exactly what I4 forbids. The two are not the same kind of change: keep
them separate.
"mvn install" -> builds core + PoppyDB + all extensions
"mvn install -DskipExtensions" -> builds only core + PoppyDB (no Docker,
no Quarkus/Spring download needed).
Skips ALL extension modules currently
in the "extensions" profile below:
morphium-jakarta-data, quarkus-morphium,
AND spring-boot-morphium. quarkus-morphium
and spring-boot-morphium both depend on
morphium-jakarta-data, so this reactor
could not build one without the others
even if it tried to.
-->
<modules>
<module>morphium-core</module>
<module>poppydb</module>
</modules>
<properties>
<maven.compiler.source>21</maven.compiler.source>
<maven.compiler.target>21</maven.compiler.target>
<maven.compiler.release>21</maven.compiler.release>
<maven.compiler.skip>false</maven.compiler.skip>
<java.version>21</java.version>
<jacoco.percentage.instruction>0.40</jacoco.percentage.instruction>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<mongodbDriver.version>4.11.5</mongodbDriver.version>
<netty.version>4.2.9.Final</netty.version>
<!-- This is required for late-binding replacement of argline by agents like jacoco's prepare-agent.
Surefire's @{argLine} syntax (used in the surefire pluginManagement config) re-reads this
property at execution time, after prepare-agent has modified it, instead of interpolating
at model-build time when it would only see the empty value. -->
<argLine />
<!-- Heap cap for the forked test JVMs. Without it they size themselves ergonomically from
the HOST's physical RAM (MaxRAMPercentage 25%), which is wrong wherever the JVM cannot
see the real limit: on the CI container /sys/fs/cgroup/memory.max reads "max", so each
fork helpfully allowed itself 5.8GB on an 8GB box. Nothing ever hit its own limit and no
OutOfMemoryError was ever thrown - the phases simply grew until the machine ran dry and
the runner's memory watchdog killed everything mid-suite. A fixed cap also makes runs
reproducible instead of quietly depending on how much RAM the developer's machine has.
Kept separate from @{argLine} so an agent that replaces that property (jacoco's
prepare-agent is the usual one) still composes with this.
Why 2g and not less: the InMemoryDriver keeps whole databases on the heap AND guards
itself with a watermark relative to that heap - at 1g, StorageSnapshotTest's concurrent
writers pushed the live set past the 90% reject threshold and the driver refused writes,
which is the watermark working correctly on a heap too small for the test. 1500m passes;
2g leaves headroom. Override per run with -Dtest.maxHeap=-XmxNNN. -->
<test.maxHeap>-Xmx2g</test.maxHeap>
<!-- JUnit tag control (defaults)
external = needs a real MongoDB (enabled by -Pexternal)
manual = process-killing / hardcoded-local tests, NEVER in CI
benchmark = timing-sensitive perf benchmarks (e.g. PerformanceBenchmarkTest), not part
of the regular suite; run explicitly via -Dtest=(class name) or the
"tags benchmark" runtests.sh option -->
<test.includeTags />
<test.excludeTags>external,manual,benchmark</test.excludeTags>
<!-- Extension module property for morphium-jakarta-data.
Deliberately only the version, no Quarkus/Spring BOM (see I4). -->
<jakarta.data.version>1.0.0</jakarta.data.version>
<!-- Extension module property for quarkus-morphium (kept here, in
morphium-parent, rather than in quarkus-morphium/pom.xml): a
Quarkus upgrade is a single-line change here. The Quarkus BOM
*import* itself stays in quarkus-morphium/pom.xml (see I4 and the
dependencyManagement comment below); only the version property is
centralized. -->
<quarkus.version>3.32.3</quarkus.version>
<!-- Extension module property for spring-boot-morphium (M5-T5, moved
here from spring-boot-morphium/pom.xml per D1/B6, analogous to the
quarkus.version pattern above): a Spring Boot upgrade is a
single-line change here. The spring-boot-dependencies BOM *import*
itself stays in spring-boot-morphium/pom.xml (see I4 and the
dependencyManagement comment below); only the version property is
centralized. -->
<spring-boot.version>3.4.13</spring-boot.version>
</properties>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0</version>
<configuration>
<argLine>@{argLine} ${test.maxHeap}</argLine>
<!-- JUnit 5 tag selection - use groups/excludedGroups for surefire -->
<groups>${test.includeTags}</groups>
<excludedGroups>${test.excludeTags}</excludedGroups>
<properties>
<configurationParameters>
junit.jupiter.extensions.autodetection.enabled=true
</configurationParameters>
</properties>
<systemPropertyVariables>
<morphium.tests.verbose>${morphium.tests.verbose}</morphium.tests.verbose>
</systemPropertyVariables>
<forkCount>1</forkCount>
<reuseForks>false</reuseForks>
<runOrder>filesystem</runOrder>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.4.1</version>
<configuration>
<failOnError>false</failOnError>
<javadocExecutable>/usr/bin/javadoc</javadocExecutable>
<additionalJOption>-J-Xmx2048m</additionalJOption>
</configuration>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.12.1</version>
<configuration>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
<release>${maven.compiler.release}</release>
<compilerArgs>
<arg>-Xlint:deprecation,unchecked</arg>
</compilerArgs>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.2.2</version>
<configuration>
<excludes>
<exclude>log4j*.xml</exclude>
<exclude>logging*.properties</exclude>
<exclude>logback*.xml</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.5.3</version>
<configuration>
<tagNameFormat>v@{project.version}</tagNameFormat>
<autoVersionSubmodules>true</autoVersionSubmodules>
<releaseProfiles>release-sign-artifacts</releaseProfiles>
<preparationGoals>clean install -DskipTests</preparationGoals>
<arguments>-Dmaven.javadoc.skip=false -DskipTests</arguments>
</configuration>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.12</version>
</plugin>
</plugins>
</pluginManagement>
</build>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.xerial.snappy</groupId>
<artifactId>snappy-java</artifactId>
<version>1.1.10.8</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.openjdk.jol</groupId>
<artifactId>jol-core</artifactId>
<version>0.17</version>
</dependency>
<dependency>
<groupId>org.graalvm.js</groupId>
<artifactId>js-scriptengine</artifactId>
<version>25.0.1</version>
</dependency>
<dependency>
<groupId>org.graalvm.polyglot</groupId>
<artifactId>polyglot</artifactId>
<version>25.0.1</version>
</dependency>
<dependency>
<groupId>org.graalvm.polyglot</groupId>
<artifactId>js</artifactId>
<version>25.0.1</version>
<type>pom</type>
<exclusions>
<exclusion>
<groupId>org.graalvm.truffle</groupId>
<artifactId>truffle-enterprise</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<version>5.9.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.jms</groupId>
<artifactId>javax.jms-api</artifactId>
<version>2.0.1</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>2.0.17</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
<version>1.5.37</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.5.37</version>
</dependency>
<dependency>
<groupId>com.colofabrix.scala</groupId>
<artifactId>figlet4s-java</artifactId>
<version>0.3.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy</artifactId>
<version>1.15.11</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.mongodb</groupId>
<artifactId>bson</artifactId>
<version>${mongodbDriver.version}</version>
</dependency>
<dependency>
<groupId>org.mongodb</groupId>
<artifactId>mongodb-driver-sync</artifactId>
<version>${mongodbDriver.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mongodb</groupId>
<artifactId>mongodb-driver-core</artifactId>
<version>${mongodbDriver.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.ongres.scram</groupId>
<artifactId>client</artifactId>
<version>2.1</version>
</dependency>
<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
<version>1.1.1</version>
<exclusions>
<exclusion>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>2.0.1.Final</version>
</dependency>
<dependency>
<groupId>org.ehcache</groupId>
<artifactId>jcache</artifactId>
<version>1.0.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hibernate.validator</groupId>
<artifactId>hibernate-validator</artifactId>
<version>8.0.0.Final</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.cache</groupId>
<artifactId>cache-api</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.20.0</version>
</dependency>
<dependency>
<groupId>io.github.classgraph</groupId>
<artifactId>classgraph</artifactId>
<version>4.8.184</version>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>3.27.7</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-all</artifactId>
<version>${netty.version}</version>
</dependency>
<dependency>
<groupId>de.caluga</groupId>
<artifactId>rsa</artifactId>
<version>1.1</version>
<exclusions>
<exclusion>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j</artifactId>
</exclusion>
<exclusion>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- For the extension module morphium-jakarta-data. Single dependency,
NO BOM import (I4 is uncritical for this extension anyway, since
Jakarta Data does not ship its own BOM). -->
<dependency>
<groupId>jakarta.data</groupId>
<artifactId>jakarta.data-api</artifactId>
<version>${jakarta.data.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
<profiles>
<profile>
<id>release-nosign-artifacts</id>
</profile>
<profile>
<id>release-sign-artifacts</id>
<activation>
<activeByDefault>true</activeByDefault>
<property>
<name>performRelease</name>
<value>true</value>
</property>
</activation>
<build>
<plugins>
</plugins>
</build>
</profile>
<!-- Test execution control profiles -->
<profile>
<id>external</id>
<properties>
<!-- enable external-tagged tests, but manual/benchmark tests stay excluded -->
<test.excludeTags>manual,benchmark</test.excludeTags>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<systemPropertyVariables>
<morphium.tests.external>true</morphium.tests.external>
</systemPropertyVariables>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>inmem</id>
<properties>
<morphium.driver>inmem</morphium.driver>
</properties>
</profile>
<profile>
<id>pooled</id>
<properties>
<morphium.driver>pooled</morphium.driver>
</properties>
</profile>
<profile>
<id>single</id>
<properties>
<morphium.driver>single</morphium.driver>
</properties>
</profile>
<profile>
<id>coverage</id>
<!-- Opt-in only: the agent costs measurable time and the CI phases are
load-sensitive. prepare-agent sets ${argLine}; surefire composes it
with ${test.maxHeap} (see the argLine property comment above). Inherited
reactor-wide: a root build with -Pcoverage also instruments the extension
modules (morphium-jakarta-data, quarkus-morphium); coverage reports are only
consumed for morphium-core and poppydb - use -pl or -DskipExtensions to avoid
the extra agent cost. -->
<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<executions>
<execution>
<id>prepare-agent</id>
<goals><goal>prepare-agent</goal></goals>
</execution>
<execution>
<id>report</id>
<phase>verify</phase>
<goals><goal>report</goal></goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<!-- Extension modules. Active by default; disable with
"-DskipExtensions" for a core-only build without Quarkus/Spring
download and without Docker. -->
<profile>
<id>extensions</id>
<activation>
<property>
<name>!skipExtensions</name>
</property>
</activation>
<modules>
<module>morphium-jakarta-data</module>
<module>quarkus-morphium</module>
<module>spring-boot-morphium</module>
</modules>
</profile>
</profiles>
</project>