IDE Configuration

This page provides setup instructions for popular Java Integrated Development Environments (IDEs) and editors used when developing Jenkins core and plugins.

Prerequisites & JDK Configuration

Ensure that your local Java Development Kit (JDK) matches the version supported by Jenkins. Refer to the Jenkins Java support policy for details on supported Java runtimes (such as Java 21 and Java 25).

IntelliJ IDEA

IntelliJ IDEA is the most widely used IDE for Jenkins core and plugin development.

Importing a Project

  1. Open IntelliJ IDEA and select Open (or File > Open).

  2. Select the root directory containing the pom.xml of Jenkins core or your plugin.

  3. IntelliJ IDEA will automatically detect and import it as a Maven project.

  4. Ensure the Project SDK under File > Project Structure > Project is set to a supported Java version (Java 21 or Java 25).

Annotation Processing

Jenkins uses annotation processors (such as Stapler and SezPoz) to generate index files and code bindings (for example @Extension and @Exported).

  1. Go to Settings/Preferences > Build, Execution, Deployment > Compiler > Annotation Processors.

  2. Check Enable annotation processing.

  3. Select Obtain processors from project classpath.

Jenkins Development Support Plugin

The Jenkins Development Support plugin (source code on GitHub) enhances IntelliJ IDEA for Jenkins development:

  • Jelly tag navigation: Press Cmd/Ctrl+B on Jelly tags to jump to tag definitions.

  • Taglib autocompletion: Auto-completes attributes and elements for Stapler/Jelly tag libraries.

  • JEXL validation: Syntax checking for JEXL expressions embedded in Jelly views.

  • Stapler view navigation: Jump between Java classes and corresponding Stapler Jelly views (Cmd/Ctrl+Shift+P).

  • i18n helper: Refactor string literals into Stapler message resources.

Eclipse

Eclipse IDE supports Jenkins development through its Maven integration (m2e).

Importing a Project

  1. Open Eclipse and navigate to File > Import…​.

  2. Select Maven > Existing Maven Projects and click Next.

  3. Browse to the directory containing your project’s pom.xml and complete the import wizard.

JDK Configuration

  1. Open Window > Preferences > Java > Installed JREs.

  2. Ensure a supported JDK (Java 21 or Java 25) is registered and selected.

  3. Under Java > Compiler, verify the compiler compliance level matches your JDK version.

Annotation Processing (m2e-apt)

Jenkins requires annotation processing to generate @Extension registries during compilation.

  1. Open Window > Preferences > Maven > Annotation Processing (or install the m2e-apt plugin if not present).

  2. Select Automatically configure JDT APT.

  3. Alternatively, enable Annotation Processing per-project under Project Properties > Java Compiler > Annotation Processing.

Running and Debugging

To launch or debug a plugin in Jenkins:

  1. Right-click the project in Project Explorer and choose Run As > Maven build…​.

  2. Set Goals to hpi:run.

  3. To debug, choose Debug As > Maven build…​ or launch Maven in debug mode (mvnDebug hpi:run) and attach an Eclipse Remote Java Application debugger to port 8000.

Visual Studio Code

VS Code can be configured for Jenkins development using Java extension packs.

Install the Extension Pack for Java which includes language support, Maven integration, and debugger tools.

Java Runtime Configuration

Ensure that the Java JDK configured in VS Code matches a supported Jenkins version. Refer to the Jenkins Java support policy and VS Code Java configuration documentation for details.

Debugging Configuration

Create the following configuration files in your workspace .vscode folder:

.vscode/tasks.json:

{
    "version": "2.0.0",
    "tasks": [
        {
            "label": "mvnDebug",
            "type": "shell",
            "command": "mvnDebug hpi:run",
            "isBackground": true,
            "problemMatcher": [{
                "pattern": [{
                    "regexp": "\\b\\B",
                    "file": 1,
                    "location": 2,
                    "message": 3
                }],
                "background": {
                    "activeOnStart": true,
                    "beginsPattern": "^.*Preparing to execute Maven in debug mode.*",
                    "endsPattern": "^.*Listening for transport dt_socket at address.*"
                }
            }]
        }
    ]
}

.vscode/launch.json:

{
    "configurations": [
        {
            "type": "java",
            "name": "Debug (Attach)",
            "request": "attach",
            "hostName": "localhost",
            "port": "8000",
            "preLaunchTask": "mvnDebug"
        }
    ]
}

Press F5 to start your debug session.

NetBeans

NetBeans users can open Jenkins core and plugin repositories directly using native Maven support.

  • Import projects directly via File > Open Project.

  • Source code JARs can be attached by clicking Download Sources on project dependency nodes.

  • Note: Legacy Jenkins/Stapler NetBeans plugins are no longer actively maintained. Standard Maven project tooling should be used.

XSD Configuration

If a dedicated plugin is not available for your IDE, XML schemas can be manually configured for Jelly tag libraries.

XML schemas for tag libraries defined in Jelly, Stapler, and Jenkins core enable autocompletion and validation in XML editors. See Taglibs for schema links.