Maven 3-值得吗?

扫码查看
本文介绍了Maven 3-值得吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Maven 3测试版已经发布了两个星期,我只想在Maven 3的功能列表中获得您的看法.因为对我而言,仅添加了两个主要功能

Maven 3 beta is out since a couple of weeks and I just want to get your views on the feature list for Maven 3. Because to me, only two major features were added

  1. 在构建生命周期中并行执行项目
  2. 自定义生命周期

其他所有内容似乎都已修正错误或有轻微改进.所以你怎么看? Maven 3值得等待吗?

Everything else seems like a bug fix or a minor improvement. So what do you think? Will Maven 3 be worth the wait?

推荐答案

Maven 3的新增功能是什么?这是您在网上可以找到的一些小汇编.

What's new in Maven 3? Here is a little compilation of what you can find around the net.

  • 向后兼容-Maven 3向后兼容,即极其非常重要(特别是对于那些经历了从Maven 1到Maven 2过渡的人们).
  • 无版本父元素-Maven 3无需在子模块中指定父版本. 这个很棒(在Maven 3.1中).
  • Mixins-用于POM合成(在Maven 3.1 AFAIK中).
  • 使用属性的XML POM格式-您可以使用属性代替元素.
  • Polyglot Maven -您现在可以用不同的语言编写POM文件了(我个人并没有为此感到烦恼XML格式,所以我不确定我会经常使用这种格式).
  • 扩展点-装饰生命周期或插件(挂钩行为而不是扩展插件).
  • 可查询的生命周期-执行计划和执行的分离.
  • Plugin-API中的更改-这更多地面向插件开发人员(注释而不是javadoc标记,扩展点,可查询的生命周期).
  • 更好的错误和完整性报告-错误更加清晰并链接到Maven 3 Wiki,以获取详细说明.用户会喜欢的.
  • 实际上,Maven 3使用以太而不是水星.
  • Maven Embedder-这对于IDE和构建工具(可以侦听"构建过程)非常有用.
  • 增量构建支持-对M2Eclipse尤其有用(大大提高了性能).
  • 从Maven核心中提取的
  • 网站和报告-,报告则可以(但邀请您使用Sonar这样的外部质量工具).
  • Maven Shell -优化的执行环境(Maven Shell非常强大).
  • Backward compatibility - Maven 3 is backward compatible, that is extremely important (especially for those who experienced the Maven 1 to Maven 2 transition).
  • Versionless parent elements - Maven 3 will remove the need to specify the parent version in sub modules. THIS is great (in Maven 3.1).
  • Mixins - For POM composition (in Maven 3.1 AFAIK).
  • XML POM format using attributes - You can use attributes instead of elements.
  • Polyglot Maven - You can write your POM files now in different languages (I'm personally not annoyed by the XML format so I'm not sure I'll use this that often).
  • Extensions points - To decorate the lifecycle or plugins (to hook behavior instead of extending plugins).
  • Queryable lifecycle - Decoupling of execution plans and execution.
  • Changes in the Plugin-API - This is more targeted at plugins developers (annotations instead of javadoc tags, extensions points, queryable lifecycle).
  • Better error and integrity reporting - Errors are more clear and linked to the Maven 3 wiki for a detailed explanation. Users will enjoy this.
  • Actually, Maven 3 uses Aether instead of Mercury.
  • Maven Embedder - This is great for IDEs and build tools (that can "listen" to the build process).
  • Incremental build support - especially useful for M2Eclipse (big performance boost).
  • Site and reporting extracted from Maven core - , reporting does (but you are invited to favor external quality tools like Sonar).
  • Maven shell - An optimized execution environment (Maven Shell is awesome).

总而言之,您并没有完全错误,表面没有太多更改(尽管我真的很享受更好的错误报告功能,只是等不及缺少版本的父元素而已).但是引擎盖下的更改使Maven 3 快得多,而这是巨大的.我希望,新的可能性会带来巨大的创新(尽管还会出现).

To summarize, you're not totally wrong, there aren't that many changes at the surface (although I really enjoy the better error reporting and just can't wait for the version-less parent elements stuff). But the changes under the hood make Maven 3 much faster and this is huge. And I expect great innovations to happen with the new offered possibilities (yet to come though).

最后,性能提升已经足以使我值得(在更短的时间内完成建设是极有价值的),而其他方面则是额外的收获.而且由于我没有广泛使用站点插件,因此我已经在某些版本中使用Maven 3超过4个月了,对此我感到非常满意.

At the end, the performance improvement is already enough to make it worth for me (building in less time is extremely valuable) and other things are bonuses. And since I'm not using the site plugin extensively, I'm already using Maven 3 for more than 4 months on some of my builds and I'm more than happy with it.

  • A Guide to Maven 3 Beta
  • Maven reloaded (from devoxx)
  • Maven 3.x preview
  • Whats new in Maven 3
  • Jason van Zyl on the Future of Maven: Maven 3

这篇关于Maven 3-值得吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-22 08:25
查看更多