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.
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.
Go to Build | Build Project. Alternatively, press CtrlF9 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.
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.
Go to Build | Build Project. Alternatively, press CtrlF9 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.
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.
In the Gradle tool window, click the Tasks 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.
If you have a Maven project, then you can use IntelliJ IDEA to compile and run tests for the project.
Go to Build | Build Project. Alternatively, press CtrlF9 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.
In the Maven tool window, click the Lifecycle 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.
note
Thanks for your feedback!