Skip to content

Commit b636301

Browse files
committed
Updated dependencies to align with Spring Boot 3.4.0
1 parent f904767 commit b636301

File tree

2 files changed

+53
-11
lines changed

2 files changed

+53
-11
lines changed

pom.xml

Lines changed: 52 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>org.springframework.boot</groupId>
88
<artifactId>spring-boot-starter-parent</artifactId>
9-
<version>3.3.5</version>
9+
<version>3.4.0</version>
1010
<relativePath /> <!-- lookup parent from repository -->
1111
</parent>
1212

@@ -33,14 +33,14 @@
3333
<commons-collections.version>4.4</commons-collections.version>
3434
<commons-logging.version>1.3.4</commons-logging.version>
3535
<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>
3838

3939
<!-- Test dependency versions -->
4040
<awaitility.version>4.2.2</awaitility.version>
4141
<cucumber.version>7.20.1</cucumber.version>
4242
<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>
4444

4545
<!-- Spring Boot overrides to fix security vulnerabilities -->
4646
<artemis.version>2.38.0</artemis.version>
@@ -53,11 +53,11 @@
5353
<maven-jxr-plugin.version>3.6.0</maven-jxr-plugin.version>
5454
<maven-pmd-plugin.version>3.26.0</maven-pmd-plugin.version>
5555
<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>
5858

5959
<!-- Plugin dependencies -->
60-
<checkstyle.version>10.20.0</checkstyle.version>
60+
<checkstyle.version>10.20.1</checkstyle.version>
6161
<findbugs-slf4j-bug-pattern.version>1.5.0</findbugs-slf4j-bug-pattern.version>
6262
<findbugs-sec-bug-pattern.version>1.13.0</findbugs-sec-bug-pattern.version>
6363
<pitest-junit5-plugin.version>1.2.1</pitest-junit5-plugin.version>
@@ -348,6 +348,12 @@
348348
<ignoredUsedUndeclaredDependencies>:::</ignoredUsedUndeclaredDependencies>
349349
</configuration>
350350
</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>
351357
</executions>
352358
<!-- Version defined in spring-boot-parent pluginManagement section -->
353359
</plugin>
@@ -431,8 +437,17 @@
431437
WARNING: Dynamic loading of agents will be disallowed by default in a future release
432438
433439
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>
436451
<!--
437452
classesDirectory is required to work around a bug that is discussed at
438453
https://github.com/spring-projects/spring-boot/issues/6254. There are a number of different
@@ -470,8 +485,17 @@
470485
WARNING: Dynamic loading of agents will be disallowed by default in a future release
471486
472487
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>
475499
<trimStackTrace>false</trimStackTrace>
476500
<includes>
477501
<include>**/*Test.java</include>
@@ -487,6 +511,23 @@
487511
<artifactId>spotbugs-maven-plugin</artifactId>
488512
<version>${spotbugs-plugin.version}</version>
489513
<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+
490531
<!-- Included as dependencies as well as plugins so that versions plugins picks up new versions -->
491532
<dependency>
492533
<groupId>jp.skypencil.findbugs.slf4j</groupId>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
cucumber.glue=com.spt.development.demo

0 commit comments

Comments
 (0)