要在 maven pom 中添加什么依赖项才能将 powermock 与 mockito1 一起使用?

What dependency to add in maven pom for using powermock with mockito1?

Powermockito doc 显示要添加到 pom 中的以下依赖项。

<properties>
    <powermock.version>2.0.2</powermock.version>
</properties>
<dependencies>
   <dependency>
      <groupId>org.powermock</groupId>
      <artifactId>powermock-module-junit4</artifactId>
      <version>${powermock.version}</version>
      <scope>test</scope>
   </dependency>
   <dependency>
      <groupId>org.powermock</groupId>
      <artifactId>powermock-api-mockito</artifactId>
      <version>${powermock.version}</version>
      <scope>test</scope>
   </dependency>
</dependencies>

但是 2.0.2 版本没有 powermock-api-mockito。根据 supported versions powermockito 2.0 应该与 mockito 1 一起使用。10.x.

有人可以让我知道我必须在 maven pom 中添加什么依赖项才能使 powermock 2 与最新的 Mockito1 版本 (1.10.19) 一起工作吗?

已回答here

在此重新发布相关答案

This still needs to be changed. documentation is accurate under the supported versions further in the mockito support docs here:

https://github.com/powermock/powermock/wiki/Mockito#supported-versions So 2.0.2 needs to be changed to 1.7.4 for mockito1. at the top of the docs where you can find the pom configuration, it is noted that powermock2 does not support mockito1. Please change this.