Pre-requisites:
- Eclipse installation - Download the Eclpse IDE for Java EE developers.
- Maven installation from maven.apache.org/download.cgi
Install the Maven Eclipse Plugin
Start Eclipse and do the following:
- Choose Help > Install New Software.
The Available Software dialog appears. - Click the Add button.
The Add Repository dialog appears. - Enter m2eclipse in the Name field.
- Enter
http://m2eclipse.sonatype.org/sites/m2e
in the Location field.
- Press OK to close the dialog.
The system searches the site for the plugin. After a moment, the Name field fills with the Maven Integration for Eclipse as the following:
Configure the Maven Plugin
After the Eclipse restarts, you need to ensure that the M2E plugin is configured:- Choose Windows
> Preferences from the Eclipse menu bar.
The system displays the preferences dialog. - Filter for or navigate to the Maven > Installations page.
- Click the Add
button.
The Maven Installation dialog displays. - Browse to
your
c:\Programs\apache-maven-3.0.4
installation. - Press
OK.
The system sets this external repository for you. The dialog should look like the following:
- Ensure the Global settings are coming from the installation directory.
- Press Apply.
- Click the Maven root.
- Uncheck Download repository index updates on startup.
This prevents Maven from updating on Eclipse startup which can be time consuming. - Press OK to close the dialog.