You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Marko Asplund <ma...@ixonos.com> on 2012/03/07 09:48:11 UTC

Importing Maven projects in Eclipse

Hi,

I'm using Maven 3 and the m2e Eclipse plugin.
Normally i import my Maven projects into Eclipse using the Import /
Existing Maven projects.
There are some cases where this option doesn't seem to be available e.g.
(with EGit) so I need an alternative method.
Can I use the Maven eclipse:eclipse plugin for generating the Eclipse
project files and then import as regular, existing projects?
Or is there another way to do this?

There were some notes on m2e FAQ that the two plugins are somehow
incompatible:
http://wiki.eclipse.org/M2E_FAQ#Maven_Integration_for_Eclipse_vs._Maven_eclipse:eclipse_plugin

Is this correct?


marko

Re: Importing Maven projects in Eclipse

Posted by Curtis Rueden <ct...@wisc.edu>.
Hi Marko,

I'm using Maven 3 and the m2e Eclipse plugin.
> Normally i import my Maven projects into Eclipse using the Import /
> Existing Maven projects.
> There are some cases where this option doesn't seem to be available e.g.
> (with EGit) so I need an alternative method.
>

I use m2e + EGit for all of my projects, and it works great. If you want to
clone the Git repository directly into Eclipse then use the "Check out
Maven Projects from SCM" import option. You will need to install the
"m2e-egit" connector from the m2e Marketplace. I strongly advise using
Eclipse 3.7 Indigo.

Personally, I prefer to use git on the command line to clone your repo,
then import into Eclipse using "Existing Maven projects" as you suggest.
Then you need to select your new projects, right-click, select Team > Share
Project..., select Git and then check the "Use or create repository in
parent folder of project" box. Click Finish and it will enable the
EGit-related functionality for your projects.

So obvious, right?

HTH,
Curtis


On Wed, Mar 7, 2012 at 2:48 AM, Marko Asplund <ma...@ixonos.com>wrote:

> Hi,
>
> I'm using Maven 3 and the m2e Eclipse plugin.
> Normally i import my Maven projects into Eclipse using the Import /
> Existing Maven projects.
> There are some cases where this option doesn't seem to be available e.g.
> (with EGit) so I need an alternative method.
> Can I use the Maven eclipse:eclipse plugin for generating the Eclipse
> project files and then import as regular, existing projects?
> Or is there another way to do this?
>
> There were some notes on m2e FAQ that the two plugins are somehow
> incompatible:
>
> http://wiki.eclipse.org/M2E_FAQ#Maven_Integration_for_Eclipse_vs._Maven_eclipse:eclipse_plugin
>
> Is this correct?
>
>
> marko
>