Skip to content

Commit 3bdbc8e

Browse files
authored
Merge pull request #36 from spt-development/feature/spring-b00t-3.4.0-upgrade
Updated dependencies to align with Spring Boot 3.4.0
2 parents 8340c1d + 9bad4a1 commit 3bdbc8e

File tree

2 files changed

+48
-13
lines changed

2 files changed

+48
-13
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
## Dependencies
2+
3+
* Aligned dependencies with [Spring Boot 3.4.0](https://github.com/spring-projects/spring-boot/releases/tag/v3.4.0)

pom.xml

Lines changed: 45 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -39,18 +39,18 @@
3939

4040
<!-- Dependency versions, matched to Spring Boot -->
4141
<aspectj.version>1.9.22.1</aspectj.version>
42-
<httpcore5.version>5.2.5</httpcore5.version>
42+
<httpcore5.version>5.3.1</httpcore5.version>
4343
<slf4j.version>2.0.16</slf4j.version>
44-
<spring.version>6.1.14</spring.version>
44+
<spring.version>6.2.0</spring.version>
4545

4646
<!-- Test dependency versions -->
47-
<spt-development-test.version>3.1.12</spt-development-test.version>
47+
<spt-development-test.version>3.1.13</spt-development-test.version>
4848

4949
<!-- Test dependency versions, matched to Spring Boot -->
5050
<hamcrest.version>2.2</hamcrest.version>
51-
<junit-jupiter.version>5.10.5</junit-jupiter.version>
52-
<logback.version>1.5.8</logback.version>
53-
<mockito.version>5.11.0</mockito.version>
51+
<junit-jupiter.version>5.11.3</junit-jupiter.version>
52+
<logback.version>1.5.12</logback.version>
53+
<mockito.version>5.14.2</mockito.version>
5454

5555
<!-- Plugin versions -->
5656
<build-helper-maven-plugin.version>3.6.0</build-helper-maven-plugin.version>
@@ -62,20 +62,20 @@
6262
<maven-dependency-plugin.version>3.8.1</maven-dependency-plugin.version>
6363
<maven-enforcer-plugin.version>3.5.0</maven-enforcer-plugin.version>
6464
<maven-gpg-plugin.version>3.2.7</maven-gpg-plugin.version>
65-
<maven-javadoc-plugin.version>3.10.1</maven-javadoc-plugin.version>
65+
<maven-javadoc-plugin.version>3.11.1</maven-javadoc-plugin.version>
6666
<maven-jxr-plugin.version>3.6.0</maven-jxr-plugin.version>
6767
<maven-pmd-plugin.version>3.26.0</maven-pmd-plugin.version>
6868
<maven-release-plugin.version>3.1.1</maven-release-plugin.version>
6969
<maven-scm-plugin.version>2.1.0</maven-scm-plugin.version>
7070
<maven-source-plugin.version>3.3.1</maven-source-plugin.version>
71-
<maven-surefire-plugin.version>3.5.1</maven-surefire-plugin.version>
71+
<maven-surefire-plugin.version>3.5.2</maven-surefire-plugin.version>
7272
<nexus-staging-plugin.version>1.7.0</nexus-staging-plugin.version>
73-
<pitest-maven.version>1.17.0</pitest-maven.version>
74-
<spotbugs.version>4.8.6.5</spotbugs.version>
75-
<versions-maven-plugin.version>2.17.1</versions-maven-plugin.version>
73+
<pitest-maven.version>1.17.1</pitest-maven.version>
74+
<spotbugs.version>4.8.6.6</spotbugs.version>
75+
<versions-maven-plugin.version>2.18.0</versions-maven-plugin.version>
7676

7777
<!-- Plugin dependencies -->
78-
<checkstyle.version>10.20.0</checkstyle.version>
78+
<checkstyle.version>10.20.1</checkstyle.version>
7979
<findbugs-slf4j-bug-pattern.version>1.5.0</findbugs-slf4j-bug-pattern.version>
8080
<findbugs-sec-bug-pattern.version>1.13.0</findbugs-sec-bug-pattern.version>
8181
<pitest-junit5-plugin.version>1.2.1</pitest-junit5-plugin.version>
@@ -331,6 +331,12 @@
331331
<ignoreAllNonTestScoped>true</ignoreAllNonTestScoped>
332332
</configuration>
333333
</execution>
334+
<!-- Required for Mockito as of JDK 21 - see `maven-surefire-plugin` configuration for more information. -->
335+
<execution>
336+
<goals>
337+
<goal>properties</goal>
338+
</goals>
339+
</execution>
334340
</executions>
335341
</plugin>
336342
<plugin>
@@ -414,8 +420,17 @@
414420
WARNING: Dynamic loading of agents will be disallowed by default in a future release
415421
416422
NOTE. argLine property is set by JaCoCo in prepare-agent stage.
423+
424+
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
425+
able to function without an explicit setup to enable instrumentation, and the JVM will always display a warning.
426+
427+
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
428+
429+
@{argLine} -javaagent:${org.mockito:mockito-core:jar}
430+
431+
Additionally, the `properties` goal of the `maven-dependency-plugin` must be executed.
417432
-->
418-
<argLine>-XX:+EnableDynamicAgentLoading ${argLine}</argLine>
433+
<argLine>-XX:+EnableDynamicAgentLoading @{argLine} -javaagent:${org.mockito:mockito-core:jar}</argLine>
419434
<trimStackTrace>false</trimStackTrace>
420435
<includes>
421436
<include>**/*Tests.java</include>
@@ -431,6 +446,23 @@
431446
<artifactId>spotbugs-maven-plugin</artifactId>
432447
<version>${spotbugs.version}</version>
433448
<dependencies>
449+
<!--
450+
Added slf4j dependencies to resolve warning:
451+
452+
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
453+
...
454+
-->
455+
<dependency>
456+
<groupId>org.slf4j</groupId>
457+
<artifactId>slf4j-api</artifactId>
458+
<version>${slf4j.version}</version>
459+
</dependency>
460+
<dependency>
461+
<groupId>org.slf4j</groupId>
462+
<artifactId>slf4j-simple</artifactId>
463+
<version>${slf4j.version}</version>
464+
</dependency>
465+
434466
<!-- Included as dependencies as well as plugins so that versions plugins picks up new versions -->
435467
<dependency>
436468
<groupId>jp.skypencil.findbugs.slf4j</groupId>

0 commit comments

Comments
 (0)