O'Reilly logo

Maven: The Definitive Guide by Sonatype Company

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Importing Maven Projects

m2eclipse provides three options for importing a Maven project into Eclipse, including:

  • Import an existing Maven project

  • Check out a Maven project from SCM

  • Materialize a Maven project

Figure 14-10 shows the wizard for importing projects with the options for Maven provided by m2eclipse.

Importing a Maven project

Figure 14-10. Importing a Maven project

The dialog in Figure 14-10 is displayed when you use the FileImport command in Eclipse and then filter the options by entering the word “maven” in the filter field. As noted earlier, three options are available for importing a Maven project into Eclipse, including: Maven Projects, Check out Maven Project from Subversion, and Materialize Maven Projects.

Importing a Maven project from Subversion is identical to creating a Maven project from Subversion, as discussed in the previous section, so discussion of it here would be redundant. Let’s move on now to review the other two options for importing a Maven project into Eclipse.

Importing a Maven Project

m2eclipse can import a Maven project with an existing pom.xml. By pointing at the directory where a Maven project is located, m2eclipse detects all the Maven POMs in the project and provides a hierarchical list of them as shown in Figure 14-11.

Importing a multimodule Maven project

Figure 14-11. Importing a multimodule Maven project

Figure 14-11 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required