1
votes

What is the difference between running a maven build on a maven project

mvn install 

then importing the module in eclipse (Import > Existing Maven Projects) as a maven artifact versus running

mvn install eclipse:eclipse 

and importing the maven project as a regular project (Import > Existing Projects into Workspace)?

The second option seems faster within eclipse (mvn install eclipse:eclipse) but I'm not sure why.

1

1 Answers

7
votes

When you import an existing Maven project, it is done by m2e, the official Eclipse Maven plugin (when I say official I mean it is in the Eclipse incubation process). It offers more features and can be more convenient to use in my experience

When you do it by eclipse:eclipse, it is done by a Maven Eclipse mojo which creates a simple Java project. The problem is that you have to re-do this again every time you change your pom.xml. With m2e, this is usually done automatically.