问题
I'm trying out m2eclipse, and I see it has some functionality to checkout a maven project directly from SCM. According to this page, it supports a whole bunch of different SCM tools including git. However, when I get to that "Checkout as Maven project from SCM" dialog, the drop-down that lets you choose the type of repository is devoid of choices. There must be some additional component or something I haven't installed. As a shot in the dark, I tried installing EGit, but that didn't do it. Help?
回答1:
As of Eclipse Indigo, there is a link at the bottom of the "Checkout as Maven project from SCM" dialog to "Find more SCM connectors in the M2E Marketplace." So the steps are now:
- File->New->Project...
- Choose "Maven/Checkout Maven Projects from SCM" from the list. This type of project should be available if you installed the Eclipse for Java Developers package.
- On the bottom right of the dialog that pops up, click "M2E Marketplace."
- Search the m2e marketplace for "egit". Note that searching for "git" doesn't work.
- Go through the installation steps, which involve restarting eclipse.
- Do steps 1 and 2 again. Now you should be able to choose "git" in the checkout dialog.
- Profit.
回答2:
I am not sure about the current level of integration between m2eclipse and egit.
It wasn't great back in March 2010.
In any case, Maven SCM provider for Git can help.
来源:https://stackoverflow.com/questions/4542104/how-do-you-get-git-integration-working-with-m2eclipse