--- title: Maven layout: page pageOrder: 6 section: 'Where' subsection: true sitemap: priority: 0.6 changefreq: 'monthly' lastmod: 2026-05-19T08:00:00+01:00 ---

## Maven Central

MockServer publishes the following artifacts to Maven Central under the `org.mock-server` groupId. Each comes in two forms:

- `-no-dependencies` form (RECOMMENDED) — the same code with every transitive dependency bundled into the jar and its packages relocated under `shaded_package.*`. This form declares zero transitive dependencies in its POM, so it cannot clash with versions of Netty, Jackson, Guava, Bouncy Castle, etc. that your project already uses, and it removes the noise from CVE scanners flagging unused transitive dependencies.
- Plain form — the unshaded jar with transitive dependencies declared in the POM. Use this only when you need to override a specific transitive version yourself.

Migrating from 5.15.x or earlier: the `<classifier>shaded</classifier>` form was removed in 6.0.0. Replace it with the corresponding `-no-dependencies` artifactId (e.g. `mockserver-netty` with `<classifier>shaded</classifier>` → `mockserver-netty-no-dependencies`). The `-no-dependencies` artifacts have always been the preferred form and produce the same bytes.

### Artifact summary

Use case | Recommended artifactId
--- | ---
Embed a MockServer JVM instance in your tests or app | `mockserver-netty-no-dependencies`
Talk to a running MockServer from Java code | `mockserver-client-java-no-dependencies`
JUnit 4 `@Rule` that starts MockServer per-test | `mockserver-junit-rule-no-dependencies`
JUnit 5 extension that starts MockServer per-test | `mockserver-junit-jupiter-no-dependencies`
Spring `TestExecutionListener` integration | `mockserver-spring-test-listener-no-dependencies`
Shared integration-test helpers | `mockserver-integration-testing-no-dependencies`
Start/stop MockServer from a Maven build | `mockserver-maven-plugin`
Deploy MockServer to a servlet container (mock mode) | `mockserver-war`
Deploy MockServer to a servlet container (proxy mode) | `mockserver-proxy-war`
Run MockServer from a single executable jar | `mockserver-netty:jar-with-dependencies`

### mockserver-netty — embedded server

The Netty-based HTTP(S) server for mocking and proxying. Use this when you want a MockServer instance running inside your test JVM or application.

Maven:

    <dependency>
        <groupId>org.mock-server</groupId>
        <artifactId>mockserver-netty-no-dependencies</artifactId>
        <version>{{ site.mockserver_version }}</version>
        <scope>test</scope>
    </dependency>

Gradle:

    testImplementation("org.mock-server:mockserver-netty-no-dependencies:{{ site.mockserver_version }}")

Variants:

- `org.mock-server:mockserver-netty-no-dependencies:{{ site.mockserver_version }}` — shaded, zero transitive dependencies (recommended)
- `org.mock-server:mockserver-netty:{{ site.mockserver_version }}` — unshaded, transitive dependencies declared in the POM
- `org.mock-server:mockserver-netty:{{ site.mockserver_version }}:jar-with-dependencies` — single executable jar (for running MockServer from the command line via `java -jar`)

### mockserver-client-java — Java client

The Java client that talks to a running MockServer instance (either a local `ClientAndServer` or a remote one).

    <dependency>
        <groupId>org.mock-server</groupId>
        <artifactId>mockserver-client-java-no-dependencies</artifactId>
        <version>{{ site.mockserver_version }}</version>
        <scope>test</scope>
    </dependency>

Variants:

- `org.mock-server:mockserver-client-java-no-dependencies:{{ site.mockserver_version }}` — shaded, zero transitive dependencies (recommended)
- `org.mock-server:mockserver-client-java:{{ site.mockserver_version }}` — unshaded

### mockserver-junit-rule — JUnit 4 integration

A JUnit 4 `@Rule` that starts MockServer on a free port before each test and stops it after.

    <dependency>
        <groupId>org.mock-server</groupId>
        <artifactId>mockserver-junit-rule-no-dependencies</artifactId>
        <version>{{ site.mockserver_version }}</version>
        <scope>test</scope>
    </dependency>

Variants:

- `org.mock-server:mockserver-junit-rule-no-dependencies:{{ site.mockserver_version }}` (recommended)
- `org.mock-server:mockserver-junit-rule:{{ site.mockserver_version }}`

### mockserver-junit-jupiter — JUnit 5 integration

A JUnit 5 test extension that starts MockServer for tests annotated with `@MockServerSettings` / `@MockServerTest`.

    <dependency>
        <groupId>org.mock-server</groupId>
        <artifactId>mockserver-junit-jupiter-no-dependencies</artifactId>
        <version>{{ site.mockserver_version }}</version>
        <scope>test</scope>
    </dependency>

Variants:

- `org.mock-server:mockserver-junit-jupiter-no-dependencies:{{ site.mockserver_version }}` (recommended)
- `org.mock-server:mockserver-junit-jupiter:{{ site.mockserver_version }}`

### mockserver-spring-test-listener — Spring integration

A Spring `TestExecutionListener` that starts MockServer for tests in Spring projects.

    <dependency>
        <groupId>org.mock-server</groupId>
        <artifactId>mockserver-spring-test-listener-no-dependencies</artifactId>
        <version>{{ site.mockserver_version }}</version>
        <scope>test</scope>
    </dependency>

Variants:

- `org.mock-server:mockserver-spring-test-listener-no-dependencies:{{ site.mockserver_version }}` (recommended)
- `org.mock-server:mockserver-spring-test-listener:{{ site.mockserver_version }}`

### mockserver-integration-testing — shared test helpers

A library of integration-test helpers (assertion utilities, fixtures, shared base classes) used to test MockServer itself and that can be reused in downstream test suites.

    <dependency>
        <groupId>org.mock-server</groupId>
        <artifactId>mockserver-integration-testing-no-dependencies</artifactId>
        <version>{{ site.mockserver_version }}</version>
        <scope>test</scope>
    </dependency>

Variants:

- `org.mock-server:mockserver-integration-testing-no-dependencies:{{ site.mockserver_version }}` (recommended)
- `org.mock-server:mockserver-integration-testing:{{ site.mockserver_version }}`

### mockserver-maven-plugin — Maven plugin

A Maven plugin to start, stop, and fork MockServer as part of the build lifecycle — useful for binding MockServer to `pre-integration-test` / `post-integration-test` phases.

    <plugin>
        <groupId>org.mock-server</groupId>
        <artifactId>mockserver-maven-plugin</artifactId>
        <version>{{ site.mockserver_version }}</version>
        <configuration>
            <serverPort>1080</serverPort>
            <pipeLogToConsole>true</pipeLogToConsole>
        </configuration>
    </plugin>

### mockserver-war / mockserver-proxy-war — servlet WARs

Deployable WAR archives for hosting MockServer (in mock mode or proxy mode) on any servlet container.

- mockserver-war — download .war
- mockserver-proxy-war — download .war

## Sonatype SNAPSHOT

Pre-release SNAPSHOT builds are published to the Sonatype Central Portal snapshot repository at https://central.sonatype.com/repository/maven-snapshots/org/mock-server/.

### Maven

Add the snapshot repository to your `~/.m2/settings.xml` (preferred) or to the project `pom.xml`:

    <profile>
        <id>sonatype</id>
        <activation>
            <activeByDefault>true</activeByDefault>
        </activation>
        <repositories>
            <repository>
                <id>central-portal-snapshots</id>
                <name>Sonatype Central Portal snapshots</name>
                <url>https://central.sonatype.com/repository/maven-snapshots/</url>
                <releases>
                    <enabled>false</enabled>
                </releases>
                <snapshots>
                    <enabled>true</enabled>
                </snapshots>
            </repository>
        </repositories>
    </profile>

Then reference the SNAPSHOT version directly. The `-no-dependencies` artifacts are recommended here too:

    <dependency>
        <groupId>org.mock-server</groupId>
        <artifactId>mockserver-netty-no-dependencies</artifactId>
        <version>{{ site.mockserver_snapshot_version }}</version>
    </dependency>

### Gradle

    repositories {
        maven { url "https://central.sonatype.com/repository/maven-snapshots/" }
    }

    dependencies {
        testImplementation("org.mock-server:mockserver-netty-no-dependencies:{{ site.mockserver_snapshot_version }}")
    }