Skip to content

Commit

Permalink
Explicitly use mockito agent
Browse files Browse the repository at this point in the history
  • Loading branch information
Jikoo committed Dec 18, 2024
1 parent 8a2c982 commit 92b5a19
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<maven.compiler.source>21</maven.compiler.source>
<maven.compiler.target>21</maven.compiler.target>
<!-- Required so ${argLine} can be evaluated and edited by plugins (i.e. jacoco) before surefire -->
<argLine/>
</properties>

<profiles>
Expand Down Expand Up @@ -138,12 +140,23 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.13.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>properties</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.5.2</version>
<configuration>
<argLine>-XX:+EnableDynamicAgentLoading -Xshare:off</argLine>
<argLine>@{argLine} -javaagent:${org.mockito:mockito-core:jar} -Xshare:off</argLine>
<!-- Github Actions offers 2 cores for Linux. -->
<forkCount>2</forkCount>
<!-- Bukkit initializes so many static objects that we cannot reasonably reuse forks. -->
Expand Down Expand Up @@ -176,6 +189,9 @@
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
</plugin>
Expand Down

0 comments on commit 92b5a19

Please sign in to comment.