Skip to content

Nx provides powerful tooling for Java projects, supporting both Gradle and Maven build systems. Whether you're working with Spring Boot, Micronaut, Quarkus, or any other Java framework, Nx helps you build faster and more efficiently.

You can install Nx globally. Depending on your package manager, use one of the following commands:

Terminal window
npm add --global nx@latest

In any Gradle or Maven project, run the following command to add Nx:

Terminal window
nx init

Nx will automatically detect your build tool and you can then add the appropriate plugin (see Build System Support below).

Nx offers dedicated plugins for the two most popular Java build tools:

  • @nx/gradle - For projects using Gradle
  • @nx/maven - For projects using Maven (experimental, requires Nx 22+)

Add the plugin for your build system:

Terminal window
nx add @nx/gradle
# or
nx add @nx/maven

These Nx plugins for Gradle and Maven register your Gradle or Maven projects in your Nx workspace, and allow their tasks to be run through Nx. Nx effortlessly makes your CI faster.

For a hands-on tutorial, check out the Gradle tutorial.

Nx enhances your Java development workflow with: