Eclipse IDE + Maven – Integration

In this article, we will integrate Apache Maven a popular build tool with Eclipse IDE

This is only required for the “Juno (3.8/4.2)” version or lower versions like Indigo (3.7), Helios (3.6), etc

With versions starting from Kepler (4.3) and higher versions like Luna (4.4) or Mars (4.5) –> don’t require these steps to be followed as Maven comes built-in with these versions

Note: Current stable release is Luna (4.4) and this is available for all platforms like Windows, Linux, Mac OS X, and Solaris

Lets walk through step-by-step for integrating maven with Eclipse IDE (Juno version) in Windows environment

1. Eclipse IDE + Maven – Integration :

There are two ways

  • Eclipse Marketplace…
  • Install New Software…

1.1 Eclipse Marketplace…

Step 1: Open Eclipse IDE (Juno version)

1_Eclipse-Maven-Integration_open_first

Step 2: Eclipse –> Help menu –> Eclipse Marketplace…

2_Eclipse-Maven-Integration_help_marketplace

Step 3: Click Eclipse Marketplace…

3_Eclipse-Maven-Integration_open_marketplace

Step 4: Type “m2eclipse” in Find box and hit enter –> it will pull all matching plugins from eclipse marketplace

4_Eclipse-Maven-Integration_for_juno

Step 5: Install “Maven Integration for Eclipse WTP (Juno)

5_Eclipse-Maven-Integration_downloading_in_progress

Step 6: Check “plugins” to be installed –> click Next

Note: It’s better to check all boxes and install at once

6_Eclipse-Maven-Integration_check_the_item_to_be_installed

Step 7: Select “I accept the terms of the license agreements” –> click Finish

7_Eclipse-Maven-Integration_agree_for_licence

Step 8: Installation in progress

8_Eclipse-Maven-Integration_installation_in_progress
9_Eclipse-Maven-Integration_installation_in_progress_2

Step 9: After installing required plugins –> eclipse will prompt to restart IDE again to take effects of new changes

Click “Yes” to restart the Eclipse IDE

10_Eclipse-Maven-Integration_restart_required_yes_no

Step 10: To verify whether Maven successfully installed in the Eclipse IDE (Juno version)

Go to Eclipse –> Windows –> Preferences

11_Eclipse-Maven-Integration_verify_maven_installed

Step 11: If “Maven” listed on the left hand side –> then Maven installed successfully

12_Eclipse-Maven-Integration_verify_windows_preferences

Step 12: To create Maven based project from wizard

Go to Eclipse –> File –> New –> Others –> type “Maven

13_Eclipse-Maven-Integration_create_maven_project

That’s all for the Way one, now let’s move on to Way-2

1.2 Install New Software…

Step 1: Open Eclipse IDE (Juno version)

14_Eclipse-Maven-Integration_way_2_open_eclipse

Step 2: Eclipse –> Help menu –> Install New Software…

15_Eclipse-Maven-Integration_way_2_install_new_software

Step 3: Install New Software wizard

16_Eclipse-Maven-Integration_way_2_install_new_software_wizard

Step 4: Enter the link “http://download.eclipse.org/technology/m2e/releases” into Work with –> hit enter

Check “Maven Integration for Eclipse” –> Click Next

17_Eclipse-Maven-Integration_way_2_enter_m2e_linkand_enter

Step 5: View the installation details –> Click Next

Step 6: I accept for the license –> Click Next

Step 7: Restart Eclipse IDE to take effects of new changes

That’s all with our Way-2

2. Conclusion:

  • We have liberty of walking either way for installing Maven to Eclipse IDE

3. Useful Eclipse IDE shortcuts :

Related Articles:

References:

Happy Coding !!
Happy Learning !!

Eclipse + Maven - Setting M2_REPO classpath variable in IDE