Skip to content

Commit

Permalink
Add Mockito agent jar to avoid warning with Java 21+
Browse files Browse the repository at this point in the history
  • Loading branch information
keeganwitt committed Jan 1, 2025
1 parent 6c7ebc2 commit a0a40cf
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<jacocoPluginVersion>0.8.12</jacocoPluginVersion>
<javadocPluginVersion>3.11.2</javadocPluginVersion>
<shortJavaVersion>8</shortJavaVersion>
<mockitoVersion>5.14.2</mockitoVersion>
<!-- these are properties so integration tests can use them -->
<javaVersion>1.${shortJavaVersion}</javaVersion>
<dependencyPluginVersion>3.8.1</dependencyPluginVersion>
Expand Down Expand Up @@ -141,7 +142,7 @@
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>5.14.2</version>
<version>${mockitoVersion}</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -218,6 +219,13 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>${dependencyPluginVersion}</version>
<executions>
<execution>
<goals>
<goal>properties</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down Expand Up @@ -303,6 +311,9 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${surefirePluginVersion}</version>
<configuration>
<argLine>-javaagent:${settings.localRepository}/org/mockito/mockito-core/${mockitoVersion}/mockito-core-${mockitoVersion}.jar</argLine>
</configuration>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
Expand Down

0 comments on commit a0a40cf

Please sign in to comment.