Maven学习(一)What is Maven?

公司的项目是用maven来管理的,趁着时间就来学习一下,不知从何学起,就先从官网看看。
[url]http://maven.apache.org/what-is-maven.html[/url]

What is Maven?
官网是这么给的。
Introduction
Maven, a Yiddish word meaning accumulator of knowledge, was originally started as an attempt to simplify the build processes in the Jakarta Turbine project. There were several projects each with their own Ant build files that were all slightly different and JARs were checked into CVS. We wanted a standard way to build the projects, a clear definition of what the project consisted of, an easy way to publish project information and a way to share JARs across several projects.

The result is a tool that can now be used for building and managing any Java-based project. We hope that we have created something that will make the day-to-day work of Java developers easier and generally help with the comprehension of any Java-based project.

翻译:
Maven,犹太语知识的积聚者,最初开始是为了简化Jakarta Turbine工程的构建过程。有几个项目的Ant build文件仅有细微的差别,而JAR文件都由CVS来维护。我们想要一个标准方法构建项目,一个清晰定义的项目包括,一个简单的方法来发布项目信息和跨多个项目共享jar的一种方式。

结果是一个工具,可以用于构建和管理任何基于java项目。我们希望创建的东西会让Java开发人员的日常工作更加容易,通常帮助任何基于Java项目的理解。

Maven’s Objectives
Maven’s primary goal is to allow a developer to comprehend the complete state of a development effort in the shortest period of time. In order to attain this goal there are several areas of concern that Maven attempts to deal with:

Making the build process easy
Providing a uniform build system
Providing quality project information
Providing guidelines for best practices development
Allowing transparent migration to new features

Maven的目标
Maven的主要目标是允许开发人员理解完整的开发工作在最短的时间内。为了实现这一目标有几个担心Maven试图处理领域:
使构建过程简单
提供一个统一的构建系统
提供优质项目信息
最佳实践发展提供指导
允许透明迁移到新特性


Making the build process easy
While using Maven doesn’t eliminate the need to know about the underlying mechanisms, Maven does provide a lot of shielding from the details.

Providing a uniform build system
Maven allows a project to build using its project object model (POM) and a set of plugins that are shared by all projects using Maven, providing a uniform build system. Once you familiarize yourself with how one Maven project builds you automatically know how all Maven projects build saving you immense amounts of time when trying to navigate many projects.

使构建过程简单
尽管使用Maven并不消除需要了解底层机制,Maven提供屏蔽的很多细节。
提供一个统一的构建系统
Maven允许一个项目构建使用其项目对象模型(POM)和一组共享的所有项目使用Maven插件,提供一个统一的构建系统。一旦你熟悉你怎么一个Maven项目构建自动知道所有Maven项目构建节约你大量的时间,当试图浏览许多项目。

Providing quality project information

Maven provides plenty of useful project information that is in part taken from your POM and in part generated from your project’s sources. For example, Maven can provide:
Change log document created directly from source control
Cross referenced sources
Mailing lists
Dependency list
Unit test reports including coverage
As Maven improves the information set provided will improve, all of which will be transparent to users of Maven.

Other products can also provide Maven plugins to allow their set of project information alongside some of the standard information given by Maven, all still based on the POM.

提供优质项目信息

Maven项目提供了大量的有用信息,在一定程度上来自你的POM和部分生成项目的来源。例如,Maven可以提供:
更改日志文件创建直接从源代码控制
交叉引用的来源
邮件列表
依赖项列表
单元测试报告包括覆盖
随着Maven的提高会提高提供的信息集合,所有这些都将对Maven用户透明。

其他产品也可以提供Maven插件允许他们组项目信息和一些标准的信息由Maven,仍然基于POM。

Providing guidelines for best practices development
Maven aims to gather current principles for best practices development, and make it easy to guide a project in that direction.

For example, specification, execution, and reporting of unit tests are part of the normal build cycle using Maven. Current unit testing best practices were used as guidelines:

Keeping your test source code in a separate, but parallel source tree
Using test case naming conventions to locate and execute tests
Have test cases setup their environment and don’t rely on customizing the build for test preparation.
Maven also aims to assist in project workflow such as release management and issue tracking.

Maven also suggests some guidelines on how to layout your project’s directory structure so that once you learn the layout you can easily navigate any other project that uses Maven and the same defaults.

Allowing transparent migration to new features
Maven provides an easy way for Maven clients to update their installations so that they can take advantage of any changes that been made to Maven itself.

Installation of new or updated plugins from third parties or Maven itself has been made trivial for this reason.


最佳实践发展提供指导
Maven旨在收集当前的最佳实践开发的原则,并使其易于指导一个项目在这个方向上。
例如,规范、执行和报告单元测试正常使用Maven构建循环的一部分。当前使用单元测试的最佳实践指南:
保持在一个单独的测试源代码,但是并行源代码树
使用测试用例的命名约定来定位和执行测试
测试用例设置他们的环境,不要依赖定制构建的测试准备。
Maven还旨在协助项目工作流发布管理、问题跟踪等。
Maven也表明一些指导方针如何布局项目的目录结构,所以一旦你学会布局可以轻松地导航使用Maven和违约的任何其他项目。
允许透明迁移到新特性
Maven提供了一种简便的方法对于Maven客户更新安装,这样他们可以利用的任何更改了Maven本身。
安装新的或更新插件从第三方或Maven本身已经取得了微不足道的出于这个原因。


What is Maven Not?

You may have heard some of the following things about Maven:

Maven is a site and documentation tool
Maven extends Ant to let you download dependencies
Maven is a set of reusable Ant scriptlets
While Maven does these things, as you can read above in the “What is Maven?” section, these are not the only features Maven has, and its objectives are quite different.

Maven does encourage best practices, but we realise that some projects may not fit with these ideals for historical reasons. While Maven is designed to be flexible, to an extent, in these situations and to the needs of different projects, it can not cater to every situation without making compromises to the integrity of its objectives.

If you decide to use Maven, and have an unusual build structure that you cannot reorganise, you may have to forgo some features or the use of Maven altogether.

Maven是什么不?
你可能听说过一些Maven以下事情:
Maven是一个网站和文档工具
Maven扩展Ant让你下载附件
Maven是一组可重用的Ant脚本
虽然Maven行这些事的,正如上面你可以阅读“Maven是什么?”部分,这些并不是唯一的特性Maven,和它的目标有很大的不同。
Maven并鼓励最佳实践,但我们意识到,一些项目可能不符合这些理想由于历史原因。虽然Maven设计是灵活的,在某种程度上,在这些情况下,不同的项目的需要,不能满足每种情况不作妥协的完整性目标。
如果你决定使用Maven,一个不寻常的建造结构,你不能重组,你可能不得不放弃一些功能或完全使用Maven。
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值