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 to do it...

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:

How it works...

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.

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

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