m3th0dman m3th0dman -4 years ago 173
Java Question

Maven IDEA plugin (or eclipse plugin)

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?

Answer Source

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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download