Skip to content

Commit

Permalink
Use Mockito as agent on Java 21+
Browse files Browse the repository at this point in the history
  • Loading branch information
acogoluegnes committed Oct 3, 2024
1 parent 8c22c6b commit 3106ad1
Showing 1 changed file with 24 additions and 2 deletions.
26 changes: 24 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
<maven.install.plugin.version>3.1.3</maven.install.plugin.version>
<maven.jar.plugin.version>3.4.2</maven.jar.plugin.version>
<buildnumber.plugin.version>3.2.1</buildnumber.plugin.version>
<maven-dependency-plugin.version>3.8.0</maven-dependency-plugin.version>
<maven.surefire.plugin.version>3.5.0</maven.surefire.plugin.version>
<maven.failsafe.plugin.version>3.5.0</maven.failsafe.plugin.version>
<build-helper-maven-plugin.version>3.6.0</build-helper-maven-plugin.version>
Expand Down Expand Up @@ -277,6 +278,19 @@
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>${maven-dependency-plugin.version}</version>
<executions>
<execution>
<goals>
<goal>properties</goal>
</goals>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
Expand Down Expand Up @@ -491,17 +505,25 @@
<mockito.version>4.11.0</mockito.version>
</properties>
</profile>
<profile>
<id>jvm-test-arguments-below-java-21</id>
<activation>
<jdk>[11,21)</jdk>
</activation>
<properties>
<test-arguments>-Xshare:off</test-arguments>
</properties>
</profile>
<profile>
<id>jvm-test-arguments-java-21-and-more</id>
<activation>
<jdk>[21,)</jdk>
</activation>
<properties>
<test-arguments>-XX:+EnableDynamicAgentLoading</test-arguments>
<test-arguments>-Xshare:off -javaagent:${org.mockito:mockito-core:jar}</test-arguments>
</properties>
</profile>


<profile>
<id>extensions</id>
<activation>
Expand Down

0 comments on commit 3106ad1

Please sign in to comment.