Translate

Sunday, February 10, 2013

How to Install Maven Plugin in Eclipse

Source: https://developer.atlassian.com/display/DOCS/Set+Up+the+Eclipse+IDE+for+Windows

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:
  1. Choose Help > Install New Software.
    The Available Software dialog appears. 
  2. Click the Add button.
    The Add Repository dialog appears. 
  3. Enter m2eclipse in the Name field.
  4. Enter http://m2eclipse.sonatype.org/sites/m2e in the Location field.
  5. 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:
  1. Choose Windows > Preferences from the Eclipse menu bar.
    The system displays the preferences dialog.
  2. Filter for or navigate to the Maven > Installations page.
  3. Click the Add button.
    The Maven Installation dialog displays.
  4. Browse to your c:\Programs\apache-maven-3.0.4 installation.
  5. Press OK.
    The system sets this external repository for you. The dialog should look like the following:
  6. Ensure the Global settings are coming from the installation directory.
  7. Press Apply.
  8. Click the Maven root.
  9. Uncheck Download repository index updates on startup.
    This prevents Maven from updating on Eclipse startup which can be time consuming.
  10. Press OK to close the dialog.