Importing an existing Maven project in Eclipse

If you have already set up a Maven project from the command-line, then it can easily be imported to Eclipse.

If you have not yet set up Eclipse and verified that Maven exists, please follow the Getting ready section of the preceding recipe.

How to do it...

To import an existing Maven project in Eclipse, perform the following steps:

  1. Navigate to File | Import… and click on Maven:
    How to do it...
  2. Choose the project we created in the previous chapter:
    How to do it...
  3. Import the project. You will see contents identical to what we saw when creating ...

Get Apache Maven Cookbook 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.