建筑与编译(JAVA) [英] Building vs. Compiling (Java)

查看:187
本文介绍了建筑与编译(JAVA)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

认为这个问题的答案是pretty明显,但这里有云:

当我在一个小项目工作的学校(在Java中)我的编译的它。

在我们使用的是蚂蚁的建立的我们的项目我的鸡舍。

我认为这是编制建设的一个子集。它是否正确?什么是建立和编译的区别?


  

相关:结果
  <一href=\"http://stackoverflow.com/questions/2310261/what-is-the-difference-between-compiling-and-building\">What是编译和建筑之间的区别?



解决方案

建是一个涵盖所有创建软件的交付所需的步骤的过程。在Java世界中,这通常包括:


  1. 生成源(有时)。

  2. 编译源代码。

  3. 编译测试源。

  4. 执行测试(单元测试,集成测试等)。

  5. 包装(成JAR,WAR,EJB-JAR,耳朵)。

  6. 运行状况检查(静态分析仪一样的Checkstyle,FindBugs的,PMD测试覆盖,等等)。

  7. 生成报告。

因此​​,大家可以看到,编译是构建的唯一一(小)部分(和最好的做法是完全所有的步骤,类似Maven或Ant的工具,自动化和连续运行构建这被称为<一HREF =htt​​p://martinfowler.com/articles/continuousIntegration.html>持续集成)。

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?

Related:
What is the difference between compiling and building?

解决方案

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:

  1. Generating sources (sometimes).
  2. Compiling sources.
  3. Compiling test sources.
  4. Executing tests (unit tests, integration tests, etc).
  5. Packaging (into jar, war, ejb-jar, ear).
  6. Running health checks (static analyzers like Checkstyle, Findbugs, PMD, test coverage, etc).
  7. 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)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆