新增章节 1.2
+YUCHENG HU+ git-svn-id: https://svn.code.sf.net/p/hawebs/svn@392 a2543c7e-f6e9-4f8a-8bff-1ffc34733512
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html lang="zh" xml:lang="zh">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<meta name="DC.Type" content="concept"/>
|
||||
<meta name="DC.Title" content="约定优于配置(Convention Over Configuration)"/>
|
||||
<meta name="DC.subject" content="Apache, Maven, 介绍"/>
|
||||
<meta name="keywords" content="Apache, Maven, 介绍"/>
|
||||
<meta name="DC.Relation" scheme="URI" content="../../tasks/chapter1/chapter1.html"/>
|
||||
<meta name="prodname" content="Maven权威指南"/>
|
||||
<meta name="version" content="1.0.0.0"/>
|
||||
<meta name="brand" content="HAWEBS Maven"/>
|
||||
<meta name="copyright" content="HAWEBS信息技术股份有限公司 2006, 2010" type="primary"/>
|
||||
<meta name="DC.Rights.Owner" content="HAWEBS信息技术股份有限公司 2006, 2010" type="primary"/>
|
||||
<meta name="DC.Format" content="XHTML"/>
|
||||
<meta name="DC.Identifier" content="chapter1_2"/>
|
||||
<meta name="DC.Language" content="zh"/>
|
||||
<link rel="stylesheet" type="text/css" href="../../css/commonltr.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="../../css/public.css"/>
|
||||
<title>约定优于配置(Convention Over Configuration)</title>
|
||||
</head>
|
||||
<body id="chapter1_2"><a name="chapter1_2"><!-- --></a>
|
||||
|
||||
|
||||
<h1 class="topictitle1">约定优于配置(Convention Over Configuration)</h1>
|
||||
|
||||
|
||||
<div>
|
||||
<p>约定优于配置是一个简单的概念。 系统,类库,框架应该假定合理的默认值,而非要求提供不必要的配置。 流行的框架如 <a href="http://rubyonrails.org/" target="_blank">Ruby on Rails</a> 和 EJB3 已经开始坚持这些原则,以对像原始的 EJB 2.1 规范那样的框架的配置复杂度做出反应。 一个约定优于配置的例子就像 EJB3 持久化,将一个 特殊的Bean持久化,你所需要做的只是将这个类标注为 @Entity 。 框架将会假定表名和列名是基于类名和属性名。 系统也提供了一些钩子,当有需要的时候你可以重写这些名字,但是,在大部分情况下,你会发现使用框架提供的默认值会让你的项目运行的更快。 </p>
|
||||
|
||||
<p>Maven通过给项目提供明智的默认行为来融合这个概念。 在没有自定义的情况下,源代码假定是在 <samp class="codeph">/data/hudson-temporal-data/hudson-orchestrator-home/workspace/Book-To-Production/content-zh/src/main/java</samp>,资源文件假定是在 <samp class="codeph">/data/hudson-temporal-data/hudson-orchestrator-home/workspace/Book-To-Production/content-zh/src/main/resources</samp>。测试代码假定是在 <samp class="codeph">/data/hudson-temporal-data/hudson-orchestrator-home/workspace/Book-To-Production/content-zh/src/test</samp>。项目假定会产生一个 JAR 文件。Maven 假定你想要把编译好的字节码放到 <samp class="codeph">/data/hudson-temporal-data/hudson-orchestrator-home/workspace/Book-To-Production/content-zh/target/classes</samp> 并且在 <samp class="codeph">/data/hudson-temporal-data/hudson-orchestrator-home/workspace/Book-To-Production/content-zh/target</samp> 创建一个可分发的 JAR 文件。</p>
|
||||
|
||||
<p>虽然这看起来无关紧要,但是想想大部分基于 Ant 的构建必须为每个子项目定义这些目录。 Maven 对约定优于配置的应用不仅仅是简单的目录位置,Maven 的核心插件使用了一组通用的约定,以用来编译源代码,打包可分发的构件,生成 web 站点,还有许多其他的过程。 Maven 的力量来自它的"武断",它有一个定义好的生命周期和一组知道如何构建和装配软件的通用插件。如果你遵循这些约定,Maven 只需要几乎为零的工作——仅仅是将你的源代码放到正确的目录,Maven 将会帮你处理剩下的事情。 </p>
|
||||
|
||||
<p>使用“遵循约定优于配置”系统的一个副作用是用户可能会觉得他们被强迫使用一种特殊的方法。 当然 Maven 有一些核心观点不应该被怀疑,但是其实很多默认行为还是可配置的。 例如项目源码的资源文件的位置可以被自定义,JAR 文件的名字可以被自定义,在开发自定义插件的时候,几乎任何行为可以被裁剪以满足你特定的环境需求。 如果你不想遵循约定,Maven 也会允许你自定义默认值来适应你的需求。 </p>
|
||||
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div class="familylinks">
|
||||
<div class="parentlink"><strong>父主题:</strong> <a href="../../tasks/chapter1/chapter1.html" title="主要对 Apache Maven 进行了简要的描述。">介绍 Apache Maven</a></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,52 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<!-- This document was created with Syntext Serna Free. --><!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd" []>
|
||||
<!--
|
||||
**
|
||||
* Copyright (C) 2006-2010 YUCHENG HU
|
||||
*
|
||||
* +++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
* HA WEBSYSTEMS
|
||||
* http://www.hawebs.net
|
||||
* http://www.tcivis.com
|
||||
*
|
||||
* Contact
|
||||
* huyuchengus@gmail.com / yuchenghu@hawebs.net
|
||||
*
|
||||
* +++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
*
|
||||
* GNU GENERAL PUBLIC LICENSE
|
||||
* APACHE LICENSE, VERSION 2.0
|
||||
*
|
||||
* +++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
-->
|
||||
|
||||
<concept id="chapter1_2" xml:lang="zh">
|
||||
<title>约定优于配置(Convention Over Configuration)</title>
|
||||
<prolog>
|
||||
<metadata>
|
||||
<keywords>
|
||||
<indexterm>Apache</indexterm>
|
||||
<indexterm>Maven</indexterm>
|
||||
<indexterm>介绍</indexterm>
|
||||
</keywords>
|
||||
</metadata>
|
||||
</prolog>
|
||||
<conbody>
|
||||
<p>约定优于配置是一个简单的概念。 系统,类库,框架应该假定合理的默认值,而非要求提供不必要的配置。 流行的框架如 <xref format="html" scope="external" href="http://rubyonrails.org/">Ruby on Rails</xref> 和 EJB3 已经开始坚持这些原则,以对像原始的 EJB 2.1 规范那样的框架的配置复杂度做出反应。 一个约定优于配置的例子就像 EJB3 持久化,将一个 特殊的Bean持久化,你所需要做的只是将这个类标注为 @Entity 。 框架将会假定表名和列名是基于类名和属性名。 系统也提供了一些钩子,当有需要的时候你可以重写这些名字,但是,在大部分情况下,你会发现使用框架提供的默认值会让你的项目运行的更快。 </p>
|
||||
<p>Maven通过给项目提供明智的默认行为来融合这个概念。 在没有自定义的情况下,源代码假定是在 <codeph>/data/hudson-temporal-data/hudson-orchestrator-home/workspace/Book-To-Production/content-zh/src/main/java</codeph>,资源文件假定是在 <codeph>/data/hudson-temporal-data/hudson-orchestrator-home/workspace/Book-To-Production/content-zh/src/main/resources</codeph>。测试代码假定是在 <codeph>/data/hudson-temporal-data/hudson-orchestrator-home/workspace/Book-To-Production/content-zh/src/test</codeph>。项目假定会产生一个 JAR 文件。Maven 假定你想要把编译好的字节码放到 <codeph>/data/hudson-temporal-data/hudson-orchestrator-home/workspace/Book-To-Production/content-zh/target/classes</codeph> 并且在 <codeph>/data/hudson-temporal-data/hudson-orchestrator-home/workspace/Book-To-Production/content-zh/target</codeph> 创建一个可分发的 JAR 文件。</p>
|
||||
<p>虽然这看起来无关紧要,但是想想大部分基于 Ant 的构建必须为每个子项目定义这些目录。 Maven 对约定优于配置的应用不仅仅是简单的目录位置,Maven 的核心插件使用了一组通用的约定,以用来编译源代码,打包可分发的构件,生成 web 站点,还有许多其他的过程。 Maven 的力量来自它的"武断",它有一个定义好的生命周期和一组知道如何构建和装配软件的通用插件。如果你遵循这些约定,Maven 只需要几乎为零的工作——仅仅是将你的源代码放到正确的目录,Maven 将会帮你处理剩下的事情。 </p>
|
||||
<p>使用“遵循约定优于配置”系统的一个副作用是用户可能会觉得他们被强迫使用一种特殊的方法。 当然 Maven 有一些核心观点不应该被怀疑,但是其实很多默认行为还是可配置的。 例如项目源码的资源文件的位置可以被自定义,JAR 文件的名字可以被自定义,在开发自定义插件的时候,几乎任何行为可以被裁剪以满足你特定的环境需求。 如果你不想遵循约定,Maven 也会允许你自定义默认值来适应你的需求。 </p>
|
||||
</conbody>
|
||||
</concept>
|
||||
@@ -1,50 +0,0 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<!-- This document was created with Syntext Serna Free. --><!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd" []>
|
||||
<!--
|
||||
**
|
||||
* Copyright (C) 2006-2010 YUCHENG HU
|
||||
*
|
||||
* +++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
* HA WEBSYSTEMS
|
||||
* http://www.hawebs.net
|
||||
* http://www.tcivis.com
|
||||
*
|
||||
* Contact
|
||||
* huyuchengus@gmail.com / yuchenghu@hawebs.net
|
||||
*
|
||||
* +++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
*
|
||||
* GNU GENERAL PUBLIC LICENSE
|
||||
* APACHE LICENSE, VERSION 2.0
|
||||
*
|
||||
* +++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
-->
|
||||
|
||||
<concept id="hudson_best_practices" xml:lang="zh">
|
||||
<title>Hudson 最佳实践</title>
|
||||
<shortdesc/>
|
||||
<prolog>
|
||||
<metadata>
|
||||
<keywords>
|
||||
<indexterm>Hudson</indexterm>
|
||||
<indexterm>介绍</indexterm>
|
||||
</keywords>
|
||||
</metadata>
|
||||
</prolog>
|
||||
<conbody>
|
||||
<p>持续集成并整合自动测试,在近几年已经得到了广泛的使用。在持续集成的背后隐藏着软件公司对构建管理、发行管理、自动部署和测试流程方式的转变。</p>
|
||||
<p>这部分提供了针对 Hudson 的一系列最佳实践。Hudson 作为一套持续集成的解决方案,能够为公司管理者、商业运行管理者、软件开发人员、架构师在软件开发过程中,提供最为有效管理。同时,也能为软件开发的生命周期中提供从开发进程到代码质量管理的有效控制。</p>
|
||||
</conbody>
|
||||
</concept>
|
||||
@@ -1,61 +0,0 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<!-- This document was created with Syntext Serna Free. --><!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd" []>
|
||||
<!--
|
||||
**
|
||||
* Copyright (C) 2006-2010 YUCHENG HU
|
||||
*
|
||||
* +++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
* HA WEBSYSTEMS
|
||||
* http://www.hawebs.net
|
||||
* http://www.tcivis.com
|
||||
*
|
||||
* Contact
|
||||
* huyuchengus@gmail.com / yuchenghu@hawebs.net
|
||||
*
|
||||
* +++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
*
|
||||
* GNU GENERAL PUBLIC LICENSE
|
||||
* APACHE LICENSE, VERSION 2.0
|
||||
*
|
||||
* +++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
-->
|
||||
|
||||
<concept id="hudson_features" xml:lang="zh">
|
||||
<title>Hudson 的特性</title>
|
||||
<shortdesc/>
|
||||
<prolog>
|
||||
<metadata>
|
||||
<keywords>
|
||||
<indexterm>Hudson</indexterm>
|
||||
<indexterm>介绍</indexterm>
|
||||
</keywords>
|
||||
</metadata>
|
||||
</prolog>
|
||||
<conbody>
|
||||
<p>Hudson 包含有下面的一些特性:</p>
|
||||
<ol>
|
||||
<li>易于安装<p>只需要运行<codeph> java -jar hudson.war</codeph> 就能够完成安装,或者你也可以将 Hudson 部署到 Sevlet 容器中。Hudson除此之外不需要其他任何安装,也不需要数据库支持。</p></li>
|
||||
<li>易于配置<p>Hudson 可以使用 GUI 界面对软件进行配置。在配置过程中能够对配置进行智能检查,同时也提供了丰富的帮助信息。Hudson 不再需要你去读取难懂的 XML 配置文件。当然,如果你愿意,你也可以通过修改 XML 配置文件完成配置。</p></li>
|
||||
<li>变更集支持<p>Hudson 可以从 CVS/Subversion 中生成一系列的变更集。能够更好的提高交互性,同时能有效果降低版本控制服务器的负载。</p></li>
|
||||
<li>URL 静态化<p>Hudson 能够在几乎所有的页面中提供易读的 URL 链接。其中包括一些永久链接,例如:【最后一次的构建】 / 【最后成功一次的构建】。这些链接能够更加容易的被链接到其他地方。</p></li>
|
||||
<li>聚合新闻 (RSS) / 电子邮件 (Email) / 实时聊天工具 (IM)的支持<p>可以通过聚合新闻或者电子邮件来对构建失败的结果获得实时通知。</p></li>
|
||||
<li>事后标注<p>构建可以在构建完成后进行标注</p></li>
|
||||
<li>JUnit/TestNG 测试报告<p>JUnit 的测试报告可以用报表,概要,历史信息的方式进行报告,例如,当进入测试断点。也可以将历史趋势用图图表进行表示。</p></li>
|
||||
<li>分布式构建<p>Hudson 可以在多台计算机上进行分布式 构建/测试。这样可以让你获更多供发人员使用的,但是空闲的工作站。</p></li>
|
||||
<li>文件指纹<p>Hudson 可以持续跟踪创建的 Jar 文件,同时跟踪使用 Jar 文件的版本。这样甚至能够让你跟踪在 Hudson 之外的 Jar 文件。同时,能为不同的项目独立的跟踪 Jar 文件。</p></li>
|
||||
<li>插件支持<p>Hudson 可以通过第三方插件支持扩展。你甚至可以为你的项目小组单独为 Hudson 扩展工具或过程。</p></li>
|
||||
</ol>
|
||||
</conbody>
|
||||
</concept>
|
||||
@@ -1,80 +0,0 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<!-- This document was created with Syntext Serna Free. --><!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd" []>
|
||||
<!--
|
||||
**
|
||||
* Copyright (C) 2006-2010 YUCHENG HU
|
||||
*
|
||||
* +++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
* HA WEBSYSTEMS
|
||||
* http://www.hawebs.net
|
||||
* http://www.tcivis.com
|
||||
*
|
||||
* Contact
|
||||
* huyuchengus@gmail.com / yuchenghu@hawebs.net
|
||||
*
|
||||
* +++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
*
|
||||
* GNU GENERAL PUBLIC LICENSE
|
||||
* APACHE LICENSE, VERSION 2.0
|
||||
*
|
||||
* +++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
-->
|
||||
|
||||
<concept id="hudson_origin" xml:lang="zh">
|
||||
<title>Hudson 的由来与目标</title>
|
||||
<prolog>
|
||||
<metadata>
|
||||
<keywords>
|
||||
<indexterm>Hudson</indexterm>
|
||||
<indexterm>介绍</indexterm>
|
||||
</keywords>
|
||||
</metadata>
|
||||
</prolog>
|
||||
<conbody>
|
||||
<p>持续集成(CI)已成为当前许多软件开发团队在整个软件开发生命周期内侧重于保证代码质量的常见做法。它是一种实践,旨在缓和和稳固软件的构建过程。并且能够帮助您的开发团队应对如下挑战:<ul>
|
||||
<li>软件构建自动化 <p>使用CI,您只要按一下按钮,它会依照预先制定的时间表,或者针对某一特定事件,就开始对目标软件进行一次构建过程。想想吧,尤其您从头到尾构建一个构 件的时候,这个构建过程应该不会是局限于某一特定IDE、电脑或者个人的。</p></li>
|
||||
<li>构建可持续的自动化检查<p>CI系统能够设定成持续地执行新增或修改后签入的源代码,也就是说,当软件开发团队需要周期性的检查新增或修改后的代码时,CI系统会不断确认这些新代 码是否破坏了原有软件的成功构建。这减少了开发者们在检查彼此相互依存的代码中变化情况需要花费的时间和精力。</p></li>
|
||||
<li>构建可持续的自动化测试<p>一个构建检查的扩展部分,这个过程确保当新增或修改代码时不会导致预先制定的一套测试在构建构件后失败。构建检查和测试一样,失败都会触发通知单 (Email,RSS等等)给相关的当事人,告知对方一次构建或者一些测试失败了。</p></li>
|
||||
<li>生成后后续过程的自动化<p>一旦自动化检查和测试的构建已经完成,一个软件构件的构建周期中可能也需要一些额外的任务,诸如生成文档、打包软件、部署构件到一个运行环境或者软件仓 库。这样,构件才能更迅速地提供给用户使用。</p></li>
|
||||
</ul></p>
|
||||
<p> 实现一个CI服务器你需要的最低要求是,一个比较容易获取的源代码仓库(包含源代码),一套构建脚本和程序,一系列围绕构件构建的可执行测试。</p>
|
||||
<p>下图概括了CI系统的基本结构:<image href="../../images/introduction_ci.jpg">
|
||||
<alt>CI 流程图</alt>
|
||||
</image></p>
|
||||
<p>该系统的各个组成部分是按如下顺序来发挥作用的<ol>
|
||||
<li>开发者检查新增和修改到源代码仓库后的代码。</li>
|
||||
<li>CI服务器会为每一个项目创建了一个单独的工作区。当预设或请求一次新的构建时,它将把源代码仓库的源码存放到对应的工作区,哪里构建就执行哪里。 </li>
|
||||
<li>CI服务器会在新近创建或者更新的工作区内执行构建过程。</li>
|
||||
<li>一旦构建完成,CI服务器就会在一个新的构件中选择性地执行原先定义的一套测试。如果构建失败,相关责任人将会通过电子邮件、即时短信或者其他的 方式获取到(失败)通知。</li>
|
||||
<li>如果构建成功,这个构件会被打包并转移到一个部署目标(如应用服务器) 和/或存储为软件仓库中的一个新版本。这个如软件仓库可以是CI服务器的一部分,也可以是一个外部的仓库,诸如一个文件服务器或者像Java.net、SourceForge分发的一个有效网址。源代码仓库和构件仓库是可以分开的,实际上它可以利用一些根本没有包含任何源代码控制系统(CVS、SVN、 CSS等等)的CI服务器。</li>
|
||||
<li>CI服务器通常会用某种控制台来进行项目的配置和调试,并且根据请求发起相应的操作,诸如即时构建、生成报告,或者检索一些构建好的构件。</li>
|
||||
</ol></p>
|
||||
<p>而 Hudson 就是这么一个CI服务器。它最初是由Kohsuke Kawaguchi编写的,他是一名Sun工程师,在2005年2月宣布释放了他的博客。现在已经有大约154个版本。 </p>
|
||||
<p>以下的一些是使用hudson的理由:<ul>
|
||||
<li>它是所有CI产品在安装和配置上中最简单的。</li>
|
||||
<li>基于Web的用户界面非常友好、直观和灵活,在许多情况下,还对需单独配置的部分提供了基于AJAX的即时反馈。</li>
|
||||
<li>Hudson是基于java开发的(如果你是一个Java开发人员,这是非常有用的),但它不仅限于构建基于Java的软件。 </li>
|
||||
<li>Hudson本身是一个很简洁的组件,但它提供了一组很明确和可扩展API的Hudson组件。这批组成一个大的类库的Hudson组件反过来又丰富了Hudson的功能;它们都是开源的,而且它们可以直接通过Hudson的控制台来进行安装。</li>
|
||||
</ul></p>
|
||||
<p>Hudsonn的主要目标是监控软件开发流程,快速显示问题,让开发人员马上解决问题。所以能保证开发人员以及相关人员省时省力提高开发效率。</p>
|
||||
<p>CI 服务器在整个开发过程中的主要作用是控制:当服务器在代码存储库中探测到修改时,它将运行构建的任务委托给构建过程本身。如果构建失败了,那么 CI 务器将通知相关方面,然后继续监视存储库。它的角色看起来是被动的;但是,它是快速反映问题的关键。</p>
|
||||
<p>特别它在和maven2的整合上具有以下优点:<ul>
|
||||
<li>Hudson一切配置都可以在友好的界面上完成,包括其自身的配置和项目特有的配置,值得注意的是有些配置如MAVEN_HOME和Email Server,只需要配置一次,所有的项目就都能用了。XML?不再需要了,不过如果坚持,也可以通过XML配置。 </li>
|
||||
<li>支持Maven的模块(Module),Hudson对Maven2做了优化,因此它能自动识别Module,每个Module本身也是一个 build job。相当灵活。 </li>
|
||||
<li>测试报告聚合,所有模块的测试报告都被聚合在一起了,结果一目了然,使用诸如CruiseControl其他CI,这几乎是件不可能完成的任务。 </li>
|
||||
<li>构件指纹(artifact fingerprint),每次build的结果构件都被很好的自动管理,无需任何配置就可以方便的浏览下载。</li>
|
||||
</ul></p>
|
||||
</conbody>
|
||||
</concept>
|
||||
@@ -1,53 +0,0 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<!-- This document was created with Syntext Serna Free. --><!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd" []>
|
||||
<!--
|
||||
**
|
||||
* Copyright (C) 2006-2010 YUCHENG HU
|
||||
*
|
||||
* +++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
* HA WEBSYSTEMS
|
||||
* http://www.hawebs.net
|
||||
* http://www.tcivis.com
|
||||
*
|
||||
* Contact
|
||||
* huyuchengus@gmail.com / yuchenghu@hawebs.net
|
||||
*
|
||||
* +++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
*
|
||||
* GNU GENERAL PUBLIC LICENSE
|
||||
* APACHE LICENSE, VERSION 2.0
|
||||
*
|
||||
* +++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
-->
|
||||
|
||||
<concept id="test_drive" xml:lang="zh">
|
||||
<title>Hudson 测试驱动</title>
|
||||
<shortdesc/>
|
||||
<prolog>
|
||||
<metadata>
|
||||
<keywords>
|
||||
<indexterm>Hudson</indexterm>
|
||||
<indexterm>介绍</indexterm>
|
||||
</keywords>
|
||||
</metadata>
|
||||
</prolog>
|
||||
<conbody>
|
||||
<p><xref href="https://hudson.dev.java.net/hudson.jnlp" format="jnlp" scope="external">
|
||||
<image href="../../images/introduction_webstart.gif"/>
|
||||
</xref>通过 Java Web Start 来为 Hudson 作为测试驱动来运行。成功运行后,通过地址 <xref format="html" href="http://localhost:8080/" scope="external">http://localhost:8080/</xref> 进入控制台界面。</p>
|
||||
<p>任何你为 Hudson 做的修改将会被保存到 ~/.hudson 目录中。</p>
|
||||
<p>你修改的数据将会保留在本地,而不会随 Hudson 的重启而丢失。</p>
|
||||
</conbody>
|
||||
</concept>
|
||||
@@ -1,53 +0,0 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<!-- This document was created with Syntext Serna Free. --><!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd" []>
|
||||
<!--
|
||||
**
|
||||
* Copyright (C) 2006-2010 YUCHENG HU
|
||||
*
|
||||
* +++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
* HA WEBSYSTEMS
|
||||
* http://www.hawebs.net
|
||||
* http://www.tcivis.com
|
||||
*
|
||||
* Contact
|
||||
* huyuchengus@gmail.com / yuchenghu@hawebs.net
|
||||
*
|
||||
* +++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
*
|
||||
* GNU GENERAL PUBLIC LICENSE
|
||||
* APACHE LICENSE, VERSION 2.0
|
||||
*
|
||||
* +++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
-->
|
||||
|
||||
<concept id="what_hudson" xml:lang="zh">
|
||||
<title>什么是 Hudson</title>
|
||||
<shortdesc/>
|
||||
<prolog>
|
||||
<metadata>
|
||||
<keywords>
|
||||
<indexterm>Hudson</indexterm>
|
||||
<indexterm>介绍</indexterm>
|
||||
</keywords>
|
||||
</metadata>
|
||||
</prolog>
|
||||
<conbody>
|
||||
<p>Hudson 用来监视可重复执行的工作。例如,用来构建一个软工程或者后台守护进程自动执行任务。Hudson 可以完成很多工作,Hudson 当前主要集中在下面两个功能中:</p>
|
||||
<ol>
|
||||
<li>程序的构建和测试软件项目,就好象导航控制和损毁控制。简单来说,Hudson 为项目提供了一个易用的持续集成(CI)的方法,并能够让用户更加容易的获得最新构建产品。同时能够持续和以增量的方式来构建软件产品。</li>
|
||||
<li>监控一些定期执行的任务。比如,后台守护进程,工作进程邮件,甚至在这些工作运行在远程服务器的时候也能完成这些监控。例如,通过守护进程,你可以收取到一些常规邮件,在进行编译和处理的时候,在出现故障的时候,你也会收到一些这样的邮件。Hudson 保留了所有这样输出,同时能够使你更加容易的获得各种异常或故障信息。 </li>
|
||||
</ol>
|
||||
</conbody>
|
||||
</concept>
|
||||
Reference in New Issue
Block a user