Maven in Eclipse: step by step installation [closed]

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?


(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

IF you want to install Maven in Eclipse(Java EE) Indigo Then follow these Steps :

  1. Eclipse -> Help -> Install New Software.

  2. Type " http://download.eclipse.org/releases/indigo/ " & Hit Enter.

  3. Expand " Collaboration " tag.

  4. Select Maven plugin from there.

  5. Click on next .

  6. Accept the agreement & click finish.

After installing the maven it will ask for restarting the Eclipse,So restart the eclipse again to see the changes.


By "use install a Maven plugin and use it" I am sure you are looking for a Eclipse plugin that will perform Maven functions within the IDE. If so, M2E is a good choice. You will find a lot of help within the Eclipse installation once you install M2E.

That said -- considering that you are starting off using Maven -- it would go a long way to have a good understanding of the basic concepts. Using M2E could hide some of the details which could lead to incomplete or incorrect interpretation of Maven's behavior and therefore problems downstream.

Some good Maven online references are:

  • Maven's own documentation -- which you have found. Be sure to see the docs of the plugins that you use
  • Sonatype's Maven book

First install maven in your system and set Maven environment variables

  1. M2_HOME: ....\apache-maven-3.0.5 \ maven installed path
  2. M2_Repo: D:\maven_repo \If change maven repo location
  3. M2: %M2_HOME%\bin

Steps to Configures maven on Eclipse IDE:

  • Select Window -> Preferences Note: If Maven option is not present, then add maven 3 to eclipse or install it.
  • Add the Maven location of your system

To check maven is configured properly:

  • Open Eclipse and click on Windows -> Preferences

  • Choose Maven from left panel, and select installations.

  • Click on Maven -> "User Settings" option form left panel, to check local repository location.


Check This

instead to avoid this error:

Cannot complete the install because one or more required items could not be found. Software being installed: m2e - slf4j over logback logging (Optional) 1.6.1.20150625-2338 (org.eclipse.m2e.logback.feature.feature.group 1.6.1.20150625-2338) Missing requirement: Maven Integration for Eclipse 1.6.0.20150526-2032 (org.eclipse.m2e.core 1.6.0.20150526-2032) requires 'bundle com.google.guava [14.0.1,16.0.0)' but it could not be found Missing requirement: Maven Integration for Eclipse 1.6.1.20150625-2338 (org.eclipse.m2e.core 1.6.1.20150625-2338) requires 'bundle org.eclipse.osgi 3.10.0' but it could not be found Cannot satisfy dependency: From: Maven Integration for Eclipse 1.6.0.20150526-2032 (org.eclipse.m2e.core.ui 1.6.0.20150526-2032) To: bundle org.eclipse.m2e.core [1.6.0,1.7.0) Cannot satisfy dependency: From: Maven Integration for Eclipse 1.6.1.20150625-2338 (org.eclipse.m2e.core.ui 1.6.1.20150625-2338) To: bundle org.eclipse.m2e.core [1.6.0,1.7.0) Cannot satisfy dependency: From: m2e logback appender 1.6.1.20150625-2338 (org.eclipse.m2e.logback.appender 1.6.1.20150625-2338) To: bundle org.eclipse.m2e.core.ui [1.6.0,1.7.0) Cannot satisfy dependency: From: m2e - slf4j over logback logging (Optional) 1.6.1.20150625-2338 (org.eclipse.m2e.logback.feature.feature.group 1.6.1.20150625-2338) To: org.eclipse.m2e.logback.appender [1.6.1.20150625-2338]

source