generated from block/oss-project-template
-
Notifications
You must be signed in to change notification settings - Fork 1
/
pom.xml
502 lines (463 loc) · 17.1 KB
/
pom.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
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
<?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 http://maven.apache.org/maven-v4_0_0.xsd">
<!-- Model Information -->
<modelVersion>4.0.0</modelVersion>
<!-- Artifact Information -->
<groupId>xyz.block</groupId>
<artifactId>example-jvm-maven-parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>JVM Maven Example Parent</name>
<url>https://opensource.block.xyz</url>
<description>Build Aggregator and Parent for Example to bootstrap new Java Kotlin Maven Projects</description>
<inceptionYear>2024</inceptionYear>
<!-- SCM -->
<scm>
<connection>scm:git:git://github.com/block-open-source/example-java-kotlin-maven-multimodule.git</connection>
<!-- This has to be HTTPS, not git://, for maven-release-plugin to do AUTH correctly -->
<developerConnection>scm:git:https://github.com/block-open-source/example-java-kotlin-maven-multimodule.git</developerConnection>
<url>https://github.com/block-open-source/example-java-kotlin-maven-multimodule</url>
<tag>HEAD</tag>
</scm>
<!-- Developers -->
<developers>
<developer>
<id>Block</id>
<name>Block, Inc.</name>
<email>ospo@block.xyz</email>
</developer>
</developers>
<!-- Issues -->
<issueManagement>
<system>github</system>
<url>https://github.com/block-open-source/example-java-kotlin-maven-multimodule/issues</url>
</issueManagement>
<!-- Licenses -->
<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>
<!-- Aggregate Modules -->
<modules>
<module>api</module>
<module>impl</module>
<!-- <module>distribution</module> -->
</modules>
<!-- Properties -->
<properties>
<!-- Versioning for platform -->
<version.java>21</version.java>
<version.kotlin>2.0.21</version.kotlin>
<kotlin.jvm.target>${version.java}</kotlin.jvm.target>
<kotlin.compiler.incremental>true</kotlin.compiler.incremental>
<!-- Project properties -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<!-- Defines the server config in .maven_settings.xml to use in maven-release-plugin -->
<project.scm.id>github</project.scm.id>
<!--
This section is where we declare the versioning and scope for dependencies of
the platform and projects building atop the platform.
Submodules should not define their own dependency versions
because these must all co-exist in the same ClassLoading environment, and
therefore have to be aligned across submodules. Thus we declare the versioning
requirements here at the platform level.
The <dependencyManagement> section of this POM enforces the versions declared
here as properties. Because this POM is a BOM POM, these versions may be imported
by projects building atop the Web5 Platform (ie. tbDEX, consumers, etc).
If a submodule needs to introduce a new dependency or upgrade, define that
dependency and version here such that other submodules in the build may pick
up the same version. This will guarantee that submodule test suites are running
in the correct ClassLoading environment aligned with the Web5 platform.
More on BOM POMs:
https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#bill-of-materials-bom-poms
-->
<!-- Versioning for Extensions and Plugins -->
<version.io.github.martinvisser>0.1.0</version.io.github.martinvisser>
<!-- Versioning for Dependencies -->
<version.org.junit>5.11.3</version.org.junit>
<!-- Versioning for Test Dependencies -->
<version.org.assertj>3.26.3</version.org.assertj>
<!--
Versioning for transitive Dependencies
These are overrides for deps brought in transitively; reasoning
and approach is documented below in <dependencyManagement> section
-->
</properties>
<!-- Dependency Management -->
<dependencyManagement>
<dependencies>
<!-- Direct Dependency Management -->
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib</artifactId>
<version>${version.kotlin}</version>
</dependency>
<!-- Test Dependencies Management -->
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>${version.org.assertj}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-test</artifactId>
<version>${version.kotlin}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-test-junit5</artifactId>
<version>${version.kotlin}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit</groupId>
<artifactId>junit-bom</artifactId>
<version>${version.org.junit}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<!--
Transitive Dependency Management
In this section we address build issues including security vulnerabilities
in transitive dependencies we don't explicitly declare above or in the submodules
Versioning and scope declared here will override anything inherited through
transitivity, so use with care. Also note: these are in place for a
point in time. As we maintain this software, the manual forced resolution we do
here may:
1) No longer be necessary (if we have removed a dependency path leading to dep)
2) Break an upgrade (if we upgrade a dependency and this forces a lower version
of a transitive dependency it brings in)
So we need to exercise care here, and, when upgrading our deps, check to see if
these overrides of transitive dependency versions and scope aren't breaking things.
When adding an entry here, please reference the issue which explains why we
needed to do this; it will help future maintainers understand if the force
is still valid, should be removed, or handled in another way.
When in doubt, ask! :)
-->
</dependencies>
</dependencyManagement>
<!-- Dependencies common to all packages -->
<dependencies>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib</artifactId>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-test</artifactId>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-test-junit5</artifactId>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<sourceDirectory>${project.basedir}/src/main/java</sourceDirectory>
<testSourceDirectory>${project.basedir}/src/test/java</testSourceDirectory>
<extensions>
<extension>
<groupId>io.github.martinvisser</groupId>
<artifactId>kover-maven-plugin</artifactId>
<version>${version.io.github.martinvisser}</version>
</extension>
</extensions>
<pluginManagement>
<plugins>
<!-- clean lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#clean_Lifecycle -->
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>3.4.0</version>
</plugin>
<!-- default lifecycle, jar packaging: see https://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging -->
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.3.1</version>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.13.0</version>
<configuration>
<source>${version.java}</source>
<target>${version.java}</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.5.2</version>
<configuration>
<includes>
<include>**/Test*.java</include>
<include>**/*Test.java</include>
<include>**/*Tests.java</include>
<include>**/*TestCase.java</include>
</includes>
<trimStackTrace>false</trimStackTrace>
</configuration>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>3.4.2</version>
<configuration>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<artifactId>maven-install-plugin</artifactId>
<version>3.1.3</version>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>3.1.3</version>
<configuration>
<deployAtEnd>true</deployAtEnd>
</configuration>
</plugin>
<plugin>
<groupId>org.simplify4u.plugins</groupId>
<artifactId>sign-maven-plugin</artifactId>
<version>1.1.0</version>
<executions>
<execution>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.3.1</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-release-plugin</artifactId>
<version>3.1.1</version>
<configuration>
<autoVersionSubmodules>true</autoVersionSubmodules>
<pushChanges>true</pushChanges>
<tagNameFormat>v@{project.version}</tagNameFormat>
<scmCommentPrefix>[Block Release Manager 🚀]</scmCommentPrefix>
<scmReleaseCommitComment>@{prefix} Setting version to: @{releaseLabel}</scmReleaseCommitComment>
<scmDevelopmentCommitComment>@{prefix} Setting next development version after: @{releaseLabel}</scmDevelopmentCommitComment>
</configuration>
</plugin>
<!-- site lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#site_Lifecycle -->
<plugin>
<artifactId>maven-site-plugin</artifactId>
<version>3.21.0</version>
</plugin>
<plugin>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>3.8.0</version>
</plugin>
<plugin>
<groupId>com.github.ozsie</groupId>
<artifactId>detekt-maven-plugin</artifactId>
<version>1.23.7</version>
<executions>
<execution>
<phase>verify</phase>
<goals>
<goal>check</goal>
</goals>
<configuration>
<config>config/detekt.yml</config>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>io.gitlab.arturbosch.detekt</groupId>
<artifactId>detekt-formatting</artifactId>
<version>1.23.7</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>io.github.martinvisser</groupId>
<artifactId>kover-maven-plugin</artifactId>
<version>${version.io.github.martinvisser}</version>
<configuration>
<!-- Rules are optional, but if none are configured the plugin cannot verify the coverage -->
<!-- So we set them to something very low as to not fail builds -->
<rules>
<rule>
<minValue>10</minValue>
<metric>LINE</metric>
<aggregation>COVERED_PERCENTAGE</aggregation>
</rule>
<rule>
<minValue>10</minValue>
<metric>BRANCH</metric>
<aggregation>COVERED_PERCENTAGE</aggregation>
</rule>
</rules>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.5.0</version>
</plugin>
<plugin>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-maven-plugin</artifactId>
<version>${version.kotlin}</version>
<configuration>
<jvmTarget>${kotlin.jvm.target}</jvmTarget>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
</plugin>
<plugin>
<groupId>io.github.martinvisser</groupId>
<artifactId>kover-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>com.github.ozsie</groupId>
<artifactId>detekt-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.jetbrains.dokka</groupId>
<artifactId>dokka-maven-plugin</artifactId>
<version>1.9.20</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>javadocJar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-maven-plugin</artifactId>
<extensions>true</extensions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>sign-artifacts</id>
<build>
<plugins>
<plugin>
<groupId>org.simplify4u.plugins</groupId>
<artifactId>sign-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</profile>
<profile>
<!-- https://central.sonatype.org/publish/publish-maven/#deployment -->
<id>ossrh</id>
<build>
<plugins>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.7.0</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh-releases</serverId>
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
</plugins>
</build>
<distributionManagement>
<snapshotRepository>
<id>ossrh-snapshots</id>
<url>https://s01.oss.sonatype.org/content/repositories/snapshots/</url>
</snapshotRepository>
<!-- Sonatype's OSSRH - replicates to Maven Central within 30min of publish -->
<repository>
<id>ossrh-releases</id>
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>
</profile>
</profiles>
<repositories>
<repository>
<id>block-oss-thirdparty</id>
<name>block-oss-thirdparty</name>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
<url>https://blockxyz.jfrog.io/artifactory/block-oss-thirdparty-maven2/</url>
</repository>
<repository>
<id>block-oss-snapshots</id>
<name>block-oss-snapshots</name>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
<url>https://blockxyz.jfrog.io/artifactory/block-oss-snapshots-maven2</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>block-oss-thirdparty</id>
<name>block-oss-thirdparty</name>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
<url>https://blockxyz.jfrog.io/artifactory/block-oss-thirdparty-maven2/</url>
</pluginRepository>
</pluginRepositories>
</project>