Repository navigation
Expand file tree
/
Copy pathpom.xml
More file actions
419 lines (398 loc) · 14.8 KB
/
Copy pathpom.xml
File metadata and controls
419 lines (398 loc) · 14.8 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
<?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>
<groupId>systems.riddler</groupId>
<artifactId>uxid</artifactId>
<version>1.0.0</version>
<packaging>jar</packaging>
<name>uxid</name>
<description>Prefixed, K-sortable identifiers a person can read, wire-compatible with the Elixir uxid package.</description>
<url>https://github.com/riddler/uxid-java</url>
<inceptionYear>2026</inceptionYear>
<licenses>
<license>
<name>MIT License</name>
<url>https://opensource.org/licenses/MIT</url>
<distribution>repo</distribution>
</license>
</licenses>
<developers>
<developer>
<id>johnnyt</id>
<name>John Thornton</name>
<url>https://github.com/johnnyt</url>
</developer>
</developers>
<scm>
<connection>scm:git:https://github.com/riddler/uxid-java.git</connection>
<developerConnection>scm:git:git@github.com:riddler/uxid-java.git</developerConnection>
<url>https://github.com/riddler/uxid-java</url>
<tag>HEAD</tag>
</scm>
<issueManagement>
<system>GitHub Issues</system>
<url>https://github.com/riddler/uxid-java/issues</url>
</issueManagement>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<!-- The oldest Java the jars run on; the gate JDK is the one mise.toml pins. -->
<maven.compiler.release>17</maven.compiler.release>
<!-- A fixed timestamp makes the jars byte-reproducible. -->
<project.build.outputTimestamp>2026-10-21T00:00:00Z</project.build.outputTimestamp>
<errorprone.version>2.50.0</errorprone.version>
<!-- 1.37.0 fails to load under spotless-maven-plugin 3.10.4. -->
<google-java-format.version>1.36.0</google-java-format.version>
<junit.version>5.14.4</junit.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.junit</groupId>
<artifactId>junit-bom</artifactId>
<version>${junit.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>3.5.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.5.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.16.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.6.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.5.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.4.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.12.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<version>3.2.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>3.2.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.22.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.6.3</version>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.15</version>
</plugin>
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<version>3.10.4</version>
</plugin>
<!-- The signer and the publisher, used only by the release profile
below. -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.2.8</version>
</plugin>
<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<version>0.12.0</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<!-- Every plugin version pinned, Maven 3.9 or later, and no dependency
outside test scope. -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<executions>
<execution>
<id>enforce</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireMavenVersion>
<version>[3.9,)</version>
</requireMavenVersion>
<requirePluginVersions>
<banLatest>true</banLatest>
<banRelease>true</banRelease>
<banSnapshots>true</banSnapshots>
</requirePluginVersions>
<bannedDependencies>
<excludes>
<exclude>*:*:*:*:compile</exclude>
<exclude>*:*:*:*:provided</exclude>
<exclude>*:*:*:*:runtime</exclude>
<exclude>*:*:*:*:system</exclude>
</excludes>
<message>uxid has no runtime dependencies: every dependency is test scope.</message>
</bannedDependencies>
</rules>
</configuration>
</execution>
</executions>
</plugin>
<!-- The format check: google-java-format, checked in the verify phase. -->
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<configuration>
<java>
<googleJavaFormat>
<version>${google-java-format.version}</version>
<style>GOOGLE</style>
</googleJavaFormat>
</java>
</configuration>
<executions>
<execution>
<id>spotless-check</id>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Compile for Java 17 with every javac lint and Error Prone; a warning
fails the build. -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<release>${maven.compiler.release}</release>
<failOnWarning>true</failOnWarning>
<showWarnings>true</showWarnings>
<compilerArgs>
<arg>-Xlint:all</arg>
<arg>-XDcompilePolicy=simple</arg>
<arg>--should-stop=ifError=FLOW</arg>
<arg>-Xplugin:ErrorProne</arg>
</compilerArgs>
<annotationProcessorPaths>
<path>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_core</artifactId>
<version>${errorprone.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<!-- An empty test run is a failure, so the coverage check below
always has execution data to read. -->
<failIfNoTests>true</failIfNoTests>
</configuration>
</plugin>
<!-- Line coverage of at least 90 percent, checked in the verify phase. -->
<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>
<goals>
<goal>report</goal>
</goals>
</execution>
<execution>
<id>check</id>
<goals>
<goal>check</goal>
</goals>
<configuration>
<rules>
<rule>
<element>BUNDLE</element>
<limits>
<limit>
<counter>LINE</counter>
<value>COVEREDRATIO</value>
<minimum>0.90</minimum>
</limit>
</limits>
</rule>
</rules>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- The javadoc jar; a doclint warning fails the build. -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<doclint>all</doclint>
<failOnWarnings>true</failOnWarnings>
</configuration>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<!-- The release profile. Only the publish job of
.github/workflows/release.yml activates it (`-P release`, with
`-DskipTests` and `deploy`); the gate never does, so the gate never
signs or deploys anything. In the verify phase, after the package
phase has built the main, sources and javadoc jars, it first refuses
unless each jar's SHA-256 equals the one the workflow passes in
(uxid.release.sha256.jar, uxid.release.sha256.sources and
uxid.release.sha256.javadoc, the sums the workflow's verify job
recorded; a property left unset never matches), then signs every
file with the Bouncy Castle signer, which reads the key and its
passphrase from the environment variables named below. In the deploy
phase the Central Portal's publishing plugin uploads the signed files
as one deployment and waits until the Portal has published it. -->
<profile>
<id>release</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<executions>
<execution>
<id>release-jar-sums</id>
<phase>verify</phase>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireFileChecksum>
<file>${project.build.directory}/${project.build.finalName}.jar</file>
<type>sha256</type>
<checksum>${uxid.release.sha256.jar}</checksum>
<message>The main jar differs from the one the release workflow verified; nothing is signed or published.</message>
</requireFileChecksum>
<requireFileChecksum>
<file>${project.build.directory}/${project.build.finalName}-sources.jar</file>
<type>sha256</type>
<checksum>${uxid.release.sha256.sources}</checksum>
<message>The sources jar differs from the one the release workflow verified; nothing is signed or published.</message>
</requireFileChecksum>
<requireFileChecksum>
<file>${project.build.directory}/${project.build.finalName}-javadoc.jar</file>
<type>sha256</type>
<checksum>${uxid.release.sha256.javadoc}</checksum>
<message>The javadoc jar differs from the one the release workflow verified; nothing is signed or published.</message>
</requireFileChecksum>
</rules>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<executions>
<execution>
<id>sign</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
<configuration>
<signer>bc</signer>
<bestPractices>true</bestPractices>
<keyEnvName>MAVEN_GPG_PRIVATE_KEY</keyEnvName>
<passphraseEnvName>MAVEN_GPG_PASSPHRASE</passphraseEnvName>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<publishingServerId>central</publishingServerId>
<autoPublish>true</autoPublish>
<waitUntil>published</waitUntil>
<waitMaxTime>3600</waitMaxTime>
<deploymentName>${project.groupId}:${project.artifactId}:${project.version}</deploymentName>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>