Skip to content

Commit 441f0db

Browse files
authored
Merge pull request #323 from groovy/mockito-agent
Add Mockito agent jar to avoid warning with Java 21+
2 parents 6c7ebc2 + ffbf2cd commit 441f0db

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

pom.xml

+10
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,13 @@
218218
<groupId>org.apache.maven.plugins</groupId>
219219
<artifactId>maven-dependency-plugin</artifactId>
220220
<version>${dependencyPluginVersion}</version>
221+
<executions>
222+
<execution>
223+
<goals>
224+
<goal>properties</goal>
225+
</goals>
226+
</execution>
227+
</executions>
221228
</plugin>
222229
<plugin>
223230
<groupId>org.apache.maven.plugins</groupId>
@@ -303,6 +310,9 @@
303310
<groupId>org.apache.maven.plugins</groupId>
304311
<artifactId>maven-surefire-plugin</artifactId>
305312
<version>${surefirePluginVersion}</version>
313+
<configuration>
314+
<argLine>@{argLine} -javaagent:${org.mockito:mockito-core:jar}</argLine>
315+
</configuration>
306316
</plugin>
307317
<plugin>
308318
<groupId>org.jacoco</groupId>

0 commit comments

Comments
 (0)