java构建编译区别,构建与编译(Java)

本文解释了在Java项目中,编译与构建的概念,指出编译是构建的一部分。它详细列举了构建过程包括源代码生成、测试执行等步骤,并强调自动化工具如Maven和Ant在持续集成中的重要性。

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).

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符  | 博主筛选后可见
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值