为什么Maven有这么糟糕的代表? [英] Why does Maven have such a bad rep?

查看:146
本文介绍了为什么Maven有这么糟糕的代表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

互联网上有很多关于Maven如何糟糕的话题。我已经使用Maven的一些功能已经有几年了,我认为最重要的好处是依赖管理。

There is a lot of talk on the internet about how Maven is bad. I have been using some features of Maven for a few years now and the most important benefit in my view is the dependency management.

Maven文档不够充分,但通常当我需要完成某些事情时,我会弄明白一次,然后它就可以了(例如我实施签名时)。我不认为Maven是伟大的,但它确实解决了一些问题,如果没有它将是一个真正的痛苦。

Maven documentation is less than adequate, but generally when I need to accomplish something I figure it out once and then it works (for example when I implemented signing the jars). I don't think that Maven is great, but it does solve some problems that without it would be a genuine pain.

那么,为什么Maven有这么糟糕的代表以及Maven在未来会遇到什么问题?也许还有更多我不了解的替代方案? (例如,我从未详细研究过Ivy。)

So, why does Maven have such a bad rep and what problems with Maven can I expect in the future? Maybe there are much better alternatives that I don't know about? (For example, I never looked at Ivy in detail.)

注意:这不是试图引发争论。这是尝试清除FUD。

NOTE: This is not an attempt to cause an argument. It is an attempt to clear the FUD.

推荐答案

我当然是 bitched&在过去呻吟着maven 。但现在,我不会没有它。我觉得这些好处远远超过任何问题。主要是:

I've certainly bitched & moaned about maven in the past. But now, I wouldn't be without it. I feel that the benefits far outweigh any problems. Chiefly:


  • 标准化的项目结构。


    • 鉴于新开发人员加入项目:


      • 当你说这是一个Maven项目,然后开发人员知道项目布局以及如何构建和打包项目

      • 当你说它是一个Ant项目时,开发人员将不得不等待你解释更多或将要通过build.xml来解决问题。


      • 不仅有外部库,还有内部库/模块。请务必使用Maven存储库代理服务器,例如 Nexus Artifactory

      • 常春藤。事实上,如果您只需要一个依赖管理,那么您最好使用Ivy。

      • Not just with external libraries but also with internal libraries/modules. Be sure to use a Maven repository proxy server such as Nexus or Artifactory.
      • It's possible to do some of this with Ivy. In fact, if all you need is a dependency management, you're probably better off using Ivy.

      我的缺点主要是:


      • 命令行非常无用。这让我开始了很多。

      • XML格式非常详细。我可以看出为什么这样做,但阅读仍然是一种痛苦。


        • 这就是说,它有一个XSD,可以在IDE中轻松编辑。

        • The definitive guide to maven is a good introduction however.

        我真的相信值得花一个了解maven的时间不多。

        I truly believe that it's worth spending a little bit of time getting to know maven.

        这篇关于为什么Maven有这么糟糕的代表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆