Book Image

Apache Maven Cookbook

Book Image

Apache Maven Cookbook

Overview of this book

Table of Contents (18 chapters)
Apache Maven Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Importing an existing Maven project in NetBeans


Instead of creating a new Maven project, as we did in the preceding recipe, you may want to open an existing Maven project in NetBeans. Let us now see how we can import an existing Maven project.

Getting ready

NetBeans can be downloaded in two different ways (if not downloaded already):

  • Oracle provides a download of the latest JDK along with the latest version of NetBeans. This is a good option, especially if you haven't installed JDK yet.

  • If JDK is already installed, then NetBeans can be downloaded separately at https://netbeans.org/. There are different bundles of NetBeans (similar to Eclipse). You can choose one from Java SE or Java EE, or all of them, based on your preference.

How to do it...

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

  1. Navigate to File | Open Project...:

  2. Choose the project we created earlier from the command-line. Notice how NetBeans recognizes it (with the ma icon) as a Maven project:

  3. NetBeans...