Introduction

Maven, a Yiddish word meaning accumulator(累加器) of knowledge, began 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. 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.

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, Maven deals with several areas of concern:

  • Making the build process easy
  • Providing a uniform build system
  • Providing quality project information
  • Encouraging better development practices

Making the build process easy

While using Maven doesn’t eliminate(排除) the need to know about the underlying mechanisms(机制), Maven does shield(屏蔽) developers from many details.

虽然使用 Maven 并不能消除了解底层机制的需要

Providing a uniform build system

Maven builds a project using its project object model (POM) and a set of plugins. Once you familiarize yourself with one Maven project, you know how all Maven projects build. This saves time when navigating many projects.

Providing quality project information

Maven provides 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 created directly from source control(改变log创建的路径)
  • Cross referenced sources(交叉引用来源)
  • Mailing lists managed by the project
  • Dependencies used by the project
  • Unit test reports including coverage

Third party code analysis products also provide Maven plugins that add their reports to the standard information given by Maven.

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 test source code in a separate(分离), but parallel source tree(并行源树)
  • Using test case naming conventions(公约) to locate and execute tests
  • Having test cases setup their environment instead of customizing(定制) the build for test preparation
  • 让测试用例设置他们的环境,而不是为测试准备定制构建

Maven also assists in project workflow such as release and issue management.

Maven also suggests some guidelines(指导方针) on how to layout your project’s directory structure. Once you learn the layout, you can easily navigate other projects that use Maven.

While takes an opinionated approach to project layout, some projects may not fit with this structure for historical reasons. While Maven is designed to be flexible to the needs of different projects, it cannot cater to every situation without compromising its objectives.

If your project has an unusual(异常) build structure that cannot be reorganized, you may have to forgo some features or the use of Maven altogether(完全 adv.).

What is Maven Not?

You might 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
  • Maven 是一组可重用的 Ant 脚本

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.

What is maven?的更多相关文章

  1. Android studio 中引用jar的其实是Maven?(二)

    上一篇:Android studio 中引用jar的其实是Maven?(一) 搭建maven仓库: 去了解一个新的事物的时候,最好的方式就是去使用它.例如去了解一座城市的时候,最好的方式就是乘坐公共交 ...

  2. Android studio 中引用jar的其实是Maven?(一)

    由于Studio比eclipse多了一步对工程构建的步骤,即为build.gradle这个文件运行,因此其引入第三方开发jar包与lib工程对比Eclipse已完成不同,引入第三方jar与lib工程显 ...

  3. 为什么要用Maven?

    早期还在学怎么用Ant构建项目时,就有看到说Maven是Ant的替代品,但真正意义去了解Maven,还是因为以前的公司一老员工在做OpenJMS二次开发时,从网上下载了源码,然后用Maven构建它. ...

  4. 头条一面竟然问我Maven?

    maven package和maven install 有什么区别? 你常用的maven命令有哪些? <dependencyManagement> 是干什么的? 还有用过其它构建工具吗? ...

  5. 什么是Maven? 使用Apache Maven构建和依赖项管理

    通过优锐课java架构学习中,学到了不少干货,整理分享给大家学习. 开始使用最流行的Java构建和依赖管理工具Maven Apache Maven是Java开发的基石,也是Java使用最广泛的构建管理 ...

  6. 什么是Maven?

    绝大部分Maven用户都会说:Maven是一个“构建工具”——一个用来把源代码构建成可发布的构建的工具. 构建工程师和项目经理会说Maven是一个更复杂的东西:一个项目管理工具. Maven除了提供构 ...

  7. 什么是maven?maven中的pom文件是做什么的?

    Maven 是专门用于构建和管理Java相关项目的管理工具. 1.使用Maven管理的Java 项目都有着相同的项目结构 2.统一维护jar包 POM是项目对象模型(Project Object Mo ...

  8. 取代 Maven?这款项目构建工具性能提升 300%

    在 GitHub 上闲逛的时候,发现了一个新的项目:maven-mvnd,持续霸占 GitHub trending 榜单好几天了. maven-mvnd,可以读作 Maven Daemon,译作 Ma ...

  9. Maven学习总结(14)——Maven 多模块项目如何分工?

    一.开场白 使用Maven有段时间了,只能感慨真是个好东西,让我从传统模式体会到了严谨.规范.敏捷.方便的特性. 如果你懂Maven或许看过Juven翻译的<Maven权威指南>: 发个牢 ...

随机推荐

  1. 修改VScode底部状态栏颜色

    点击齿轮进入setting 搜索workbench.colorCustomizations,然后点击编辑setting.json 修改为你喜欢的颜色即可,我这里修改为蓝色 例子: "work ...

  2. Linux(CentOS-8)安装MySQL8.0.11

    CentOS安装MySQL8.0.11 总的思路就是:安装MySQL,编写配置文件,配置环境变量,成功开启服务,登陆并修改ROOT密码 开启远程访问的思路就是:授权用户所有IP都可以访问,系统的数据库 ...

  3. linux命令解压压缩rar文件

    一.widonds下打包rar文件并上传 yum install lrzsz rz test.rar 二.下载并安装rar软件 2.1 下载 mkdir -p /home/oldboy/tools c ...

  4. Pytest自动化测试-简易入门教程(01)

    我们今天主讲的内容,就是测试框架Pytest,讲到这个测试框架对于没有做过Web自动化的伙伴来说,会觉得这个东西是陌生的,那么到底什么是框架呢?什么又是自动化呢?自动化为什么又要用框架呢? 难道我学自 ...

  5. 【Spring浅析】一、 BeanFactory 有啥可说的?

    阅读 Spring 源码,BeanFactory 是避不了的存在.而大家常见的使用场景,也是以下形式: ConfigurableApplicationContext ctx = SpringAppli ...

  6. Solon 的过滤器 Filter 和两种拦截器 Handler、 Interceptor

    在web开发中,过滤器.拦截器是经常用到的功能.它可以帮我们限制流量.验证是否登陆.记录日志以及统计执行效率等等. 今天主要交流一下 Solon 框架中的过滤器和拦截器. Solon 是什么框架? S ...

  7. 腾讯云原生混合云-第三方集群弹EKS应对突发流量的利器

    作者 何鹏飞,腾讯云专家产品经理,曾作为容器私有云.TKEStack的产品经理兼架构师,参与腾讯云内部业务.外部客户容器化改造方案设计,目前负责云原生混合云产品方案设计工作. 胡晓亮,腾讯云专家工程师 ...

  8. MSSQL·CLI执行T-SQL

    阅文时长 | 0.44分钟 字数统计 | 480.8字符 主要内容 | 1.引言&背景 2.详细步骤&排坑指南 3.中途执行异常处理方式 4.声明与参考资料 『MSSQL·CLI执行T ...

  9. 佳能m62套机5500 佳能EOS M50 M6 MARK2 II二代 最低到过5800

    佳能m62套机5500 佳能EOS M50 M6 MARK2 II二代

  10. Linux shell sed命令在文件行首行尾添加字符

    昨天写一个脚本花了一天的2/3的时间,而且大部分时间都耗在了sed命令上,今天不总结一下都对不起昨天流逝的时间啊~~~ 用sed命令在行首或行尾添加字符的命令有以下几种: 假设处理的文本为test.f ...