Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To import an existing Maven project into Eclipse, use the m2e Maven Projects importer—not the generic Eclipse project importer. Open File > Import, choose the Maven import option, select the folder containing the project’s pom.xml, review the detected projects, and finish. Eclipse then configures the project through m2e and resolves its Maven dependencies.

Import a Maven project into Eclipse

  1. Confirm Maven support is installed. Eclipse uses Maven Integration for Eclipse (m2e) for Maven project import and configuration. Its documentation describes Maven project import, POM-based dependency management, workspace dependency resolution, and downloading dependencies from remote repositories: M2Eclipse Documentation.
  2. Open the import wizard. Select File > Import. Expand or search for the Maven category and choose Existing Maven Projects or Maven Projects. The exact wording may differ by Eclipse and m2e version.
  3. Choose the project directory. Browse to the project root—or another directory containing the POM files you want to import. The wizard scans for Maven POMs and lists projects it detects. The documented Maven flow is described in Sonatype’s guide to importing Maven projects; its instructions are useful background, but its interface details may be dated.
  4. Review the detected projects and finish. Select the projects you want in the workspace, then click Finish. Allow m2e to configure them and resolve dependencies; the time required depends on the project and whether dependencies need to be downloaded.

After import, m2e manages the Eclipse build path using the Maven project metadata. It can resolve dependencies on other projects already in the workspace without requiring them to be installed in the local Maven repository, and it can download required artifacts from remote repositories.

Importing a multi-module Maven project

When you select a directory containing a parent POM and modules, inspect the importer’s detected POM hierarchy before finishing. Choose the parent and modules you actually want in your workspace; do not assume every nested POM must be selected. The Maven importer supports selecting detected projects in the hierarchy, as shown in Sonatype’s project-import guide.

Use the Maven importer, not the generic project importer

The importers have different jobs. Choose based on what is in the folder:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Importer Best for What it scans Maven configuration
Maven Projects (m2e) A Maven project that you want Eclipse to configure from its POM A selected directory for Maven POM files; detected POMs can be shown hierarchically Uses m2e to configure Maven integration, manage the Eclipse build path, and resolve dependencies. Source
General > Existing Projects into Workspace An existing Eclipse workspace project A root directory or archive containing Eclipse projects The documented workflow imports Eclipse projects; it does not replace m2e’s POM-based Maven configuration. Source

The generic importer’s documented steps are to open File > Import, choose Existing Projects into Workspace, browse to a root directory or archive, select projects, and finish. Its wizard also offers an option to copy projects into the workspace: Eclipse Import Wizard.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Fix common Maven import problems

The Maven importer does not appear

Check whether m2e is installed in your Eclipse package. m2e is Eclipse’s Maven integration and provides the Maven project-import functionality: M2Eclipse Documentation.

Rank #2
Sale
Eclipse
  • Used Book in Good Condition

Dependencies or the classpath look stale

Select the project and run Maven > Update Project Configuration; some versions label the command Maven > Update Project. This reruns Maven project configuration. Import and update behavior can depend on m2e preferences and configured goals. See the m2e FAQ.

The project builds in a terminal but not in Eclipse

Command-line Maven and Maven used inside Eclipse can differ. Check the Maven runtime selected in Eclipse, its Maven settings (including settings.xml), repository and proxy configuration, and the Java runtime Eclipse uses. The m2e FAQ discusses differences between in-process Maven and command-line or externally launched Maven.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A module is missing or an unintended project was imported

Run the Maven importer again and inspect the POM hierarchy and selections. A selected directory may contain more POMs than you intend to include, so adjust the project selection before finishing.

A folder in the workspace is not recognized automatically

Some m2e versions have supported smart import for folders containing a pom.xml, but that behavior is documented in the historical m2e 1.7 release notes. If automatic recognition is unclear in your installation, use the explicit Maven Projects import flow.

Quick Recap

SaleBestseller No. 2
Eclipse
Eclipse
Used Book in Good Condition
$25.95
SaleBestseller No. 3
SaleBestseller No. 4

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.