Creating a Maven Project

When using Maven, project creation takes place through the use of a Maven archetype. In Eclipse, project creation takes place via the new project wizard. The new project wizard inside of Eclipse offers a plethora of templates for creating new projects. The m2eclipse plugin improves on this wizard to provide the following additional capabilities:

  • Checking out a Maven project from a SCM repository

  • Creating a Maven project using a Maven archetype

  • Creating a Maven POM file

As shown in Figure 14-2, all three of these options are important to developers using Maven. Let’s take a look at each option in the sections that follow.

Creating a new project with m2eclipse wizards

Figure 14-2. Creating a new project with m2eclipse wizards

Checking Out a Maven Project from SCM

m2eclipse provides the ability to check out a project directly from a SCM repository. Simply enter the SCM information for a project, and it will check it out for you to a location of your choice, as shown in Figure 14-3.

Checking out a new project from Subversion

Figure 14-3. Checking out a new project from Subversion

This dialog offers additional options for specifying a particular revision, either by browsing the revisions in a Subversion repository or simply by entering the revision number manually. These features reuse of some of the features in the Subclipse plugin to interact with the ...

Get Maven: The Definitive Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.