论坛首页 综合技术论坛

为什么要用maven - 1

浏览 17144 次
精华帖 (2) :: 良好帖 (3) :: 新手帖 (9) :: 隐藏帖 (0)
作者 正文
   发表时间:2011-03-28  
cyberblue 写道
为什么不能用Maven?

1. 有些项目已经积重难返,谁也搞不清楚里面哪些库有用哪些库没用,甚至一些已经没有人再维护的库还在用。
2. 程序员日用品化,员工换了一茬又一茬,留下了大量连架构师都搞不清楚的架构。
3. 大部分项目被IDE绑架,离了eclipse根本没法跑起来,为何Oracle拼命支持Maven?就是要打破eclipse的垄断
4. 某些在Build过程中需要调用脚本的项目,要迁移到Maven上还是离不开ant
5. “现在不是能用么?为什么还要用Maven?”

下面阐述一下我自己的经验,

我喜欢开源项目,特别是喜欢找一些开源项目的源代码,用了maven的开源项目,结构非常清晰,很容易就能读懂,用了maven的开源项目就是为了结构清楚,方便别人加入,maven起先就是为了开源项目定制的,而且喜欢maven的人,大多不会再去写ant脚本,也不会再用eclipse建项目,Maven就是一分离出来的小众工具,没计划要变成大众软件

你说的确实是一些现实问题。不过我觉得尽量还是朝着更好的方向走才会走的更好。至少在新项目中可以用起来,老的项目可以先不动,等下次升级或者维护的时候在慢慢迁移。
0 请登录后投票
   发表时间:2011-05-22  
最大优点就是库、代码、IDE三者分离了,额外的优点是类库,源码管理,标准化
0 请登录后投票
   发表时间:2011-11-01  
gigix 写道
ltian 写道
gigix 写道
那个,我第一次用Maven是8年前…现在还在讨论“为什么要用”啊?

用了8年,写点心得呗!做点贡献!

心得噢…转帖个内部邮件吧
引用
Maven has a lot of very poor conventions.

The conventions work if you follow them exactly and if you project is suited to being constrained by those conventions. Every single enterprise web project I have ever worked on has not fit into those conventions.
This means you end up having to 'hack' into the conventions to get the behaviour you want ( add a performance test run as part of the 'functional' tests for example ).

Also the conventions are poorly explained and poorly documented, especially when you start using plugins. The result is a mess that is only comprehensible to a maven 'expert'. The cost of writing the basic build functionality yourself so that you have build system that is traceable without knowledge of obscure maven magic is more than worth it IMHO.

If is for these reasons that we have rippend Maven out of a lot of projects over the years.

Buildr looks like it allows you to drop down Ant or Ruby if you need to which sounds promising - I would still need convincing that it adds enough benefit to be worthwhile. Be wary of tools that make the easy stuff trivial, and the hard stuff harder.

基本上,我对Maven的态度就是这样:如果一个项目已经在用它,fine,我不介意;如果还没有开始用,嗯,there must be something better than it given the fact it has been there for over 8 years.


oh...guru...u'r soooo right...
this is exactly wut is happening to my team... I hate maven poor conventions...
0 请登录后投票
论坛首页 综合技术版

跳转论坛:
Global site tag (gtag.js) - Google Analytics