-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpom.xml
More file actions
355 lines (341 loc) · 13.1 KB
/
Copy pathpom.xml
File metadata and controls
355 lines (341 loc) · 13.1 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
<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>io.github.dfa1.typesafe-java</groupId>
<artifactId>typesafe-java</artifactId>
<version>0.6.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>typesafe-java</name>
<description>Java 21 client for the TypeSafe API. Send a state (any JSON value) plus a set of
Noul/Choice/Score questions, get back typed answers.
</description>
<url>https://github.com/dfa1/typesafe-java</url>
<licenses>
<license>
<name>MIT</name>
<url>https://opensource.org/license/mit/</url>
<distribution>repo</distribution>
</license>
</licenses>
<developers>
<developer>
<id>dfa1</id>
<name>Davide Angelocola</name>
<email>davide.angelocola@gmail.com</email>
<url>https://github.com/dfa1</url>
</developer>
</developers>
<scm>
<connection>scm:git:https://github.com/dfa1/typesafe-java.git</connection>
<developerConnection>scm:git:git@github.com:dfa1/typesafe-java.git</developerConnection>
<url>https://github.com/dfa1/typesafe-java</url>
<tag>HEAD</tag>
</scm>
<modules>
<module>core</module>
<module>client-jdk</module>
<module>client-okhttp</module>
<module>jackson2</module>
<module>jackson3</module>
<module>testkit</module>
<module>mapping</module>
<module>bom</module>
<module>acceptance</module>
<module>cli</module>
</modules>
<properties>
<maven.compiler.release>21</maven.compiler.release>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jackson2.version>2.17.2</jackson2.version>
<jackson3.version>3.0.0</jackson3.version>
<okhttp.version>5.5.0</okhttp.version>
<junit.version>5.10.2</junit.version>
<assertj.version>3.27.7</assertj.version>
<mockito.version>5.23.0</mockito.version>
<!-- byte-buddy-agent version must match what mockito-core pulls in transitively.
Update this when bumping mockito.version (run: mvn dependency:tree -pl core | grep byte-buddy-agent). -->
<bytebuddy.version>1.18.13</bytebuddy.version>
<junit-pioneer.version>2.3.0</junit-pioneer.version>
<excludedGroups>acceptance</excludedGroups>
<!-- coverage -->
<jacoco-maven-plugin.version>0.8.15</jacoco-maven-plugin.version>
<!-- Default for the @{argLine} placeholder in the surefire config below. JaCoCo's
prepare-agent goal overwrites this with the agent arguments when the coverage
profile is active; without this default, surefire receives a literal "@{argLine}"
token as a JVM argument when the profile isn't active. -->
<argLine />
<!-- release plugins -->
<maven-source-plugin.version>3.4.0</maven-source-plugin.version>
<maven-javadoc-plugin.version>3.12.0</maven-javadoc-plugin.version>
<maven-gpg-plugin.version>3.2.8</maven-gpg-plugin.version>
<central-publishing-plugin.version>0.11.0</central-publishing-plugin.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>${assertj.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-junit-jupiter</artifactId>
<version>${mockito.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit-pioneer</groupId>
<artifactId>junit-pioneer</artifactId>
<version>${junit-pioneer.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
</dependencyManagement>
<!-- byte-buddy-agent declared here so every module has it in its dependency tree, which
allows maven-dependency-plugin:properties to resolve
${net.bytebuddy:byte-buddy-agent:jar} for the surefire -javaagent arg. -->
<dependencies>
<dependency>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy-agent</artifactId>
<version>${bytebuddy.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.2.5</version>
<configuration>
<!-- @{argLine} expands to the JaCoCo agent arguments set by jacoco:prepare-agent
when the coverage profile is active (see the argLine property default above).
net.bytebuddy:byte-buddy-agent:jar is resolved to an absolute path by
maven-dependency-plugin:properties (declared in build/plugins); loading it as
a javaagent suppresses the Mockito inline-mock-maker self-attach warning.
The add-opens flags let junit-pioneer's @SetEnvironmentVariable reflectively
mutate the process environment, blocked by default since Java 17. -->
<argLine>@{argLine} -javaagent:${net.bytebuddy:byte-buddy-agent:jar}
--add-opens java.base/java.util=ALL-UNNAMED
--add-opens java.base/java.lang=ALL-UNNAMED</argLine>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.8.1</version>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco-maven-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>3.3.1</version>
<configuration>
<autoVersionSubmodules>true</autoVersionSubmodules>
<tagNameFormat>v@{project.version}</tagNameFormat>
<pushChanges>false</pushChanges>
<localCheckout>true</localCheckout>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>3.6.0</version>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>check</goal>
</goals>
<configuration>
<configLocation>${maven.multiModuleProjectDirectory}/checkstyle.xml</configLocation>
<failsOnError>true</failsOnError>
<consoleOutput>true</consoleOutput>
<sourceDirectories>
<sourceDirectory>src/main/java</sourceDirectory>
<sourceDirectory>src/test/java</sourceDirectory>
</sourceDirectories>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>${maven-javadoc-plugin.version}</version>
<executions>
<execution>
<!-- Runs on every `verify` (so CI and a local build both catch it), unlike the
release profile's `attach-javadocs` execution which sets doclint=none to
avoid failing a release over doc-completeness noise. This one only checks
`reference` (broken @link/@see targets, e.g. a class that got renamed or
moved) since that's a real bug — a dangling link an IDE shows unresolved —
not a style nit like a missing @param. -->
<id>javadoc-check</id>
<phase>verify</phase>
<goals>
<goal>javadoc</goal>
</goals>
<configuration>
<doclint>reference</doclint>
<quiet>true</quiet>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<!-- Resolves ${net.bytebuddy:byte-buddy-agent:jar} so surefire can load it
as a javaagent — eliminates the Mockito inline-mock-maker self-attach warning. -->
<id>locate-byte-buddy-agent</id>
<goals>
<goal>properties</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<!-- Activated in CI: ./mvnw verify -P coverage
Attaches the JaCoCo agent to surefire and writes one
target/site/jacoco/jacoco.xml per module for SonarCloud to ingest. -->
<id>coverage</id>
<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>
<profile>
<!-- Activated during release: ./mvnw deploy -P release -->
<!-- Prerequisites:
1. Register namespace io.github.dfa1 at central.sonatype.com (GitHub auto-validates).
2. Generate a user token at central.sonatype.com → Account → User Tokens.
3. Add to ~/.m2/settings.xml:
<servers>
<server>
<id>central</id>
<username>TOKEN_USERNAME</username>
<password>TOKEN_PASSWORD</password>
</server>
</servers>
4. GPG key must be published: gpg (send-keys) <KEYID>
-->
<id>release</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>${maven-source-plugin.version}</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>${maven-javadoc-plugin.version}</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
<configuration>
<doclint>none</doclint>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>${maven-gpg-plugin.version}</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
<configuration>
<gpgArguments>
<arg>--pinentry-mode</arg>
<arg>loopback</arg>
</gpgArguments>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<version>${central-publishing-plugin.version}</version>
<extensions>true</extensions>
<configuration>
<publishingServerId>central</publishingServerId>
<autoPublish>true</autoPublish>
<waitUntil>published</waitUntil>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>