Apache Maven

Eclipse integration

Install Maven in Eclipse

You can take advantage of Apache Maven’s powerful features in Eclipse by installing the M2Eclipse feature. Follow these steps to install Maven in Eclipse:

  1. Open Eclipse and select HelpInstall New Software…

  2. In the opened dialog, select the Add… button to add a new repository.

  3. Fill in the form with the information below and confirm with OK:

    Name: M2Eclipse

    Location: https://download.eclipse.org/technology/m2e/releases

  4. After the Pending… finishes, Select All and select Next.

  5. ◉ accept the terms of the license agreement and select Finish.

  6. At the end of the installation you will be asked to restart Eclipse. Select Yes to perform the restart.

Check if Eclipse already has M2Eclipse Maven support installed

Go to HelpAbout Eclipse → Check if the m2e feature is there: Image link.

Configure a custom Maven installation in Eclipse

Eclipse would provide its own embedded Maven enviroment out-of-the-box, which is not recommended whenever a certain Maven version must be used or further configuration must be performed (proxy, mirrors and so on): that is, to have full control over which Maven environment would be used by the IDE.

  • Select WindowPreferencesMavenInstallations

  • Select Add.. to add a custom/local Maven installation

  • Supply the necessary information and select Finish:

    Installation home: ... your Maven home ... Directory…

    Installation name: Apache Maven x.y.z

  • ☑ select it as default (instead of the default EMBEDDED version) and confirm with OK.


This modified text is an extract of the original Stack Overflow Documentation created by the contributors and released under CC BY-SA 3.0 This website is not affiliated with Stack Overflow