0

When I add the Powermock depenencies to my maven project I get the following error message:

enter image description here

The project has the following dependencies:

    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>${junit.version}</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.mockito</groupId>
        <artifactId>mockito-all</artifactId>
        <version>${mockito.version}</version>
    </dependency>
    <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>

and the following version numbers:

    <junit.version>4.11</junit.version>
    <mockito.version>1.9.5</mockito.version>
    <powermock.version>1.6.2</powermock.version>

What is happening here?

Bastian
  • 4,638
  • 6
  • 36
  • 55

1 Answers1

0

You should use mockito-core in Maven builds. mockito-all is for people using legacy build systems.

The latest version of mockito 1.x series is 1.10.19 so try that.

artbristol
  • 32,010
  • 5
  • 70
  • 103