Daniel Macak
Daniel Macak

Reputation: 17103

IDEA: what is the difference between Build and Build Project?

In Intellij IDEA, in Run Configurations (of type Application, in a Java project), you can configure tasks to execute before launch. As you can see on the picture below, you can select, among others, Build and Build Project. What is the difference between them?

enter image description here

After reading about compilation types in IDEA, I understand that build here does a make, which compiles classes that changed since the last time and links them. So I guess that Build Project does this in the scope of the whole project, but in what scope the Build operates I can't figure out.

Upvotes: 3

Views: 2109

Answers (1)

Ruslan
Ruslan

Reputation: 6300

From Intellij help > Run/Debug Configurations Dialog > Before Launch

Build: select to compile the specified module. The Build Module command will be executed. If an error occurs during compilation, IntelliJ IDEA won't attempt to start the run/debug configuration.

Build Project: select to compile the entire project. The Build Project command will be executed. If an error occurs during compilation, IntelliJ IDEA won't attempt to start the run/debug configuration.

Upvotes: 3

Related Questions