
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.
note
The Java 7 version is now deprecated in the 2.x line and version 2.27.2 is the last release available. It’s strongly recommended that you use the Java 8 releases if possible.
3.x beta
Maven:
<dependency>
<groupId>com.github.tomakehurst</groupId>
<artifactId>wiremock</artifactId>
<version>3.0.0-beta-2</version>
<scope>test</scope>
</dependency>
Maven (standalone):
<dependency>
<groupId>com.github.tomakehurst</groupId>
<artifactId>wiremock-standalone</artifactId>
<version>3.0.0-beta-2</version>
<scope>test</scope>
</dependency>
Gradle:
testImplementation "com.github.tomakehurst:wiremock:3.0.0-beta-2"
Gradle (standalone):
testImplementation "com.github.tomakehurst:wiremock-standalone:3.0.0-beta-2"
Stable
Maven:
<dependency>
<groupId>com.github.tomakehurst</groupId>
<artifactId>wiremock-jre8</artifactId>
<version>2.35.0</version>
<scope>test</scope>
</dependency>
Maven (standalone):
<dependency>
<groupId>com.github.tomakehurst</groupId>
<artifactId>wiremock-jre8-standalone</artifactId>
<version>2.35.0</version>
<scope>test</scope>
</dependency>
Gradle:
testImplementation "com.github.tomakehurst:wiremock-jre8:2.35.0"
Gradle (standalone):
testImplementation "com.github.tomakehurst:wiremock-jre8-standalone:2.35.0"
Java 7 (deprecated)
Maven:
<dependency>
<groupId>com.github.tomakehurst</groupId>
<artifactId>wiremock</artifactId>
<version>2.27.2</version>
<scope>test</scope>
</dependency>
Maven (standalone):
<dependency>
<groupId>com.github.tomakehurst</groupId>
<artifactId>wiremock-standalone</artifactId>
<version>2.27.2</version>
<scope>test</scope>
</dependency>
Gradle:
testImplementation "com.github.tomakehurst:wiremock:2.27.2"
Gradle (standalone):
testImplementation "com.github.tomakehurst:wiremock-standalone:2.27.2"
Direct download
If you want to run WireMock as a standalone process you can download the standalone JAR from here