Download and Installation

WARNING: This document is for an old WireMock 2.x baseline. See the documentation for the current WireMock 3.x baseline here

Download options #

WireMock Java is distributed in two flavours - a standard JAR containing just WireMock, and a standalone uber 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).

Test dependencies #

Maven
Gradle
Kotlin
SBT
  • Maven
  • Gradle Groovy
  • Gradle Kotlin
  • Scala SBT

Add the following to your project's pom.xml dependencies:

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

Then follow the next steps for JUnit 5+ or plain Java.

Add the following to your project's build.gradle:

testImplementation "com.github.tomakehurst:wiremock-jre8:2.35.1"

Then follow the next steps for JUnit 5+ or plain Java.

Add the following to your project's build.gradle.kts:

testImplementation("com.github.tomakehurst:wiremock-jre8:2.35.1")

Then follow the next steps for JUnit 5+ or plain Java.

Add the following to your project’s build.sbt:

libraryDependencies +=
  "com.github.tomakehurst" % "wiremock-jre8" % "2.35.1" % Test

Download the latest standalone JAR then run the following in a terminal:

java -jar wiremock-jre8-standalone-2.35.1.jar

Learn more in the running standalone guide.

Run the following in a terminal:

docker run -it --rm \
  -p 8080:8080 \
  --name wiremock \
  wiremock/wiremock:2.35.1

Learn more in the Docker guide.

Standalone Service #

Maven #

<dependency>
    <groupId>org.wiremock</groupId>
    <artifactId>wiremock-standalone</artifactId>
    <version></version>
    <scope>test</scope>
</dependency>

Gradle #

testImplementation "org.wiremock:wiremock-standalone:"

WireMock 2.x Stable #

Docker #

Run the following in a terminal:

docker run -it --rm \
  -p 8080:8080 \
  --name wiremock \
  wiremock/wiremock:2.35.1

Learn more in the Docker guide.

Maven - stable #

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

Gradle - stable #

testImplementation "com.github.tomakehurst:wiremock-jre8-standalone:2.35.1"

Direct download #

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