Maven IDEA插件(或eclipse插件) [英] Maven IDEA plugin (or eclipse plugin)

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

问题描述

根据我的理解,在Intellij中使用这个想法插件打开一个使用Maven构建的项目并不是最好的方式,即调用:

  mvn idea:idea 

但直接打开pom文件(Intellij具有Maven的默认插件);对于eclipse来说,同样的事情。



你能为一些更好的方法提供一些论据吗?

解决方案

这同样适用于IntelliJ和Maven:




  • 更改 pom.xml 文件不会反映在您的IDE中,您必须重新构建项目(可能会丢失一些配置(?))。此外,如果任何团队成员修改 pom.xml ,您必须记住重新建立项目(这将需要关闭并重新打开它)。


  • 打开新项目时需要额外的步骤


  • IDE有一些其他Maven功能,例如两个上述的环境都可以显示依赖关系图




只有当您的IDE变得疯狂,才能使用mvn插件作为最后的手段找出maven配置正确。


From what I have understood, it is not the best way to open a project built with Maven in Intellij by using the idea plug-in, that is by calling:

mvn idea:idea

but by open directly the pom file (Intellij has default plug-in for Maven); the same thing, for eclipse.

Could you provide some arguments on why this is a better approach?

解决方案

This applies equally to IntelliJ and Maven:

  • changing pom.xml file is not reflected in your IDE, you must rebuild the project (possibly losing some configuration (?)) every time. Moreover, if any team member modifies pom.xml, you have to remember about rebulding your project (which will require closing and reopening it).

  • additional step is required when opening new project

  • IDEs have some other Maven features, e.g. both of aforementioned environemnts can show dependency graphs

Use mvn plugin as a last resort only when your IDE goes crazy and cannot figure out maven configuration correctly.

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

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