Skip to Content
Java持续交付
book

Java持续交付

by Daniel Bryant, Abraham Marín-Pérez
November 2019
Beginner to intermediate
406 pages
9h 21m
Chinese
Publishing House of Electronics Industry
Content preview from Java持续交付
61
5
构建
Java
应用程序
在本章中,你会了解到如何构建
Java
应用程序,以及一个构建过程的正常生命周期。你
还将使用专业工具(不仅是
IDE
中自带的构建工具)来体验自动构建,轻松地将构建脚
本迁移到一个持续集成构建服务器上。最后,我们将带你回顾最流行的几个构建工具的
优点和缺点,以便你能够为下一个
Java
项目做出最佳的选择。
分解构建过程
几乎所有的软件都必须经过构建的过程(至少需要打包),
Java
应用程序也不例外。从
最基础的层面来看,你编写的
Java
代码必须首先被编译为
Java
字节码,然后才能在
Java
虚拟机(
JVM
)上执行。但是,任何复杂的
Java
应用程序都需要依赖其他外部的东西,
其中包括几乎所有地方都要用到的第三方库,例如
SLF4J
Apache Commons Lang
。基
于这点考虑,
Java
应用程序通常会使用如下的一系列构建步骤(使用过
Maven
的用户可
能会比较熟悉):
校验
校验项目是否正确并且所有的必要信息都存在。
编译
编译项目的源代码。
测试
使用合适的单元测试框架来测试编译后的源代码。这些测试不需要将代码打包或者
部署。
打包
将已编译的代码打包为可分发的格式,例如
JAR
文件。
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

写给系统管理员的Python脚本编程指南

写给系统管理员的Python脚本编程指南

Posts & Telecom Press, Ganesh Sanjiv Naik
Python和NLTK实现自然语言处理

Python和NLTK实现自然语言处理

Posts & Telecom Press, Nitin Hardeniya
解密金融数据

解密金融数据

Justin Pauley
Python机器学习案例精解

Python机器学习案例精解

Posts & Telecom Press, Yuxi (Hayden) Liu

Publisher Resources

ISBN: 9787121374425