Download and Installation

WireMock is distributed in two flavours - a standard JAR containing just WireMock, and a standalone fat JAR containing WireMock plus all its dependencies.

Most of the standalone JAR’s dependencies are shaded i.e. they are hidden in alternative packages. This allows WireMock to be used in projects with conflicting versions of its dependencies. The standalone JAR is also runnable (see Running as a Standalone Process).

Additionally, versions of these JARs are distributed for both Java 7 and Java 8+.

The Java 7 distribution is aimed primarily at Android developers and enterprise Java teams still using JRE7. Some of its dependencies are not set to the latest versions e.g. Jetty 9.2.x is used, as this is the last minor version to retain Java 7 compatibility.

The Java 8+ build endeavours to track the latest version of all its major dependencies. This is usually the version you should choose by default.

Maven dependencies

Java 7:

<dependency>
    <groupId>com.github.tomakehurst</groupId>
    <artifactId>wiremock</artifactId>
    <version>2.23.2</version>
    <scope>test</scope>
</dependency>

Java 7 standalone:

<dependency>
    <groupId>com.github.tomakehurst</groupId>
    <artifactId>wiremock-standalone</artifactId>
    <version>2.23.2</version>
    <scope>test</scope>
</dependency>

Java 8:

<dependency>
    <groupId>com.github.tomakehurst</groupId>
    <artifactId>wiremock-jre8</artifactId>
    <version>2.23.2</version>
    <scope>test</scope>
</dependency>

Java 8 standalone:

<dependency>
    <groupId>com.github.tomakehurst</groupId>
    <artifactId>wiremock-jre8-standalone</artifactId>
    <version>2.23.2</version>
    <scope>test</scope>
</dependency>

Gradle dependencies

Java 7:

testCompile "com.github.tomakehurst:wiremock:2.23.2"

Java 7 standalone:

testCompile "com.github.tomakehurst:wiremock-standalone:2.23.2"

Java 8:

testCompile "com.github.tomakehurst:wiremock-jre8:2.23.2"

Java 8 standalone:

testCompile "com.github.tomakehurst:wiremock-jre8-standalone:2.23.2"

Direct download

If you want to run WireMock as a standalone process you can download the standalone JAR from here.