Coding with Netbeans will make developer life simple. We don't need search for plugins and install different plugins from different places.
Maven projects can opened as directly in Netbeans without any settings. Here is the way to run & debug using maven jetty plugin. We can't add Jetty server as servers in Netbeans.
Run project:
- Right click on project and open the properties.
- click on "Actions" on left side. On right side there will be list of available actions.
- To run jetty can be created a new action or override default "Run Project" Here I am overriding default one, Because I can run the project just by hitting "F6" key
- click on "Run Project"
- Enter the value "Execute Goals" as "jetty:run", If you want run as offline add "jetty:run -o"
- "Active Profiles" can be empty
- In "set Properties" field we can set like skip test. Here I am skipping test.
Done, After setting your project as "main project" by right clicking you can run the project by hitting "F6" key.
Debug Project
- Right click on project and open the properties.
- click on "Actions" on left side. On right side there will be list of available actions.
- To run jetty can be created a new action or override default "Debug Project" Here I am overriding default one, Because I can run the project just by hitting "Ctrl + F5" key
- click on "Debug Project"
- Enter the value "Execute Goals" as "jetty:run", If you want run as offline add "jetty:run -o"
- "Active Profiles" can be empty
- In "set Properties" field": jpda.listen=maven
Done, If your project is main project, just hit "ctrl+F5" key to debug or right click on project and click on debug.
can we specify version of jetty to download and run?
ReplyDeleteThanks a lot
ReplyDelete