Skip to content

Commit 8b50c98

Browse files
committed
Add Mockito as agent for Java 21+
1 parent b541a11 commit 8b50c98

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

pom.xml

+15-1
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@
7373
<micrometer-docs-generator.version>1.0.4</micrometer-docs-generator.version>
7474
<maven.compiler.plugin.version>3.13.0</maven.compiler.plugin.version>
7575
<maven-surefire-plugin.version>3.5.0</maven-surefire-plugin.version>
76+
<maven-dependency-plugin.version>3.8.0</maven-dependency-plugin.version>
7677
<checksum.maven.plugin.version>1.11</checksum.maven.plugin.version>
7778
<maven.gpg.plugin.version>3.2.7</maven.gpg.plugin.version>
7879
<buildnumber.plugin.version>3.2.1</buildnumber.plugin.version>
@@ -356,6 +357,19 @@
356357
</configuration>
357358
</plugin>
358359

360+
<plugin>
361+
<groupId>org.apache.maven.plugins</groupId>
362+
<artifactId>maven-dependency-plugin</artifactId>
363+
<version>${maven-dependency-plugin.version}</version>
364+
<executions>
365+
<execution>
366+
<goals>
367+
<goal>properties</goal>
368+
</goals>
369+
</execution>
370+
</executions>
371+
</plugin>
372+
359373
<plugin>
360374
<artifactId>maven-surefire-plugin</artifactId>
361375
<version>${maven-surefire-plugin.version}</version>
@@ -689,7 +703,7 @@
689703
<jdk>[21,)</jdk>
690704
</activation>
691705
<properties>
692-
<test-arguments>-Xshare:off -XX:+EnableDynamicAgentLoading</test-arguments>
706+
<test-arguments>-Xshare:off -javaagent:${org.mockito:mockito-core:jar}</test-arguments>
693707
</properties>
694708
</profile>
695709

0 commit comments

Comments
 (0)