Getting Undertow

There are a few ways to get Undertow.

Wildfly

Since version 8.0 Undertow has been the web server component of Wildfly. If you are using Wildfly then you already have Undertow.

Maven

Undertow is built using maven, and is synced to maven central.

As of Undertow 2.4, the Jakarta EE implementations (Servlet and WebSocket) have been extracted from Undertow into a separate project, Undertow EE, published under the io.undertow.ee groupId. Undertow core itself (the non blocking handlers and the low level web socket API) remains under the io.undertow groupId.

Core

io.undertow:undertow-core - Undertow core, which provides support for non blocking handlers and the low level web socket API.

Servlet

io.undertow.ee:undertow-servlet - Jakarta Servlet support (provided by the Undertow EE project).

WebSockets

io.undertow.ee:undertow-websockets - Jakarta WebSocket support (provided by the Undertow EE project). Formerly published as undertow-websockets-jsr under io.undertow.

The Undertow EE project is versioned independently of Undertow, and there are two active lines, each targeting a different Jakarta EE version. Both run on top of Undertow 2.4.x and require JDK 17:

Undertow EE Jakarta EE Jakarta Servlet Jakarta WebSocket

1.0.x

Jakarta EE 10

6.0

2.1

2.0.x

Jakarta EE 11

6.1

2.2

In order to use Undertow in your maven projects just include the following section in your pom.xml, setting the undertow.version property to the version of Undertow you wish to use, and the undertow.ee.version property to the version of Undertow EE you wish to use. Only the core artifact is required, if you are not using Servlet or Jakarta WebSocket then those artifacts are not required.

<dependency>
        <groupId>io.undertow</groupId>
        <artifactId>undertow-core</artifactId>
        <version>${undertow.version}</version>
</dependency>
<dependency>
        <groupId>io.undertow.ee</groupId>
        <artifactId>undertow-servlet</artifactId>
        <version>${undertow.ee.version}</version>
</dependency>
<dependency>
        <groupId>io.undertow.ee</groupId>
        <artifactId>undertow-websockets</artifactId>
        <version>${undertow.ee.version}</version>
</dependency>

Direct Download

Undertow can also be directly downloaded from the maven repository.

Undertow depends on XNIO and JBoss Logging, which will need to be downloaded as well.

Build it yourself

In order to get the most up to date code you can build Undertow yourself.

Prerequisites

  • JDK 17 or higher

  • Maven 3.1

  • git

Building Undertow is easy, just follow these steps:

Configure Maven

Follow the instructions here to configure Maven to use the JBoss Maven repository.

Clone the git repo

git clone https://github.com/undertow-io/undertow.git

Build Undertow

cd undertow && mvn install

The build should run all tests and complete without errors.

If you attempt to build with -Dmaven.test.skip=true for your initial build the build will fail, as the core test jar will not be built and the Servlet module has a test scoped dependency on this jar. Either use -DskipTests, or just let the tests run the first time.