java-sdk/mcp-spring
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Dennis Kawurek eae3840e7d
fix: Mockito inline mocking for Java 21+ (#207)
Before this fix the execution of the maven surefire
plugin with Java 21 logged warnings that mockito should be added as
a java agent, because the self-attaching won't be supported in future
java releases.
In Java 24 the test just broke.

This problem is solved by modifying the pom.xml of the parent and doing
this changes:

* Adding mockito as a java agent.
* Removing the surefireArgLine from the properties. This can be
added back when it's needed (for example when JaCoCo will be used).

Furthermore, the pom.xml in the mcp-spring-* modules now have
the byte-buddy dependency included, as the test would otherwise break
when trying to mock McpSchema#CreateMessageRequest.

Fixes #187

Co-authored-by: Dariusz Jędrzejczyk <dariusz.jedrzejczyk@broadcom.com>
2025-05-08 12:44:51 +02:00
..
mcp-spring-webflux fix: Mockito inline mocking for Java 21+ (#207) 2025-05-08 12:44:51 +02:00
mcp-spring-webmvc fix: Mockito inline mocking for Java 21+ (#207) 2025-05-08 12:44:51 +02:00