Book Image

Apache Maven Cookbook

Book Image

Apache Maven Cookbook

Overview of this book

Table of Contents (18 chapters)
Apache Maven Cookbook
About the Author
About the Reviewers

Importing an existing Maven project in IntelliJ IDEA

While we can use IntelliJ IDEA to create a new project, in most cases you will already have an existing project in your filesystem. In the latter scenario, you will want to import this project.

Getting ready

As IntelliJ IDEA needs a Java environment to run, let us first ensure that the Java environment is set up on our system:

  1. Ensure that JDK is installed.

  2. Download IntelliJ IDEA by visiting and clicking on the Download link.

  3. Ensure the project SDK is set to your Java installation.

How to do it...

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

  1. Start IntelliJ IDEA.

  2. Choose Import Project. Browse for the simple project that we created earlier:

  3. Make changes if required. The changes can be made as shown in the following screenshot:

  4. Confirm the project to be imported:

You are done! The existing Maven project is now imported to IntelliJ IDEA.

How it works...

IntelliJ IDEA has first-class support...