This is an automated email from the ASF dual-hosted git repository.

khmarbaise pushed a commit to branch MNG-7766
in repository https://gitbox.apache.org/repos/asf/maven.git

commit d2a8306cf9755c6e139a3ba20e78a4d0c0fc5e3c
Author: Karl Heinz Marbaise <[email protected]>
AuthorDate: Sat Apr 15 18:43:30 2023 +0200

    [MNG-7766] - Migrate to use mockito-bom
---
 .../maven/toolchain/DefaultToolchainManagerTest.java      |  2 +-
 pom.xml                                                   | 15 ++++++++-------
 2 files changed, 9 insertions(+), 8 deletions(-)

diff --git 
a/maven-core/src/test/java/org/apache/maven/toolchain/DefaultToolchainManagerTest.java
 
b/maven-core/src/test/java/org/apache/maven/toolchain/DefaultToolchainManagerTest.java
index 9bb2568fc..6f003ef9a 100644
--- 
a/maven-core/src/test/java/org/apache/maven/toolchain/DefaultToolchainManagerTest.java
+++ 
b/maven-core/src/test/java/org/apache/maven/toolchain/DefaultToolchainManagerTest.java
@@ -37,7 +37,7 @@ import org.mockito.MockitoAnnotations;
 import org.slf4j.Logger;
 
 import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.mockito.Matchers.isA;
+import static org.mockito.ArgumentMatchers.isA;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
diff --git a/pom.xml b/pom.xml
index 836600abb..cc8d2b177 100644
--- a/pom.xml
+++ b/pom.xml
@@ -154,7 +154,7 @@ under the License.
     <commonsIoVersion>2.11.0</commonsIoVersion>
     <commonsLangVersion>3.12.0</commonsLangVersion>
     <junitVersion>5.9.1</junitVersion>
-    <mockitoVersion>3.2.0</mockitoVersion>
+    <mockitoVersion>4.11.0</mockitoVersion>
     <plexusVersion>2.1.0</plexusVersion>
     <plexusInterpolationVersion>1.26</plexusInterpolationVersion>
     <plexusUtilsVersion>4.0.0-alpha-6-SNAPSHOT</plexusUtilsVersion>
@@ -417,12 +417,6 @@ under the License.
         <artifactId>plexus-cipher</artifactId>
         <version>${cipherVersion}</version>
       </dependency>
-      <dependency>
-        <groupId>org.mockito</groupId>
-        <artifactId>mockito-core</artifactId>
-        <version>${mockitoVersion}</version>
-        <scope>test</scope>
-      </dependency>
       <dependency>
         <groupId>org.xmlunit</groupId>
         <artifactId>xmlunit-assertj</artifactId>
@@ -466,6 +460,13 @@ under the License.
         <type>pom</type>
         <scope>import</scope>
       </dependency>
+      <dependency>
+        <groupId>org.mockito</groupId>
+        <artifactId>mockito-bom</artifactId>
+        <version>${mockitoVersion}</version>
+        <type>pom</type>
+        <scope>import</scope>
+      </dependency>
     </dependencies>
     <!--bootstrap-start-comment-->
   </dependencyManagement>

Reply via email to