Maven in Eclipse: step by step installation

IAmYourFaja picture IAmYourFaja · Dec 23, 2011 · Viewed 902.2k times · Source

I have spent been on the Maven site reading the 5- and 30-minute tutorials, and trialing Maven out for the first time.

I want to install a Maven plugin and use it to start building Maven projects from Eclipse.

Despite an honest effort, I have been unable to find a comprehensive tutorial on any Maven plugin. M2E, which seems like the de facto standard, has nothing but broken (or recursive) links on their site.

I can't tell if I even installed the plugin correctly, or how to use it.

Does anyone know of a good step-by-step guide to M2E or any other plugin? One that comes with good installation documentation, along with a solid explanation of its features and proper uses?

Answer

Ripon Al Wasim picture Ripon Al Wasim · Nov 30, 2012

(Edit 2016-10-12: Many Eclipse downloads from https://eclipse.org/downloads/eclipse-packages/ have M2Eclipse included already. As of Neon both the Java and the Java EE packages do - look for "Maven support")

Way 1: Maven Eclipse plugin installation step by step:

  1. Open Eclipse IDE
  2. Click Help -> Install New Software...
  3. Click Add button at top right corner
  4. At pop up: fill up Name as "M2Eclipse" and Location as "http://download.eclipse.org/technology/m2e/releases" or http://download.eclipse.org/technology/m2e/milestones/1.0

  5. Now click OK

After that installation would be started.

Way 2: Another way to install Maven plug-in for Eclipse by "Eclipse Marketplace":

  1. Open Eclipse
  2. Go to Help -> Eclipse Marketplace
  3. Search by Maven
  4. Click "Install" button at "Maven Integration for Eclipse" section
  5. Follow the instruction step by step

After successful installation do the followings in Eclipse:

  1. Go to Window --> Preferences
  2. Observe, Maven is enlisted at left panel

Finally,

  1. Click on an existing project
  2. Select Configure -> Convert to Maven Project