新增第 1.4 章
+YUCHENG HU+ git-svn-id: https://svn.code.sf.net/p/hawebs/svn@396 a2543c7e-f6e9-4f8a-8bff-1ffc34733512
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
#Mon Jun 28 22:39:06 EDT 2010
|
||||
#Tue Jun 29 00:35:05 EDT 2010
|
||||
copytosourcelist=
|
||||
hreftargetslist=tasks/info/apachelicense.dita,tasks/chapter1/chapter1_1.dita,tasks/chapter1/chapter1.dita,tasks/chapter1/chapter1_3.dita,tasks/chapter1/chapter1_2.dita,tasks/info/hacopyright.dita
|
||||
hreftargetslist=tasks/info/apachelicense.dita,tasks/chapter1/chapter1_1.dita,tasks/chapter1/chapter1.dita,tasks/chapter1/chapter1_3.dita,tasks/chapter1/chapter1_2.dita,tasks/info/hacopyright.dita,tasks/chapter1/chapter1_4.dita
|
||||
fullditatopicfile=fullditatopic.list
|
||||
fullditamapandtopicfile=fullditamapandtopic.list
|
||||
fullditatopiclist=tasks/info/apachelicense.dita,tasks/chapter1/chapter1_1.dita,tasks/chapter1/chapter1.dita,tasks/chapter1/chapter1_3.dita,tasks/chapter1/chapter1_2.dita,tasks/info/hacopyright.dita
|
||||
fullditamapandtopiclist=tasks/info/apachelicense.dita,tasks/chapter1/chapter1_1.dita,tasks/chapter1/chapter1.dita,tasks/chapter1/chapter1_3.dita,tasks/chapter1/chapter1_2.dita,definitive_guide.ditamap,tasks/info/hacopyright.dita
|
||||
fullditatopiclist=tasks/info/apachelicense.dita,tasks/chapter1/chapter1_1.dita,tasks/chapter1/chapter1.dita,tasks/chapter1/chapter1_3.dita,tasks/chapter1/chapter1_2.dita,tasks/info/hacopyright.dita,tasks/chapter1/chapter1_4.dita
|
||||
fullditamapandtopiclist=tasks/info/apachelicense.dita,tasks/chapter1/chapter1_1.dita,tasks/chapter1/chapter1.dita,tasks/chapter1/chapter1_3.dita,tasks/chapter1/chapter1_2.dita,definitive_guide.ditamap,tasks/info/hacopyright.dita,tasks/chapter1/chapter1_4.dita
|
||||
hrefditatopicfile=hrefditatopic.list
|
||||
hrefditatopiclist=tasks/chapter1/chapter1_1.dita,tasks/chapter1/chapter1_3.dita,tasks/chapter1/chapter1_2.dita,tasks/info/hacopyright.dita
|
||||
user.input.file=definitive_guide.ditamap
|
||||
@@ -27,7 +27,7 @@ imagelist=images/halogo.jpg
|
||||
htmlfile=html.list
|
||||
htmllist=
|
||||
canditopicsfile=canditopics.list
|
||||
canditopicslist=tasks/info/apachelicense.dita,tasks/chapter1/chapter1_1.dita,tasks/chapter1/chapter1.dita,tasks/chapter1/chapter1_3.dita,tasks/chapter1/chapter1_2.dita,tasks/info/hacopyright.dita
|
||||
canditopicslist=tasks/info/apachelicense.dita,tasks/chapter1/chapter1_1.dita,tasks/chapter1/chapter1.dita,tasks/chapter1/chapter1_3.dita,tasks/chapter1/chapter1_2.dita,tasks/info/hacopyright.dita,tasks/chapter1/chapter1_4.dita
|
||||
keyreffile=keyref.list
|
||||
subjectschemefile=subjectscheme.list
|
||||
keyreflist=
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
SYSTEM "http://java.sun.com/dtd/properties.dtd">
|
||||
<properties>
|
||||
<entry key="copytosourcelist"></entry>
|
||||
<entry key="hreftargetslist">tasks/info/apachelicense.dita,tasks/chapter1/chapter1_1.dita,tasks/chapter1/chapter1.dita,tasks/chapter1/chapter1_3.dita,tasks/chapter1/chapter1_2.dita,tasks/info/hacopyright.dita</entry>
|
||||
<entry key="hreftargetslist">tasks/info/apachelicense.dita,tasks/chapter1/chapter1_1.dita,tasks/chapter1/chapter1.dita,tasks/chapter1/chapter1_3.dita,tasks/chapter1/chapter1_2.dita,tasks/info/hacopyright.dita,tasks/chapter1/chapter1_4.dita</entry>
|
||||
<entry key="fullditatopicfile">fullditatopic.list</entry>
|
||||
<entry key="fullditamapandtopicfile">fullditamapandtopic.list</entry>
|
||||
<entry key="fullditatopiclist">tasks/info/apachelicense.dita,tasks/chapter1/chapter1_1.dita,tasks/chapter1/chapter1.dita,tasks/chapter1/chapter1_3.dita,tasks/chapter1/chapter1_2.dita,tasks/info/hacopyright.dita</entry>
|
||||
<entry key="fullditamapandtopiclist">tasks/info/apachelicense.dita,tasks/chapter1/chapter1_1.dita,tasks/chapter1/chapter1.dita,tasks/chapter1/chapter1_3.dita,tasks/chapter1/chapter1_2.dita,definitive_guide.ditamap,tasks/info/hacopyright.dita</entry>
|
||||
<entry key="fullditatopiclist">tasks/info/apachelicense.dita,tasks/chapter1/chapter1_1.dita,tasks/chapter1/chapter1.dita,tasks/chapter1/chapter1_3.dita,tasks/chapter1/chapter1_2.dita,tasks/info/hacopyright.dita,tasks/chapter1/chapter1_4.dita</entry>
|
||||
<entry key="fullditamapandtopiclist">tasks/info/apachelicense.dita,tasks/chapter1/chapter1_1.dita,tasks/chapter1/chapter1.dita,tasks/chapter1/chapter1_3.dita,tasks/chapter1/chapter1_2.dita,definitive_guide.ditamap,tasks/info/hacopyright.dita,tasks/chapter1/chapter1_4.dita</entry>
|
||||
<entry key="hrefditatopicfile">hrefditatopic.list</entry>
|
||||
<entry key="hrefditatopiclist">tasks/chapter1/chapter1_1.dita,tasks/chapter1/chapter1_3.dita,tasks/chapter1/chapter1_2.dita,tasks/info/hacopyright.dita</entry>
|
||||
<entry key="user.input.file">definitive_guide.ditamap</entry>
|
||||
@@ -30,7 +30,7 @@
|
||||
<entry key="htmlfile">html.list</entry>
|
||||
<entry key="htmllist"></entry>
|
||||
<entry key="canditopicsfile">canditopics.list</entry>
|
||||
<entry key="canditopicslist">tasks/info/apachelicense.dita,tasks/chapter1/chapter1_1.dita,tasks/chapter1/chapter1.dita,tasks/chapter1/chapter1_3.dita,tasks/chapter1/chapter1_2.dita,tasks/info/hacopyright.dita</entry>
|
||||
<entry key="canditopicslist">tasks/info/apachelicense.dita,tasks/chapter1/chapter1_1.dita,tasks/chapter1/chapter1.dita,tasks/chapter1/chapter1_3.dita,tasks/chapter1/chapter1_2.dita,tasks/info/hacopyright.dita,tasks/chapter1/chapter1_4.dita</entry>
|
||||
<entry key="keyreffile">keyref.list</entry>
|
||||
<entry key="subjectschemefile">subjectscheme.list</entry>
|
||||
<entry key="keyreflist"></entry>
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
<meta name="DC.Relation" scheme="URI" content="../../tasks/chapter1/chapter1_1.html"/>
|
||||
<meta name="DC.Relation" scheme="URI" content="../../tasks/chapter1/chapter1_2.html"/>
|
||||
<meta name="DC.Relation" scheme="URI" content="../../tasks/chapter1/chapter1_3.html"/>
|
||||
<meta name="DC.Relation" scheme="URI" content="../../tasks/chapter1/chapter1_4.html"/>
|
||||
<meta name="prodname" content="Maven权威指南"/>
|
||||
<meta name="version" content="1.0.0.0"/>
|
||||
<meta name="brand" content="HAWEBS Maven"/>
|
||||
@@ -43,6 +44,8 @@
|
||||
</li>
|
||||
<li class="ulchildlink"><strong><a href="../../tasks/chapter1/chapter1_3.html">一个一般的接口</a></strong><br/>
|
||||
</li>
|
||||
<li class="ulchildlink"><strong><a href="../../tasks/chapter1/chapter1_4.html">基于Maven插件的全局性重用</a></strong><br/>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
<?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="基于Maven插件的全局性重用"/>
|
||||
<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_4"/>
|
||||
<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>基于Maven插件的全局性重用</title>
|
||||
</head>
|
||||
<body id="chapter1_4"><a name="chapter1_4"><!-- --></a>
|
||||
|
||||
|
||||
<h1 class="topictitle1">基于Maven插件的全局性重用 </h1>
|
||||
|
||||
|
||||
<div>
|
||||
<p>Maven 的核心其实不做什么实际的事情,除了解析一些 XML 文档,管理生命周期与插件之外,它什么也不懂。Maven 被设计成将主要的职责委派给一组 Maven 插件,这些插件可以影响 Maven 生命周期,提供对目标的访问。绝大多数 Maven 的动作发生于 Maven 插件的目标,如编译源码,打包二进制代码,发布站点和其它构建任务。你从 Apache 下载的 Maven 不知道如何打包 WAR 文件,也不知道如何运行单元测试,Maven 大部分的智能是由插件实现的,而插件从 Maven 仓库获得。事实上,第一次你用全新的 Maven 安装运行诸如 <span class="cmdname">mvn install</span> 命令的时候,它会从中央 Maven 仓库下载大部分核心 Maven 插件。这不仅仅是一个最小化 Maven 分发包大小的技巧,这种方式更能让你升级插件以给你项目的构建提高能力。Maven 从远程仓库获取依赖和插件的这一事实允许了构建逻辑的全局性重用。 </p>
|
||||
|
||||
<p>Maven Surefire 插件是负责运行单元测试的插件。从版本 1.0 发展到目前广泛使用的在 JUnit 基础上增加了 TestNG 测试框架支持的版本。这种发展并没有破坏向后兼容性,如果你使用之前 Surefire 插件编译运行你的 JUnit 3 单元测试,然后你升级到了最新版本的 Surefire 插件,你的测试仍然能成功运行。但是,我们又获得了新的功能,如果你想使用 TestNG 运行单元测试,那么感谢 Surefire 插件的维护者,你已经可以使用 TestNG 了。你也能运行支持注解的 JUnit 4 单元测试。不用升级 Maven 安装或者新装任何软件,你就能获得这些功能。更重要的是,除了 POM 中一个插件的版本号,你不需要更改你项目的任何东西。 </p>
|
||||
|
||||
<p>这种机制不仅仅适用于 Surefire 插件,项目使用 Compiler 插件进行编译,通过 Jar 插件变成 JAR 文件,还有一些插件生成报告,运行 JRuby 和 Groovy 的代码,以及一些用来向远程服务器发布站点的插件。Maven 将一般的构建任务抽象成插件,同时这些插件得到了很好的维护以及全局的共享,你不需要从头开始自定义你项目的构建系统然后提供支持。你完全可以从 Maven 插件获益,这些插件有人维护,可以从远程仓库下载到。这就是基于 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>
|
||||
@@ -17,6 +17,7 @@
|
||||
<li><a href="tasks/chapter1/chapter1_1.html">Maven 它是什么</a></li>
|
||||
<li><a href="tasks/chapter1/chapter1_2.html">约定优于配置(Convention Over Configuration)</a></li>
|
||||
<li><a href="tasks/chapter1/chapter1_3.html">一个一般的接口</a></li>
|
||||
<li><a href="tasks/chapter1/chapter1_4.html">基于Maven插件的全局性重用</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@@ -63,5 +63,6 @@
|
||||
<topicref href="tasks/chapter1/chapter1_1.dita"/>
|
||||
<topicref href="tasks/chapter1/chapter1_2.dita"/>
|
||||
<topicref href="tasks/chapter1/chapter1_3.dita"/>
|
||||
<topicref href="tasks/chapter1/chapter1_4.dita"/>
|
||||
</topicref>
|
||||
</map>
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
<?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
|
||||
* [email protected] / [email protected]
|
||||
*
|
||||
* +++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
* 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_4" xml:lang="zh">
|
||||
<title>基于Maven插件的全局性重用 </title>
|
||||
<prolog>
|
||||
<metadata>
|
||||
<keywords>
|
||||
<indexterm>Apache</indexterm>
|
||||
<indexterm>Maven</indexterm>
|
||||
<indexterm>介绍</indexterm>
|
||||
</keywords>
|
||||
</metadata>
|
||||
</prolog>
|
||||
<conbody>
|
||||
<p>Maven 的核心其实不做什么实际的事情,除了解析一些 XML 文档,管理生命周期与插件之外,它什么也不懂。Maven 被设计成将主要的职责委派给一组 Maven 插件,这些插件可以影响 Maven 生命周期,提供对目标的访问。绝大多数 Maven 的动作发生于 Maven 插件的目标,如编译源码,打包二进制代码,发布站点和其它构建任务。你从 Apache 下载的 Maven 不知道如何打包 WAR 文件,也不知道如何运行单元测试,Maven 大部分的智能是由插件实现的,而插件从 Maven 仓库获得。事实上,第一次你用全新的 Maven 安装运行诸如 <cmdname>mvn install</cmdname> 命令的时候,它会从中央 Maven 仓库下载大部分核心 Maven 插件。这不仅仅是一个最小化 Maven 分发包大小的技巧,这种方式更能让你升级插件以给你项目的构建提高能力。Maven 从远程仓库获取依赖和插件的这一事实允许了构建逻辑的全局性重用。 </p>
|
||||
<p>Maven Surefire 插件是负责运行单元测试的插件。从版本 1.0 发展到目前广泛使用的在 JUnit 基础上增加了 TestNG 测试框架支持的版本。这种发展并没有破坏向后兼容性,如果你使用之前 Surefire 插件编译运行你的 JUnit 3 单元测试,然后你升级到了最新版本的 Surefire 插件,你的测试仍然能成功运行。但是,我们又获得了新的功能,如果你想使用 TestNG 运行单元测试,那么感谢 Surefire 插件的维护者,你已经可以使用 TestNG 了。你也能运行支持注解的 JUnit 4 单元测试。不用升级 Maven 安装或者新装任何软件,你就能获得这些功能。更重要的是,除了 POM 中一个插件的版本号,你不需要更改你项目的任何东西。 </p>
|
||||
<p>这种机制不仅仅适用于 Surefire 插件,项目使用 Compiler 插件进行编译,通过 Jar 插件变成 JAR 文件,还有一些插件生成报告,运行 JRuby 和 Groovy 的代码,以及一些用来向远程服务器发布站点的插件。Maven 将一般的构建任务抽象成插件,同时这些插件得到了很好的维护以及全局的共享,你不需要从头开始自定义你项目的构建系统然后提供支持。你完全可以从 Maven 插件获益,这些插件有人维护,可以从远程仓库下载到。这就是基于 Maven 插件的全局性重用。 </p>
|
||||
</conbody>
|
||||
</concept>
|
||||
Reference in New Issue
Block a user