IntelliJ IDEA 2022.2 Help

Build overview

When you work with various build tools in IntelliJ IDEA, you might find it challenging to figure out what build action is running what build process.

Build main menu action

Unless you delegate the build process to one of the build tools, you can use IntelliJ IDEA to build your project.

Build a project with IntelliJ IDEA

  • From the main menu, select Build | Build Project. Alternatively, press Ctrl+F9 to build your project.

    IntelliJ IDEA compiles all the classes inside your build target and places them inside the output directory.

    You can check the result in the Build tool window.

For more information, refer to Compile and build applications with IntelliJ IDEA.

Build with Gradle

If you have a Gradle project then by default the build process is delegated to Gradle.

You can invoke the project building by using the main menu, or you can use the Gradle tool window. However, invoking the build from the main menu, will only compile the code.

Use build action from the main menu

  • From the main menu, select Build | Build Project. Alternatively, press Ctrl+F9 to compile your project.

    Gradle runs the classes and testClasses tasks only.

    You can check the result in the Build tool window.

In a Gradle project, the Gradle tool window is the main part of your work process. It displays a structure of the build cycle, a list of tasks that you can execute, a list of dependencies used in the project. In addition, you can perform various actions such as linking a project, reloading it, and so on.

If you run the build task in the Gradle tool window, you will get the full build process such as generating classes, running tests, packaging, and so on.

Run the build task

  1. In the Gradle tool window, click the Tasks node.

  2. Click the build node and double-click the build task.

    Check the result in the Run tool window.

Build with Maven

If you have a Maven project, then you can delegate the build actions to Maven instead of IntelliJ IDEA. However, invoking the project build from the main menu, will only execute the Maven install phase.

So, if you work with Maven project, you should use the Maven tool window to compiling, building and deploying the project.

Run the build phase

  1. In the Maven tool window, click the Lifecycle node.

  2. Double-click the verify goal to run it.

    Check the result in the Run tool window.

Last modified: 29 November 2022