Maven与Eclipse [英] Maven vs. Eclipse

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

问题描述

我有一个完全用Java编写的项目,并使用几个外部Java库(hibernate,几个Apache公共,MQ,很标准的东西)。



我我曾经和Eclipse一起工作,但这个项目 - 我从一组不再在公司的开发人员继承下来 - 依靠Maven。



我不知道为什么他们首先使用Maven(他们不能与我分享这些知识)。该项目是中等大小,没有任何公司正在做的太复杂了。



现在我的问题是:有什么理由要保留Maven吗?阅读周围,我找不到任何这样做的真正原因,我对目录结构特别不满意,这需要我下载3个级别来获取实际的Java包和Java代码。



(我想做的只是将所有内容移到Eclipse,使用Eclipse结构,这是一个1-2天的工作,让它运行,所以没有大的时间损失,从我现在的角度来看,这将使我的生活更加简单,向前迈进,让我为雇佣我的公司做更好的工作。)

解决方案

是的:手工管理传递依赖是一个傻瓜的差事,它有一大堆其他功能,手工也很复杂。



一般来说,仅依靠IDE的构建过程就是一个坏主意。并不是每个人都使用相同的IDE,或者是IDE的版本,或者是IDE。除了后者,CI系统是无头的,并且依赖于构建文件。



使用Eclipse-Maven插件,如 m2eclipse 或类似的。


I have a project written entirely in Java, and using several external Java libraries (hibernate, a couple of Apache commons, MQ, pretty standard stuff.)

I'm used to working with Eclipse, but this project -- which I'm inheriting from a group of developers no longer in the company -- is relying on Maven.

I have no idea why did they use Maven in the first place (they're not available for sharing this knowledge with me.) The project is medium size, and nothing the company is doing is too complex.

Now my question is: is there any reason for me to keep Maven? Reading around, I can't find any real reason for doing so, and I'm especially unhappy about the directory structure, which requires me to go down 3 levels to get to the actual Java package, and Java code.

(What I would like to do is simply move everything to Eclipse, using the Eclipse structure. It's a matter of 1-2 days of work to get it running, so no big loss of time, and from my point of view right now, it will make my life simpler moving forward, and allow me to do a better job for the company that hires me.)

解决方案

Yes: managing transitive dependencies by hand is a fool's errand, and it has a ton of other functionality that is also complicated to do manually.

Relying solely on an IDE's build process is, in general, a Bad Idea. Not everybody uses the same IDE, or version of an IDE, or an IDE at all. Along with the latter, CI systems are headless and rely on build files.

Use an Eclipse-Maven plugin like m2eclipse or similar.

这篇关于Maven与Eclipse的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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