Importing existing Maven Projects

With NetBeans, Maven support is already integrated to the IDE. And with the latest release, 7.0, Maven 3.0 is integrated.

There is no requirement to download or configure plugins. It is as simple as that.

Getting ready

Note that even if Maven is not in the System Path, NetBeans already has an embedded version for ease of use. This is very useful if there is no specific Maven version to be used.

However, it is a good practice to install and configure Maven properly.

For more information, visit: http://maven.apache.org/.

An existing Maven project should exist in order to continue with this recipe.

How to do it...

To open a Maven project:

  1. Click on File and then Open Project or press Ctrl+Shift+O.
  2. The Open Project dialog will be shown.

Select the folder where the Maven project is placed by clicking on Look In (A Maven project will have the following icon):

How to do it...

Once the File name changes to the correct folder, click Open Project.

How it works...

NetBeans recognizes Maven projects based on the Project Object Model (POM) files and certain other characteristics intrinsic to the format.

How it works...

After clicking Open Project, the Projects tab will show the Maven structure.

Maven, like Ant, helps developers package and maintain projects. Developers can perform certain tasks by invoking Maven goals, such as packaging and executing test cases.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.14.248.69