|
6 | 6 | <parent>
|
7 | 7 | <groupId>org.springframework.boot</groupId>
|
8 | 8 | <artifactId>spring-boot-starter-parent</artifactId>
|
9 |
| - <version>3.3.5</version> |
| 9 | + <version>3.4.0</version> |
10 | 10 | <relativePath /> <!-- lookup parent from repository -->
|
11 | 11 | </parent>
|
12 | 12 |
|
|
33 | 33 | <commons-collections.version>4.4</commons-collections.version>
|
34 | 34 | <commons-logging.version>1.3.4</commons-logging.version>
|
35 | 35 | <findbugs-jsr305.version>3.0.2</findbugs-jsr305.version>
|
36 |
| - <spt-development-audit-spring-boot.version>3.3.5</spt-development-audit-spring-boot.version> |
37 |
| - <spt-development-logging-spring-boot.version>3.3.5</spt-development-logging-spring-boot.version> |
| 36 | + <spt-development-audit-spring-boot.version>3.4.0</spt-development-audit-spring-boot.version> |
| 37 | + <spt-development-logging-spring-boot.version>3.4.0</spt-development-logging-spring-boot.version> |
38 | 38 |
|
39 | 39 | <!-- Test dependency versions -->
|
40 | 40 | <awaitility.version>4.2.2</awaitility.version>
|
41 | 41 | <cucumber.version>7.20.1</cucumber.version>
|
42 | 42 | <junit-platform.version>1.11.3</junit-platform.version>
|
43 |
| - <spt-development-test.version>3.1.12</spt-development-test.version> |
| 43 | + <spt-development-test.version>3.1.13</spt-development-test.version> |
44 | 44 |
|
45 | 45 | <!-- Spring Boot overrides to fix security vulnerabilities -->
|
46 | 46 | <artemis.version>2.38.0</artemis.version>
|
|
53 | 53 | <maven-jxr-plugin.version>3.6.0</maven-jxr-plugin.version>
|
54 | 54 | <maven-pmd-plugin.version>3.26.0</maven-pmd-plugin.version>
|
55 | 55 | <maven-scm-plugin.version>2.1.0</maven-scm-plugin.version>
|
56 |
| - <pitest-maven.version>1.17.0</pitest-maven.version> |
57 |
| - <spotbugs-plugin.version>4.8.6.5</spotbugs-plugin.version> |
| 56 | + <pitest-maven.version>1.17.1</pitest-maven.version> |
| 57 | + <spotbugs-plugin.version>4.8.6.6</spotbugs-plugin.version> |
58 | 58 |
|
59 | 59 | <!-- Plugin dependencies -->
|
60 |
| - <checkstyle.version>10.20.0</checkstyle.version> |
| 60 | + <checkstyle.version>10.20.1</checkstyle.version> |
61 | 61 | <findbugs-slf4j-bug-pattern.version>1.5.0</findbugs-slf4j-bug-pattern.version>
|
62 | 62 | <findbugs-sec-bug-pattern.version>1.13.0</findbugs-sec-bug-pattern.version>
|
63 | 63 | <pitest-junit5-plugin.version>1.2.1</pitest-junit5-plugin.version>
|
|
348 | 348 | <ignoredUsedUndeclaredDependencies>:::</ignoredUsedUndeclaredDependencies>
|
349 | 349 | </configuration>
|
350 | 350 | </execution>
|
| 351 | + <!-- Required for Mockito as of JDK 21 - see `maven-surefire-plugin` configuration for more information. --> |
| 352 | + <execution> |
| 353 | + <goals> |
| 354 | + <goal>properties</goal> |
| 355 | + </goals> |
| 356 | + </execution> |
351 | 357 | </executions>
|
352 | 358 | <!-- Version defined in spring-boot-parent pluginManagement section -->
|
353 | 359 | </plugin>
|
|
431 | 437 | WARNING: Dynamic loading of agents will be disallowed by default in a future release
|
432 | 438 |
|
433 | 439 | NOTE. argLine property is set by JaCoCo in prepare-agent stage.
|
434 |
| - --> |
435 |
| - <argLine>-XX:+EnableDynamicAgentLoading ${argLine}</argLine> |
| 440 | +
|
| 441 | + Starting from Java 21, the JDK restricts the ability of libraries to attach a Java agent to their own JVM. As a result, the inline-mock-maker might not be |
| 442 | + able to function without an explicit setup to enable instrumentation, and the JVM will always display a warning. |
| 443 | +
|
| 444 | + To explicitly attach Mockito during test execution, the library's jar file needs to be specified as -javaagent as an argument to the executing JVM with |
| 445 | +
|
| 446 | + @{argLine} -javaagent:${org.mockito:mockito-core:jar} |
| 447 | +
|
| 448 | + Additionally, the `properties` goal of the `maven-dependency-plugin` must be executed. |
| 449 | + --> |
| 450 | + <argLine>-XX:+EnableDynamicAgentLoading @{argLine} -javaagent:${org.mockito:mockito-core:jar}</argLine> |
436 | 451 | <!--
|
437 | 452 | classesDirectory is required to work around a bug that is discussed at
|
438 | 453 | https://github.com/spring-projects/spring-boot/issues/6254. There are a number of different
|
|
470 | 485 | WARNING: Dynamic loading of agents will be disallowed by default in a future release
|
471 | 486 |
|
472 | 487 | NOTE. argLine property is set by JaCoCo in prepare-agent stage.
|
473 |
| - --> |
474 |
| - <argLine>-XX:+EnableDynamicAgentLoading ${argLine}</argLine> |
| 488 | +
|
| 489 | + Starting from Java 21, the JDK restricts the ability of libraries to attach a Java agent to their own JVM. As a result, the inline-mock-maker might not be |
| 490 | + able to function without an explicit setup to enable instrumentation, and the JVM will always display a warning. |
| 491 | +
|
| 492 | + To explicitly attach Mockito during test execution, the library's jar file needs to be specified as -javaagent as an argument to the executing JVM with |
| 493 | +
|
| 494 | + @{argLine} -javaagent:${org.mockito:mockito-core:jar} |
| 495 | +
|
| 496 | + Additionally, the `properties` goal of the `maven-dependency-plugin` must be executed. |
| 497 | + --> |
| 498 | + <argLine>-XX:+EnableDynamicAgentLoading @{argLine} -javaagent:${org.mockito:mockito-core:jar}</argLine> |
475 | 499 | <trimStackTrace>false</trimStackTrace>
|
476 | 500 | <includes>
|
477 | 501 | <include>**/*Test.java</include>
|
|
487 | 511 | <artifactId>spotbugs-maven-plugin</artifactId>
|
488 | 512 | <version>${spotbugs-plugin.version}</version>
|
489 | 513 | <dependencies>
|
| 514 | + <!-- |
| 515 | + Added slf4j dependencies to resolve warning: |
| 516 | +
|
| 517 | + SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". |
| 518 | + ... |
| 519 | + --> |
| 520 | + <dependency> |
| 521 | + <groupId>org.slf4j</groupId> |
| 522 | + <artifactId>slf4j-api</artifactId> |
| 523 | + <version>${slf4j.version}</version> |
| 524 | + </dependency> |
| 525 | + <dependency> |
| 526 | + <groupId>org.slf4j</groupId> |
| 527 | + <artifactId>slf4j-simple</artifactId> |
| 528 | + <version>${slf4j.version}</version> |
| 529 | + </dependency> |
| 530 | + |
490 | 531 | <!-- Included as dependencies as well as plugins so that versions plugins picks up new versions -->
|
491 | 532 | <dependency>
|
492 | 533 | <groupId>jp.skypencil.findbugs.slf4j</groupId>
|
|
0 commit comments