Maven 3 Eclipse plugin setup

In this tutorial we are going to setup maven 3 eclipse plugin quickly and smoothly. The whole process goes well under Eclipse Indigo IDE.

1. Maven plugin installation

• Start Eclipse
• Navigate to http://www.eclipse.org/m2e/download
• Grab Eclipse installation button icon and drag it into your workspace area to the console view
• Click Next and then accept the license agreement. Wait for the process to end.
• Restart Eclipse

2. Setting up maven plugin

Now we are going to set up maven 3 eclipse plugin to use external maven installation. This way you will share the same artifact repository while building project from Eclipse IDE and straight from the console as well. If you want to find out how to install maven 3 on your machine visit our ealier tutorial here.

• Navigate to Window->Preferences->Maven->Installations
• Click Add
• Point the external maven installation folder
• Click Apply

3. Testing configuration

We are going to create a sample web app project to test if the maven 3 eclipse plugin has been set up correctly.

• In the Project Explorer window right click and select New->Other
• Select Maven Project and click Next
• In the filter field enter webapp
• Pick maven-archetype-webapp
• Click Next
• Enter Group Id and Artifact Id values
• Click Next. An empty webapp project has been created.

8 Responses to "Maven 3 Eclipse plugin setup"

  1. deepak says:

    Hi Vanessa,

    This is DeepaK.Thank you for sharing your knowledge through this video.But I am getting small problem.I could not find “external maven installation folder”.I am getting following errors.please help me.

    CoreException: Could not get the value for parameter compilerId for plugin execution default-compile: PluginResolutionException: Plugin org.apache.maven.plugins:maven-compiler-plugin:2.3.2 or one of its dependencies could not be resolved: Failed to collect dependencies for org.apache.maven.plugins:maven-compiler-plugin:jar:2.3.2 (): ArtifactDescriptorException: Failed to read artifact descriptor for org.apache.maven:maven-core:jar:2.0.6: ArtifactResolutionException: Failure to transfer org.apache.maven:maven-core:pom:2.0.6 from http://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.apache.maven:maven-core:pom:2.0.6 from/to central (http://repo.maven.apache.org/maven2): Network is unreachable: no further information to http://repo.maven.apache.org/maven2/org/apache/maven/maven-core/2.0.6/maven-core-2.0.6.pom

    Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (execution: default-compile, phase: compile)

    Thanks,
    Deepak

    Reply
  2. andyliao says:

    Hi Vanessa,Thank your share, but I can’t found the Maven item with navigating to Window->Preferences after installing the plug-in and restart eclipse with “-clean” param again and again.(My eclipse is juno version.) while I can found two itmes(m2e-Mave Integration for Eclipse / m2e-slf4j over logback logging(Optioinal) ) by Help ->About Eclipse ->installation details ->Installed Software.
    Is any thing wrong with my operation?

    Reply
  3. Luciane says:

    I’m using ubuntu 13.04 and the eclipse I downloaded via the ubuntu software center. When I drag the icon and drop into my console view, nothing happens. What may be the problem?

    Thank you.

    Reply
  4. shreeram says:

    Hi Vanessa,

    can u tell me which eclipse is perfect for maven 3…? because eclipse which i m using in that while creating maven project i m not getting archetype j2ee,but by using same archetype i developed maven project through cmd,,so please tell me which eclipse is compatible with maven,,or how to add j2ee archetype in eclipse

    thank u .

    Reply
  5. christina says:

    ubuntu 12.04
    eclipse indigo – Version: 3.7.2
    maven 3.2.5

    I’ve run into a plugin error installing Maven. Please help!
    It occurs in step#2.

    Here’s the error it prints:

    Cannot complete the install because one or more required items could

    not be found. Software being installed: m2e – slf4j over logback logging

    (Optional) 1.5.0.20140606-0033

    (org.eclipse.m2e.logback.feature.feature.group 1.5.0.20140606-0033)

    Missing requirement: m2e logback configuration 1.5.0.20140606-0033

    (org.eclipse.m2e.logback.configuration 1.5.0.20140606-0033) requires

    ‘bundle ch.qos.logback.classic 0.9.24′ but it could not be found Cannot

    satisfy dependency: From: m2e – slf4j over logback logging (Optional)

    1.5.0.20140606-0033 (org.eclipse.m2e.logback.feature.feature.group

    1.5.0.20140606-0033) To: org.eclipse.m2e.logback.configuration

    [1.5.0.20140606-0033]

    My programming instructor helped me thus far, however I’m on my own to figure it out and I am so incredibly behind in this course. Any help to get me up and running is certainly appreciated!

    Reply

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *


*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>