This post is for myself more than anything else, just because I keep forgetting the steps involved.
I’m using SpringSource Tool Suite 2.9.1.RELEASE, which is based on Eclipse 3.7.2 (Indigo). I have the egit and m2e Eclipse plugins installed.
You have a brand new, pretty-much-empty GitHub project (other than the README, say—but no Maven stuff yet), and you want to import it into Eclipse as a Maven project.
- Add the remote GitHub repo to your list of Git repos in Eclipse.
- In Eclipse, go to File → Import → Git → Projects from Git. (I’m on a Mac; the menu may be a little different for other platforms.)
- On the “Select Repository Source”, choose “URI”.
- On the “Source Git Repository” pane, enter the URI info. It might be something like
ssh://email@example.com/williewheeler/sip11.git, for example.
- On the “Branch Selection” pane, choose the master branch.
- On the “Local Destination” pane, decide where you want the local copy to live.
- Where it asks you to select an import wizard, choose “Use the New Project wizard” and click “Finish”.
- Now you have to choose a New Project wizard. Choose Maven → Maven Project.
- From here just create the project like you would any other new Maven project. Once you’re done, it will show up in your list of projects in the Package Explorer view, and sharing should be activated.