Log in

Forge: Eclipse Maven Git Integration

Import Maven Project

After following the steps up to and including Forge:How to Get Started Developing Forge#Create and Register Your Public-Private Key Pair,

  1. In Eclipse, open the File menu and choose Import.... The Import window appears.
  2. Open the Maven category by clicking the plus sign or triangle next to it.
  3. Click Checkout Maven Projects from SCM.
Import-maven-from-scm.png
  1. Click Next >.
  2. In the Target Location dialog, select git for the SCM. Put in "git@gitorious.org:cardforge/carforge.git" into the location. Click on Finish this will checkout Forge from Git and setup up a Maven project in Eclipse. Note that Git functionality will not work yet.
Target-location.png
  1. If you are not able to select a SCM, then you need to install the connectors from the m2e Marketplace. Click on the Find more connectors from the m2e Marketplace link in the dialog.
    1. You will see a dialog to install Maven connector components. Please select all of the components and install them. You will need to restart Eclipse and redo the previous steps.
M2e-marketplace.png
  1. Right-click on the Forge project and select the Team menu item. Select Share Project....
Select-team.png
  1. The Share Project dialog will appear. Select Git.
Share-project.png
  1. The Configure Git dialog will appear.
Configure-git-repo.png
  1. Select the Use or Create Repository in parent folder of project. The dialog should now show the current local git repository. Click Finish.
Configure-git-repo2.png
  1. The configuration is now complete. You will see a list of Git commands from the Team... menu item.
Git-commands.png
  1. You will also see a list of Maven goals to run from the Run As... menu item.
Maven-commands.png
  1. The list of build dependencies will reflect the Maven setup.
Maven-dependencies.png