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

Using NetBeans to run Maven goals


Let us now see how we can run the Maven goals in NetBeans.

How to do it...

To run Maven goals using the NetBeans IDE, implement the following steps:

  1. Open the simple project in the NetBeans IDE.

  2. Right-click on the project.

  3. View the available options:

How it works...

Unlike Eclipse, NetBeans has a tighter Maven integration. This means each of the menu options (Build, Clean and Build, Clean, and so on) call the corresponding Maven command to do so.

For instance, clicking on the Clean option will result in the following:

As can be seen, it runs the mvn clean command.

Similarly, the Clean and Build option is equivalent to the mvn clean install command.

These are simple use cases. NetBeans provides additional configuration options to override default Maven behavior.