maven开篇

今天开始记录学习MAVEN的笔记,当然这里的maven指的是maven2。

首先介绍什么是maven?
根据官网介绍,maven在犹太词里的意思是知识的仓库,这个创意源于Jakarta Turbine这个项目,由于多个project都需要用ant来bulid,并且把jar包check into到CVS,他们需要有一个标准的方法去构建,编译,组合,发布project,并且能共享JARs。maven就这样诞生了。

maven能解决什么?
maven的主要目的是允许程序员在短期内领会在开发中的所有状态。为了达到这个目的,maven考虑了以下几个方面来处理:
Making the build process easy
Providing a uniform build system
(每个项目一个project object model (POM) ,并且共享plugs)
Providing quality project information
Providing guidelines for best practices development
最佳开发实践:


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
(应该是提供自定义的plug来保证这点)


特性:
大致有以下几个:
1.方便编译,打包,发布。
2.可扩展的plug
3.可统一管理2方库,3方库
以上三点比较吸引我。



下面的官网原话。

The following are the key features of Maven in a nutshell:

Simple project setup that follows best practices - get a new project or module started in seconds
Consistent usage across all projects means no ramp up time for new developers coming onto a project
Superior dependency management including automatic updating, dependency closures (also known as transitive dependencies)
Able to easily work with multiple projects at the same time
A large and growing repository of libraries and metadata to use out of the box, and arrangements in place with the largest Open Source projects for real-time availability of their latest releases
Extensible, with the ability to easily write plugins in Java or scripting languages
Instant access to new features with little or no extra configuration
Ant tasks for dependency management and deployment outside of Maven
Model based builds: Maven is able to build any number of projects into predefined output types such as a JAR, WAR, or distribution based on metadata about the project, without the need to do any scripting in most cases.
Coherent site of project information: Using the same metadata as for the build process, Maven is able to generate a web site or PDF including any documentation you care to add, and adds to that standard reports about the state of development of the project. Examples of this information can be seen at the bottom of the left-hand navigation of this site under the "Project Information" and "Project Reports" submenus.
Release management and distribution publication: Without much additional configuration, Maven will integrate with your source control system such as CVS and manage the release of a project based on a certain tag. It can also publish this to a distribution location for use by other projects. Maven is able to publish individual outputs such as a JAR, an archive including other dependencies and documentation, or as a source distribution.
Dependency management: Maven encourages the use of a central repository of JARs and other dependencies. Maven comes with a mechanism that your project's clients can use to download any JARs required for building your project from a central JAR repository much like Perl's CPAN. This allows users of Maven to reuse JARs across projects and encourages communication between projects to ensure that backward compatibility issues are dealt with. We are collaborating with the folks at Ibiblio who have graciously allowed the central repository to live on their servers.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值