views:

352

answers:

0

After my unsuccessful attempt to run Tomcat with hot deployment from NetBeans with Maven, I've tried jetty. The jetty-maven-plugin doc gave me an important hint:

The plugin will automatically ensure the classes are rebuilt and up-to-date before deployment. If you change the source of a class and your IDE automatically compiles it in the background, the plug-in will pick up the changed class.

If I look at $myproject/target/classes/... in the projects directory, I can see that NetBeans doesn't compile and refresh the class file on saving. I need to build the project explicitly to update the file and than jetty picks up the change. (The plug-in param "scanIntervalSeconds" is set to 1.)

How can I tell NetBeans to compile on save and update the class file so that jetty can pick up the change?

Provisional solution: "Project Properties > Build > Compile > Compile On Save: For both application and test execution". NetBeans warns me that the result is not the same as with a usal compiler run but it works so far.