-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpom.xml
More file actions
351 lines (331 loc) · 13.1 KB
/
pom.xml
File metadata and controls
351 lines (331 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
<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">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>4.0.5</version>
<relativePath/>
</parent>
<groupId>com.st4r4x</groupId>
<artifactId>quickstart-app</artifactId>
<packaging>jar</packaging>
<version>1.0.0</version>
<name>quickstart-app</name>
<properties>
<java.version>25</java.version>
<maven.compiler.source>25</maven.compiler.source>
<maven.compiler.target>25</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<!-- Override Byte Buddy from Spring Boot BOM — 1.16.x adds Java 25 support -->
<byte-buddy.version>1.16.0</byte-buddy.version>
<!-- Default empty argLine — overridden by JaCoCo when present.
Required so @{argLine} in Surefire/Failsafe resolves to empty string instead
of crashing the forked JVM with an unresolved property literal. -->
<argLine/>
<!-- Fallback used when .git is absent (e.g. Docker build context) -->
<git.commit.id.abbrev>unknown</git.commit.id.abbrev>
</properties>
<dependencies>
<!-- Spring Boot Web Starter -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<!-- Thymeleaf Template Engine -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
<!-- MongoDB Driver (included by Spring Boot 2.6.x) -->
<dependency>
<groupId>org.mongodb</groupId>
<artifactId>mongodb-driver-sync</artifactId>
</dependency>
<!-- PostgreSQL + JPA -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<scope>runtime</scope>
</dependency>
<!-- Environment Configuration -->
<dependency>
<groupId>io.github.cdimascio</groupId>
<artifactId>dotenv-java</artifactId>
<version>3.0.0</version>
</dependency>
<!-- Redis (Phase 2) -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>
<!-- API Documentation -->
<!-- SpringDoc OpenAPI v2 — required for Spring Boot 3+/4+ compatibility -->
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
<version>2.8.6</version>
</dependency>
<!-- Security -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<!-- Bean Validation implementation — spring-boot-starter-web in SB4 only brings
jakarta.validation-api (interface); hibernate-validator (implementation) is required
for @NotBlank/@Email to enforce constraints at runtime. Without this, @Valid is silently ignored. -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
<!-- Actuator + Prometheus metrics -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-registry-prometheus</artifactId>
</dependency>
<!-- JWT -->
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-api</artifactId>
<version>0.11.5</version>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-impl</artifactId>
<version>0.11.5</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-jackson</artifactId>
<version>0.11.5</version>
<scope>runtime</scope>
</dependency>
<!-- Logging -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
</dependency>
<!-- Structured JSON logging — 8.x targets Logback 1.5.x (Spring Boot 3+/4+ ships 1.5.x) -->
<dependency>
<groupId>net.logstash.logback</groupId>
<artifactId>logstash-logback-encoder</artifactId>
<version>8.1</version>
</dependency>
<!-- Rate limiting — Bucket4j 7.x required for Java 11; do NOT use 8.x (requires Java 17) -->
<dependency>
<groupId>com.bucket4j</groupId>
<artifactId>bucket4j-core</artifactId>
<version>7.6.1</version>
</dependency>
<!-- Elasticsearch Java API Client -->
<dependency>
<groupId>co.elastic.clients</groupId>
<artifactId>elasticsearch-java</artifactId>
<version>8.13.4</version>
</dependency>
<!-- Testing -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<!-- Spring Security Test: SecurityMockMvcRequestPostProcessors.authentication() etc. -->
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<!-- 5.x required for Java 21+ Byte Buddy instrumentation support -->
<version>5.17.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-junit-jupiter</artifactId>
<version>5.17.0</version>
<scope>test</scope>
</dependency>
<!-- mockito-inline removed: Mockito 5.x merged inline mocking into mockito-core.
Having both on the classpath causes MockMaker conflicts on Java 21+. -->
<!-- Testcontainers — 1.20.1 uses docker-java 3.4.0 which supports Docker API >=1.40.
1.19.8 used docker-java 3.3.6 (hardcoded API 1.32) incompatible with Docker Engine 29.x.
Still 1.x — Testcontainers 2.x changed the API; 1.20.1 is stable and compatible with JUnit 5 @BeforeAll static containers. -->
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>testcontainers</artifactId>
<version>1.20.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>mongodb</artifactId>
<version>1.20.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>postgresql</artifactId>
<version>1.20.1</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
<plugins>
<!-- Spring Boot Maven Plugin -->
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<mainClass>com.st4r4x.Application</mainClass>
</configuration>
</plugin>
<!-- Java Compiler Plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.13.0</version>
<configuration>
<source>25</source>
<target>25</target>
<encoding>UTF-8</encoding>
<!-- forceJavacCompilerUse: avoids plexus-compiler-javac NullPointerException
(UnsharedNameTable.hashes == null) that occurs when compiling Java 25 sources
in-process on maven-compiler-plugin 3.13+. Forces javac to run as an
external process instead of the in-process javax.tools API. -->
<forceJavacCompilerUse>true</forceJavacCompilerUse>
</configuration>
</plugin>
<!-- Surefire Plugin: allow Mockito's byte-buddy-agent to attach dynamically on Java 21+.
Without -XX:+EnableDynamicAgentLoading, Mockito self-attachment on Java 25 causes
a StackOverflowError in @WebMvcTest slice tests. -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>@{argLine} -XX:+EnableDynamicAgentLoading</argLine>
</configuration>
</plugin>
<!-- Failsafe: runs *IT.java in integration-test phase, separate from Surefire unit tests -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
<argLine>@{argLine} -XX:+EnableDynamicAgentLoading</argLine>
<!-- api.version=1.45 overrides the shaded docker-java-core default of 1.32.
Testcontainers' shaded DockerClientProviderStrategy reads System.getProperty("api.version")
via overrideDockerPropertiesWithSystemProperties() and uses it instead of VERSION_1_32.
Required for Docker Engine 29.x which dropped support for API < 1.40. -->
<systemPropertyVariables>
<api.version>1.45</api.version>
</systemPropertyVariables>
<includes>
<include>**/*IT.java</include>
</includes>
</configuration>
<executions>
<execution>
<id>integration-tests</id>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Git commit ID plugin — writes git.properties at build time so app.version
in application.properties can be filtered with the short SHA -->
<plugin>
<groupId>io.github.git-commit-id</groupId>
<artifactId>git-commit-id-maven-plugin</artifactId>
<version>9.0.1</version>
<executions>
<execution>
<goals><goal>revision</goal></goals>
</execution>
</executions>
<configuration>
<generateGitPropertiesFile>false</generateGitPropertiesFile>
<failOnNoGitDirectory>false</failOnNoGitDirectory>
<includeOnlyProperties>
<includeOnlyProperty>git.commit.id.abbrev</includeOnlyProperty>
</includeOnlyProperties>
</configuration>
</plugin>
<!-- JaCoCo Maven Plugin — generates coverage report consumed by CI-08 (madraphos/jacoco-report)
Version must be explicit — Spring Boot 2.6.15 BOM does not manage jacoco-maven-plugin
0.8.14: first release with official Java 25 support (class file major version 69) -->
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.14</version>
<executions>
<execution>
<id>jacoco-prepare-agent</id>
<phase>initialize</phase>
<goals><goal>prepare-agent</goal></goals>
</execution>
<execution>
<id>jacoco-report</id>
<phase>test</phase>
<goals><goal>report</goal></goals>
<configuration>
<!-- Exclude low-coverage POJOs/DTOs/entities from coverage threshold calculation -->
<excludes>
<exclude>com/st4r4x/dto/**</exclude>
<exclude>com/st4r4x/entity/**</exclude>
<exclude>com/st4r4x/aggregation/**</exclude>
<exclude>com/st4r4x/domain/**</exclude>
</excludes>
</configuration>
</execution>
<execution>
<id>jacoco-check</id>
<phase>test</phase>
<goals><goal>check</goal></goals>
<configuration>
<!-- Exclude low-coverage POJOs/DTOs/entities from coverage threshold calculation -->
<excludes>
<exclude>com/st4r4x/dto/**</exclude>
<exclude>com/st4r4x/entity/**</exclude>
<exclude>com/st4r4x/aggregation/**</exclude>
<exclude>com/st4r4x/domain/**</exclude>
</excludes>
<rules>
<rule>
<element>BUNDLE</element>
<limits>
<limit>
<!-- Measured baseline from Phase 12 on prior branch: 43%
Threshold set at 38% (baseline minus 5%) to tolerate minor drift -->
<counter>INSTRUCTION</counter>
<value>COVEREDRATIO</value>
<minimum>0.38</minimum>
</limit>
</limits>
</rule>
</rules>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>