简体   繁体   English

IDEA:Build 和 Build Project 有什么区别?

[英]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.在 Intellij IDEA 中,在运行配置(应用程序类型,在 Java 项目中)中,您可以配置要在启动前执行的任务。 As you can see on the picture below, you can select, among others, Build and Build Project.如下图所示,您可以 select 等,构建和构建项目。 What is the difference between them?它们之间有什么区别?

在此处输入图像描述

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.在阅读了 IDEA 中的编译类型后,我了解到这里的 build 做了一个make ,它编译自上次以来更改的类并链接它们。 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.所以我猜 Build Project 在整个项目的 scope 中执行此操作,但是 Build 操作的 scope 中我无法弄清楚。

From Intellij help > Run/Debug Configurations Dialog > Before LaunchIntellij 帮助 > 运行/调试配置对话框 > 启动前

Build: select to compile the specified module. Build: select 编译指定模块。 The Build Module command will be executed.构建模块命令将被执行。 If an error occurs during compilation, IntelliJ IDEA won't attempt to start the run/debug configuration.如果在编译过程中发生错误,IntelliJ IDEA 不会尝试启动运行/调试配置。

Build Project : select to compile the entire project. Build Project : select 编译整个项目。 The Build Project command will be executed.将执行构建项目命令。 If an error occurs during compilation, IntelliJ IDEA won't attempt to start the run/debug configuration.如果在编译过程中发生错误,IntelliJ IDEA 不会尝试启动运行/调试配置。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM