|
7 | 7 | <parent> |
8 | 8 | <groupId>org.springframework.boot</groupId> |
9 | 9 | <artifactId>spring-boot-starter-parent</artifactId> |
10 | | - <version>3.5.11</version> |
| 10 | + <version>4.0.3</version> |
11 | 11 | <relativePath/> <!-- lookup parent from repository --> |
12 | 12 | </parent> |
13 | 13 |
|
|
18 | 18 | <properties> |
19 | 19 | <java.version>21</java.version> |
20 | 20 | <org.mapstruct.version>1.6.3</org.mapstruct.version> |
21 | | - <springdoc-open-ui.version>2.8.15</springdoc-open-ui.version> |
| 21 | + <springdoc-open-ui.version>3.0.1</springdoc-open-ui.version> |
| 22 | + |
| 23 | + <testcontainers-jooq-codegen-maven-plugin.version>1.0.0</testcontainers-jooq-codegen-maven-plugin.version> |
22 | 24 |
|
23 | 25 | <maven-pmd-plugin.version>3.13.0</maven-pmd-plugin.version> |
24 | 26 | <dependency-check-maven.version>12.2.0</dependency-check-maven.version> |
25 | 27 | <spotless.version>3.2.1</spotless.version> |
26 | | - |
27 | | - <db.username>local</db.username> |
28 | | - <db.password>local</db.password> |
29 | 28 | </properties> |
30 | 29 |
|
31 | 30 | <dependencies> |
|
43 | 42 | </dependency> |
44 | 43 | <dependency> |
45 | 44 | <groupId>org.springframework.boot</groupId> |
46 | | - <artifactId>spring-boot-starter-web</artifactId> |
| 45 | + <artifactId>spring-boot-starter-webmvc</artifactId> |
47 | 46 | </dependency> |
48 | 47 | <dependency> |
49 | 48 | <groupId>org.springframework.boot</groupId> |
|
66 | 65 | <artifactId>caffeine</artifactId> |
67 | 66 | </dependency> |
68 | 67 | <dependency> |
69 | | - <groupId>org.liquibase</groupId> |
70 | | - <artifactId>liquibase-core</artifactId> |
| 68 | + <groupId>org.springframework.boot</groupId> |
| 69 | + <artifactId>spring-boot-starter-liquibase</artifactId> |
71 | 70 | </dependency> |
72 | 71 | <dependency> |
73 | 72 | <groupId>org.mapstruct</groupId> |
|
102 | 101 | </dependency> |
103 | 102 | <dependency> |
104 | 103 | <groupId>org.springframework.boot</groupId> |
105 | | - <artifactId>spring-boot-starter-test</artifactId> |
| 104 | + <artifactId>spring-boot-starter-webmvc-test</artifactId> |
106 | 105 | <scope>test</scope> |
107 | 106 | </dependency> |
108 | 107 | <dependency> |
109 | | - <groupId>org.springframework.batch</groupId> |
110 | | - <artifactId>spring-batch-test</artifactId> |
| 108 | + <groupId>org.springframework.boot</groupId> |
| 109 | + <artifactId>spring-boot-starter-batch-test</artifactId> |
| 110 | + <scope>test</scope> |
| 111 | + </dependency> |
| 112 | + <dependency> |
| 113 | + <groupId>org.springframework.boot</groupId> |
| 114 | + <artifactId>spring-boot-resttestclient</artifactId> |
| 115 | + <scope>test</scope> |
| 116 | + </dependency> |
| 117 | + <dependency> |
| 118 | + <groupId>org.springframework.boot</groupId> |
| 119 | + <artifactId>spring-boot-starter-data-jpa-test</artifactId> |
| 120 | + <scope>test</scope> |
| 121 | + </dependency> |
| 122 | + <dependency> |
| 123 | + <groupId>org.springframework.boot</groupId> |
| 124 | + <artifactId>spring-boot-starter-restclient</artifactId> |
111 | 125 | <scope>test</scope> |
112 | 126 | </dependency> |
113 | 127 | <dependency> |
114 | 128 | <groupId>org.testcontainers</groupId> |
115 | | - <artifactId>junit-jupiter</artifactId> |
| 129 | + <artifactId>testcontainers-junit-jupiter</artifactId> |
116 | 130 | <scope>test</scope> |
117 | 131 | </dependency> |
118 | 132 | <dependency> |
119 | 133 | <groupId>org.testcontainers</groupId> |
120 | | - <artifactId>postgresql</artifactId> |
| 134 | + <artifactId>testcontainers-postgresql</artifactId> |
121 | 135 | <scope>test</scope> |
122 | 136 | </dependency> |
123 | 137 | </dependencies> |
|
215 | 229 | <failOnError>false</failOnError> |
216 | 230 | </configuration> |
217 | 231 | </plugin> |
218 | | - <!-- Much better if there was a testcontainers lifecycle management plugin! |
219 | | - Upvote here if you like the idea: https://github.com/testcontainers/testcontainers-java/issues/4397 --> |
220 | | - <plugin> |
221 | | - <groupId>org.codehaus.gmaven</groupId> |
222 | | - <artifactId>groovy-maven-plugin</artifactId> |
223 | | - <version>2.1.1</version> |
224 | | - <executions> |
225 | | - <execution> |
226 | | - <phase>generate-sources</phase> |
227 | | - <goals> |
228 | | - <goal>execute</goal> |
229 | | - </goals> |
230 | | - <configuration> |
231 | | - <source> |
232 | | - db = new org.testcontainers.containers.PostgreSQLContainer("postgres:latest") |
233 | | - .withUsername("${db.username}") |
234 | | - .withDatabaseName("rest") |
235 | | - .withPassword("${db.password}"); |
236 | 232 |
|
237 | | - db.start(); |
238 | | - project.properties.setProperty('db.url', db.getJdbcUrl()); |
239 | | - </source> |
240 | | - </configuration> |
241 | | - </execution> |
242 | | - </executions> |
| 233 | + <plugin> |
| 234 | + <groupId>org.apache.maven.plugins</groupId> |
| 235 | + <artifactId>maven-surefire-plugin</artifactId> |
| 236 | + </plugin> |
243 | 237 |
|
| 238 | + <plugin> |
| 239 | + <groupId>dev.sivalabs</groupId> |
| 240 | + <artifactId>testcontainers-jooq-codegen-maven-plugin</artifactId> |
| 241 | + <version>${testcontainers-jooq-codegen-maven-plugin.version}</version> |
244 | 242 | <dependencies> |
245 | 243 | <dependency> |
246 | 244 | <groupId>org.testcontainers</groupId> |
247 | | - <artifactId>postgresql</artifactId> |
| 245 | + <artifactId>testcontainers-postgresql</artifactId> |
248 | 246 | <version>${testcontainers.version}</version> |
249 | 247 | </dependency> |
250 | | - </dependencies> |
251 | | - </plugin> |
252 | | - |
253 | | - <plugin> |
254 | | - <groupId>org.flywaydb</groupId> |
255 | | - <artifactId>flyway-maven-plugin</artifactId> |
256 | | - <version>${flyway.version}</version> |
257 | | - <executions> |
258 | | - <execution> |
259 | | - <phase>generate-sources</phase> |
260 | | - <goals> |
261 | | - <goal>migrate</goal> |
262 | | - </goals> |
263 | | - <configuration> |
264 | | - <url>${db.url}</url> |
265 | | - <user>${db.username}</user> |
266 | | - <password>${db.password}</password> |
267 | | - <locations> |
268 | | - <location>filesystem:src/main/resources/db/migration</location> |
269 | | - </locations> |
270 | | - </configuration> |
271 | | - </execution> |
272 | | - </executions> |
273 | | - <dependencies> |
274 | 248 | <dependency> |
275 | | - <groupId>org.flywaydb</groupId> |
276 | | - <artifactId>flyway-database-postgresql</artifactId> |
277 | | - <version>${flyway.version}</version> |
| 249 | + <groupId>org.postgresql</groupId> |
| 250 | + <artifactId>postgresql</artifactId> |
| 251 | + <version>${postgresql.version}</version> |
| 252 | + </dependency> |
| 253 | + <dependency> |
| 254 | + <groupId>org.jooq</groupId> |
| 255 | + <artifactId>jooq-codegen</artifactId> |
| 256 | + <version>${jooq.version}</version> |
278 | 257 | </dependency> |
279 | 258 | </dependencies> |
280 | | - </plugin> |
281 | | - |
282 | | - <plugin> |
283 | | - <groupId>org.jooq</groupId> |
284 | | - <artifactId>jooq-codegen-maven</artifactId> |
285 | | - |
286 | 259 | <executions> |
287 | 260 | <execution> |
288 | | - <id>java-generator</id> |
289 | | - <phase>generate-sources</phase> |
| 261 | + <id>generate-jooq-sources</id> |
290 | 262 | <goals> |
291 | 263 | <goal>generate</goal> |
292 | 264 | </goals> |
293 | | - |
| 265 | + <phase>generate-sources</phase> |
294 | 266 | <configuration> |
295 | | - <jdbc> |
296 | | - <url>${db.url}</url> |
297 | | - <user>${db.username}</user> |
298 | | - <password>${db.password}</password> |
299 | | - </jdbc> |
300 | | - <generator> |
301 | | - <database> |
302 | | - <inputSchema>public</inputSchema> |
303 | | - </database> |
304 | | - <target> |
305 | | - <packageName>com.example.poc.webmvc.testcontainersflyway.db</packageName> |
306 | | - <directory>target/generated-sources/jooq</directory> |
307 | | - </target> |
308 | | - </generator> |
| 267 | + <database> |
| 268 | + <!-- |
| 269 | + "type" can be: POSTGRES, MYSQL, MARIADB |
| 270 | + --> |
| 271 | + <type>POSTGRES</type> |
| 272 | + <!-- |
| 273 | + "containerImage" is optional. |
| 274 | + The defaults are |
| 275 | + POSTGRES: postgres:15.2-alpine |
| 276 | + MYSQL: mysql:8.0.33 |
| 277 | + MARIADB: mariadb:10.11 |
| 278 | + --> |
| 279 | + <containerImage>postgres:18.2-alpine</containerImage> |
| 280 | + </database> |
| 281 | + <flyway> |
| 282 | + <locations> |
| 283 | + filesystem:src/main/resources/db/migration |
| 284 | + </locations> |
| 285 | + </flyway> |
| 286 | + <!-- |
| 287 | + You can configure any supporting jooq config here. |
| 288 | + see https://www.jooq.org/doc/latest/manual/code-generation/codegen-configuration/ |
| 289 | + --> |
| 290 | + <jooq> |
| 291 | + <generator> |
| 292 | + <database> |
| 293 | + <includes>.*</includes> |
| 294 | + <excludes>DATABASECHANGELOG.*</excludes> |
| 295 | + <inputSchema>public</inputSchema> |
| 296 | + </database> |
| 297 | + <target> |
| 298 | + <packageName>com.example.poc.webmvc.db</packageName> |
| 299 | + <directory>target/generated-sources/jooq</directory> |
| 300 | + </target> |
| 301 | + </generator> |
| 302 | + </jooq> |
309 | 303 | </configuration> |
310 | 304 | </execution> |
311 | 305 | </executions> |
312 | 306 | </plugin> |
313 | | - |
314 | | - <plugin> |
315 | | - <groupId>org.apache.maven.plugins</groupId> |
316 | | - <artifactId>maven-surefire-plugin</artifactId> |
317 | | - <configuration> |
318 | | - <systemPropertyVariables> |
319 | | - <db.url>${db.url}</db.url> |
320 | | - <db.username>${db.username}</db.username> |
321 | | - <db.password>${db.password}</db.password> |
322 | | - </systemPropertyVariables> |
323 | | - </configuration> |
324 | | - </plugin> |
325 | 307 | <plugin> |
326 | 308 | <groupId>com.diffplug.spotless</groupId> |
327 | 309 | <artifactId>spotless-maven-plugin</artifactId> |
328 | 310 | <version>${spotless.version}</version> |
329 | 311 | <configuration> |
330 | 312 | <java> |
331 | 313 | <googleJavaFormat> |
332 | | - <version>1.25.2</version> |
| 314 | + <version>1.28.0</version> |
333 | 315 | <style>AOSP</style> |
334 | 316 | </googleJavaFormat> |
335 | 317 | <licenseHeader> |
|
349 | 331 | </plugins> |
350 | 332 | </build> |
351 | 333 |
|
352 | | - <repositories> |
353 | | - <repository> |
354 | | - <id>spring-milestones</id> |
355 | | - <name>Spring Milestones</name> |
356 | | - <url>https://repo.spring.io/milestone</url> |
357 | | - <snapshots> |
358 | | - <enabled>false</enabled> |
359 | | - </snapshots> |
360 | | - </repository> |
361 | | - </repositories> |
362 | | - <pluginRepositories> |
363 | | - <pluginRepository> |
364 | | - <id>spring-milestones</id> |
365 | | - <name>Spring Milestones</name> |
366 | | - <url>https://repo.spring.io/milestone</url> |
367 | | - <snapshots> |
368 | | - <enabled>false</enabled> |
369 | | - </snapshots> |
370 | | - </pluginRepository> |
371 | | - </pluginRepositories> |
372 | | - |
373 | 334 | </project> |
0 commit comments