# What Tools Are Needed to Develop for Jenkins: Complete Setup Guide

> Discover the essential tools for Jenkins development. Learn about JDK, Maven, Node.js, and IDE setup for a successful Jenkins plugin or core contribution.

- Repository: [Jenkins/jenkins](https://github.com/jenkinsci/jenkins)
- Tags: getting-started
- Published: 2026-08-01

---

**Developing for Jenkins requires JDK 21 (or JDK 25), Apache Maven 3.9.6+, Node.js LTS with Yarn (via Corepack), and a Maven-compatible IDE.**

The `jenkinsci/jenkins` repository is a large Java-based automation server with a modern frontend built using Node.js. To compile the core, bundle the web UI assets, and run the full test suite, you must install a specific toolchain that spans both JVM and JavaScript ecosystems.

## Core Java Development Tools

Jenkins core is written in Java 21, making the correct JDK installation the foundation of your environment.

### Java Development Kit (JDK)

You need **JDK 21** (or **JDK 25**) from Eclipse Temurin or OpenJDK. The build system uses the compiler from this JDK to compile all Java sources in the `core/`, `war/`, and `bom/` modules. According to the [`CONTRIBUTING.md`](https://github.com/jenkinsci/jenkins/blob/main/CONTRIBUTING.md) file, this is a hard requirement—the Maven [`pom.xml`](https://github.com/jenkinsci/jenkins/blob/main/pom.xml) enforces the Java version, and compilation will fail if you use an older JDK.

### Apache Maven Build System

**Apache Maven 3.9.6+** orchestrates the entire build. The top-level [`pom.xml`](https://github.com/jenkinsci/jenkins/blob/main/pom.xml) declares the module hierarchy, plugin versions, and dependency management. All artifacts—including the `jenkins.war` file—are assembled using Maven commands. You will use Maven to compile code, run tests, enforce code style, and launch local instances.

## Frontend Development Tools

While the backend runs on the JVM, the modern Jenkins UI requires a Node.js toolchain to compile SCSS, JSX, and bundle assets with Webpack.

### Node.js and Yarn Package Manager

You need **Node.js** (any recent LTS version) and **Yarn** (installed via Corepack). The repository includes a [`package.json`](https://github.com/jenkinsci/jenkins/blob/main/package.json) and `yarn.lock` file in the root directory that define JavaScript dependencies. Corepack can enable Yarn automatically when you run `corepack enable` from the repository root. After enabling, add the bundled binaries to your `PATH`:

```bash
export PATH=$PWD/node:$PWD/node/node_modules/corepack/shims:$PATH

```

Then install dependencies and start the Webpack dev server:

```bash
yarn install
yarn start

```

This launches the frontend build pipeline that compiles sources from `src/main/scss/` and other frontend directories.

## Code Quality and Testing Tools

Jenkins enforces strict code-style consistency through automated static analysis. Failures in these checks break the build.

### Static Analysis and Formatting

For Java sources, **Spotless** and **Checkstyle** are invoked via Maven. Run `mvn spotless:apply` to automatically format Java code according to the project's style guide.

For JavaScript and SCSS, the toolchain includes **ESLint**, **Prettier**, and **Stylelint**. Use `yarn lint` to check for violations or `yarn lint:fix` to auto-correct them. These tools are configured in [`package.json`](https://github.com/jenkinsci/jenkins/blob/main/package.json) and run as part of the Maven lifecycle.

### Testing Frameworks

The project uses **JUnit** for unit tests, executed by the **Maven Surefire and Failsafe plugins**. For functional and acceptance testing, Jenkins relies on the **Acceptance Test Harness (ATH)**, a separate repository that runs integration tests against a live Jenkins instance.

Run unit tests only with:

```bash
mvn test -Plight-test

```

Run the full suite including functional tests with:

```bash
mvn verify -Pall-tests

```

## Optional but Recommended Tools

While not strictly required for compilation, these tools streamline the development workflow.

### Docker for Integration Testing

**Docker** is highly recommended for running integration tests or quickly launching a production-like instance. The official `jenkins/jenkins` image lets you test your built WAR file in a clean environment without configuring a local servlet container.

### IDE Configuration

Any IDE that imports Maven projects works, including **IntelliJ IDEA**, **Eclipse**, or **VS Code**. These provide source navigation, debugging, and Maven integration. Since the project structure is defined in [`pom.xml`](https://github.com/jenkinsci/jenkins/blob/main/pom.xml), importing the repository root automatically configures the module dependencies between `core/`, `plugins/`, and `war/`.

## Step-by-Step Development Workflow

Follow these steps to build and run Jenkins locally:

1. **Install the JDK and Maven** (e.g., using SDKMAN: `sdk install java 21.0.2-tem` and `sdk install maven`).

2. **Clone the repository** and build the WAR file quickly:
   ```bash
   mvn -am -pl war,bom -Pquick-build clean install
   ```

3. **Start a local Jenkins instance** using Jetty with the required JVM flags:
   ```bash
   MAVEN_OPTS='--add-opens java.base/java.lang=ALL-UNNAMED \
               --add-opens java.base/java.io=ALL-UNNAMED \
               --add-opens java.base/java.util=ALL-UNNAMED' \
   mvn -pl war jetty:run
   ```

4. **Set up the frontend** in a separate terminal:
   ```bash
   corepack enable
   export PATH=$PWD/node:$PWD/node/node_modules/corepack/shims:$PATH
   yarn
   yarn start
   ```

5. **Run static analysis** before committing:
   ```bash
   mvn spotless:apply
   yarn lint:fix
   ```

6. **Execute tests** using the appropriate profile:
   ```bash
   mvn test -Plight-test        # Fast unit tests

   mvn verify -Psmoke-test      # Unit + subset of functional tests

   ```

## Key Configuration Files

Understanding these files helps you navigate the build system:

- **[`pom.xml`](https://github.com/jenkinsci/jenkins/blob/main/pom.xml)** – Top-level Maven configuration declaring Java version, plugin versions, and the multi-module hierarchy.
- **[`war/pom.xml`](https://github.com/jenkinsci/jenkins/blob/main/war/pom.xml)** – Specific module that packages the `jenkins.war` artifact and configures the Jetty plugin for local execution.
- **[`package.json`](https://github.com/jenkinsci/jenkins/blob/main/package.json)** / **`yarn.lock`** – Define Node.js dependencies for the frontend build, including Webpack and SCSS compilers.
- **`src/main/scss/`** – Directory containing SCSS source files compiled into the Jenkins UI stylesheet.
- **[`CONTRIBUTING.md`](https://github.com/jenkinsci/jenkins/blob/main/CONTRIBUTING.md)** – Comprehensive guide covering environment setup, build commands, and contribution guidelines.
- **`Jenkinsfile`** – CI pipeline definition running Maven builds, linting, and tests on every pull request.

## Summary

- **JDK 21** (or 25) and **Maven 3.9.6+** are mandatory for compiling Jenkins core.
- **Node.js LTS** and **Yarn** (via Corepack) are required to build the frontend assets defined in [`package.json`](https://github.com/jenkinsci/jenkins/blob/main/package.json).
- **Spotless**, **ESLint**, and **Prettier** enforce code style and must pass before merging.
- **JUnit** and the **Acceptance Test Harness** handle unit and integration testing.
- The **[`war/pom.xml`](https://github.com/jenkinsci/jenkins/blob/main/war/pom.xml)** module lets you run Jenkins locally using `mvn jetty:run` with specific `--add-opens` JVM flags.
- Docker and Maven-compatible IDEs are optional but recommended for efficient development.

## Frequently Asked Questions

### Can I use JDK 17 to develop for Jenkins?

No. As specified in the root [`pom.xml`](https://github.com/jenkinsci/jenkins/blob/main/pom.xml) and [`CONTRIBUTING.md`](https://github.com/jenkinsci/jenkins/blob/main/CONTRIBUTING.md), Jenkins core requires **JDK 21** or newer. The Maven compiler plugin is configured to target Java 21, and attempting to build with JDK 17 will result in compilation errors due to language features and API requirements.

### Why does Jenkins require Node.js and Yarn if it is a Java project?

Jenkins includes a modern web UI built with JavaScript, SCSS, and JSX that requires compilation. The frontend assets in `src/main/scss/` and related directories are bundled using **Webpack**, which runs on **Node.js**. **Yarn** manages the JavaScript dependencies listed in [`package.json`](https://github.com/jenkinsci/jenkins/blob/main/package.json), making these tools essential for a complete build even if you only modify Java code.

### How do I run only the unit tests without starting the full acceptance test suite?

Use the Maven profile `-Plight-test`. Run `mvn test -Plight-test` to execute only the JUnit unit tests. For a broader but not complete suite, use `-Psmoke-test`. The full acceptance tests require the **Acceptance Test Harness (ATH)** and significantly more time and resources to complete.

### What MAVEN_OPTS are required to run Jenkins locally?

When running `mvn -pl war jetty:run`, you must provide specific `--add-opens` flags to allow Jenkins access to internal Java modules. The required flags are:

```

--add-opens java.base/java.lang=ALL-UNNAMED
--add-opens java.base/java.io=ALL-UNNAMED
--add-opens java.base/java.util=ALL-UNNAMED

```

Without these JVM options, the embedded Jetty server will fail to start due to Java Platform Module System (JPMS) restrictions.