Build actions overview
IntelliJ IDEA offers a lot of actions depending on a tool or a framework that is enabled in your project. Many of those actions are located in different parts of the IDE.
When you work with various build tools in IntelliJ IDEA, it might be challenging to figure out which build action is more suitable to your 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. We recommend using IntelliJ IDEA for building when you have a small project and need to quickly check the compiled output.
Build a project with IntelliJ IDEA
Go to
. 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
Go to
. Alternatively, press Ctrl+F9 to compile your project.Gradle runs the
classes
andtestClasses
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, and 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.
![Gradle tool window Gradle tool window](https://resources.jetbrains.com/help/img/idea/2024.2/gradle_tool_window_for_build.png)
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
In the Gradle tool window, click the node.
Click the build node and double-click the build task.
Check the result in the Run tool window.
For more information about Gradle tasks, refer to the Gradle tasks section.
Build with Maven
If you have a Maven project, then you can use IntelliJ IDEA to compile and run tests for the project.
Use build action from the main menu
Go to
. Alternatively, press Ctrl+F9 to compile 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.
If you have a highly customized build process or run into problems building with IntelliJ IDEA, you can delegate your build to Maven.
In this case, use the Maven tool window for compiling, building and deploying the project. The package
goal in this case is the goal that you can run to build your project.
![Maven tool window Maven tool window](https://resources.jetbrains.com/help/img/idea/2024.2/maven_tool_window_for_build.png)
Run the package goal
In the Maven tool window, click the node.
Double-click the package goal to run it.
Check the result in the Run tool window.
Use available tool window icons to adjust the displayed results.
For more information about Maven goals, refer to the Maven goals section.