can't publish to Jetty running in Eclipse WTP fails: "may be locked..."

I’m running my 1st Vaadin application in Jetty inside Eclipse WTP.
then I change something in the UI and have to click “Compile Vaadin Widgets” button. The compilation completes (with some exceptions thrown in Eclipse Error log, btw) and then I get this error message:
“can’t publish to Jetty… localhost… the file may be locked…” (see the screenshot)

so I have so restart Jetty server every time I change something in the UI. there must be a better way!
11836.png

should I report this as a bug or I’m not using the plugin correctly (in which case that would be a usability bug) ?

You only need to compile the widgetset when you change the set of client side widgets in use - either by adding or removing an add-on JAR (containing client-side code) to the project or by modifying a custom client side widget. If you are just starting out with Vaadin, you probably need to do this only once - or not at all if you are using the default widgetset.

The vast majority of changes you make are in the server side code, so there should not be need to restart the server. Do remember to add “?restartApplication” to your application URL to see any larger changes on next page reload, though.

For even better on-the-fly updates of web application code changes into a running server without republishing the application, you might want to take a look at JRebel (a commercial product by ZeroTurnaround) - but first try what is already possible without it.

(The Eclipse built-in “J2EE Preview Server” does not always handle automatic republishing to an already running server correctly, but this seems to be a problem with the Eclipse adapter for this specific server, not in Jetty itself. If you run into this problem, you could use e.g. Tomcat or GlassFish, or an embedded Jetty started by a class in the project.)

oops, I didn’t get an email update from the forum…
thanks a lot for the detailed explanation, Henri! this makes sense.
I’m using IDEA at this moment and I see that code recompilation does not require server restart in many cases (I’m running Tomcat server inside IDEA).