Thinking that the answer to this is pretty obvious but here it goes:
When I am working on a small project for school (in java) I compile it.
On my coop we are using ant to build our project.
I think that compiling is a subset of building. Is this correct? What is the difference between building and compiling?
解决方案
The "Build" is a process that covers all the steps required to create a "deliverable" of your software. In the Java world, this typically includes:
Generating sources (sometimes).
Compiling sources.
Compiling test sources.
Executing tests (unit tests, integration tests, etc).
Packaging (into jar, war, ejb-jar, ear).
Running health checks (static analyzers like Checkstyle, Findbugs, PMD, test coverage, etc).
Generating reports.
So as you can see, compiling is only a (small) part of the build (and the best practice is to fully automate all the steps with tools like Maven or Ant and to run the build continuously which is known as Continuous Integration).
本文解释了在Java项目中,编译与构建的概念,指出编译是构建的一部分。它详细列举了构建过程包括源代码生成、测试执行等步骤,并强调自动化工具如Maven和Ant在持续集成中的重要性。
819

被折叠的 条评论
为什么被折叠?



